[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Build problems with xen 4.7
Hi, On Fri, May 13, 2016 at 11:23:29AM -0400, Konrad Rzeszutek Wilk wrote: >On Fri, May 13, 2016 at 03:25:52PM +0100, M A Young wrote: >> On Fri, 13 May 2016, Jan Beulich wrote: >> >> > >>> On 13.05.16 at 15:49, <konrad.wilk@xxxxxxxxxx> wrote: >> > > ... >> > > >> > > Still an issue - with 4.7.0-rc1. >> > >> > And I don't recall anyone having contributed a fix/workaround. >> > >> > > If I do: >> > > >> > > $export CFLAGS=" "' >> > > $make >> > > >> > > I end up with: >> > > gcc -E -O1 -fno-omit-frame-pointer -m64 -DBUILD_ID -g >> > > -fno-strict-aliasing -std=gnu99 >> > >[...] >> > > <command-line>:0:0: error: "__OBJECT_FILE__" redefined [-Werror] >> > > <command-line>:0:0: note: this is the location of the previous definition >> > > <command-line>:0:0: error: "__OBJECT_LABEL__" redefined [-Werror] >> > > <command-line>:0:0: note: this is the location of the previous definition >> > > cc1: all warnings being treated as errors >> > > Makefile:62: recipe for target 'compat/callback.i' failed I met similar issue when cross compile xen for ARM64 on X86 PC using yocto poky 4.9.3 toolchain. aarch64-poky-linux-gcc -O2 -pipe -g -feliminate-unused-debug-types -O1 -fno-omit-frame-pointer -DBUILD_ID -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O1 -fno-omit-frame-pointer -DBUILD_ID -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O1 -fno-omit-frame-pointer -DBUILD_ID -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -nostdinc -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include /home/Freenix/work/sw-stash/imx8/8qm/xen/xen/xen/include/xen/config.h '-D__OBJECT_FILE__="/home/Freenix/work/sw-stash/imx8/8qm/xen/xen/xen/xen"' -Wa,--strip-local-absolute -fno-optimize-sibling-calls -fno-omit-frame-pointer -MMD -MF /home/Freenix/work/sw-stash/imx8/8qm/xen/xen/xen/.xen.d -mcpu=generic -mgeneral-regs-only -DCONFIG_EARLY_PRINTK -DEARLY_PRINTK_INC=\"debug-imx8qm.inc\" -DEARLY_PRINTK_BAUD= -DEARLY_UART_BASE_ADDRESS=0x5a060000 -DEARLY_UART_REG_SHIFT= -fno-optimize-sibling-calls -I/home/Freenix/work/sw-stash/imx8/8qm/xen/xen/xen/include -fno-stack-protector -fno-exceptions -Wnested-externs -DGCC_HAS_VISIBILITY_ATTRIBUTE -O1 -fno-omit-frame-pointer -DBUILD_ID -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O1 -fno-omit-frame-pointer -DBUILD_ID -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -nostdinc -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include /home/Freenix/work/sw-stash/imx8/8qm/xen/xen/xen/include/xen/config.h '-D__OBJECT_FILE__="asm-offsets.s"' -Wa,--strip-local-absolute -fno-optimize-sibling-calls -fno-omit-frame-pointer -MMD -MF ./.asm-offsets.s.d -mcpu=generic -mgeneral-regs-only -DCONFIG_EARLY_PRINTK -DEARLY_PRINTK_INC=\"debug-imx8qm.inc\" -DEARLY_PRINTK_BAUD= -DEARLY_UART_BASE_ADDRESS=0x5a060000 -DEARLY_UART_REG_SHIFT= -I/home/Freenix/work/sw-stash/imx8/8qm/xen/xen/xen/include -fno-stack-protector -fno-exceptions -Wnested-externs -DGCC_HAS_VISIBILITY_ATTRIBUTE -S -o asm-offsets.s arm64/asm-offsets.c <command-line>:0:0: error: "__OBJECT_FILE__" redefined [-Werror] <command-line>:0:0: note: this is the location of the previous definition cc1: all warnings being treated as errors >> > >> > My previous recommendation stands: Then just don't do this. >> >> I hacked around it for my test builds (eg. see my test build at >> https://copr.fedorainfracloud.org/coprs/myoung/xentest/build/204111/ >> ) by not setting CFLAGS in the environment, but by instead adding the >> recommended Fedora RPM settings into config/StdGNU.mk via a different >> environment variable. > >ah: > >--- xen-4.7.0/config/StdGNU.mk.orig 2016-04-15 22:56:52.191227591 +0100 >+++ xen-4.7.0/config/StdGNU.mk 2016-04-15 23:01:40.978829756 +0100 >@@ -37,6 +37,12 @@ > > ifneq ($(debug),y) > CFLAGS += -O2 -fomit-frame-pointer -fno-tree-coalesce-vars >+ifeq ($(XEN_TARGET_ARCH),x86_64) >+#might be cross-compiling so strip out possible x86_32 options >+CFLAGS += $(shell echo $(CFLAGS_EXTRA) | sed -e 's/-m32//g' -e >'s/-march=i686//g' -e 's/-mtune=atom//g') >+else >+CFLAGS += $(CFLAGS_EXTRA) >+endif > else > # Less than -O1 produces bad code and large stack frames > CFLAGS += -O1 -fno-omit-frame-pointer > > >And in the spec file: >export CFLAGS_EXTRA="$RPM_OPT_FLAGS" >make %{?_smp_mflags} %{?efi_flags} prefix=/usr dist-xen > Does this patch work when cross compile for ARM64? Thanks, Peng. > >> >> Another thing you might need to know if you are building xen on Fedora 24 >> is that you need to add -fno-tree-coalesce-vars if you are on a gcc-6.0.0 >> package (it may be fixed in gcc-6.1.1-2.fc24 which has just come out but I >> haven't tested it yet). >> >> Michael Young > >_______________________________________________ >Xen-devel mailing list >Xen-devel@xxxxxxxxxxxxx >http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |