--- xen-4.3.0/xen/Makefile.orig 2013-07-19 21:34:24.226148328 +0100 +++ xen-4.3.0/xen/Makefile 2013-07-19 21:46:54.603767317 +0100 @@ -15,6 +15,9 @@ EFI_MOUNTPOINT ?= /boot/efi EFI_VENDOR=fedora LD_EFI ?= $(LD) +ifeq ($(XEN_TARGET_ARCH),x86_32) +CFLAGS := $(shell echo $(CFLAGS) | sed -e 's/-m[a-z0-9=]* //g' -e 's/ -fstack-protector-strong//g') +endif .PHONY: default default: build @@ -25,9 +28,9 @@ .PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags build install uninstall debug clean distclean cscope TAGS tags MAP gtags:: ifneq ($(XEN_TARGET_ARCH),x86_32) - $(MAKE) -f Rules.mk _$@ + $(MAKE) CCX=$(CC) -f Rules.mk _$@ else - echo "*** Xen x86/32 target no longer supported!" + $(MAKE) CCX=/usr/bin/x86_64-linux-gnu-gcc XEN_TARGET_ARCH=x86_64 -f Rules.mk _$@ endif .PHONY: _build @@ -99,9 +102,9 @@ $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm $(MAKE) -f $(BASEDIR)/Rules.mk -C include - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s + $(MAKE) CC=$(CCX) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET) + $(MAKE) CC=$(CCX) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET) # drivers/char/console.o contains static banner/compile info. Blow it away. # Don't refresh these files during e.g., 'sudo make install'