[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Build problems with xen 4.7
On Mon, 8 Aug 2016, Peng Fan wrote: > ... > <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 > > ... > > Does this patch work when cross compile for ARM64? I dropped that patch following suggestions on this thread, and just did it in the spec file, where the relevant bit is export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS" export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS" export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS" %if %build_crosshyp XEN_TARGET_ARCH=x86_64 make %{?_smp_mflags} %{?efi_flags} prefix=/usr xen CC="/usr/bin/x86_64-linux-gnu-gcc `echo $RPM_OPT_FLAGS | sed -e 's/-m32//g' -e 's/-march=i686//g' -e 's/-mtune=atom//g'`" %else make %{?_smp_mflags} %{?efi_flags} prefix=/usr xen CC="gcc $RPM_OPT_FLAGS" %endif ./configure --prefix=%{_prefix} --libdir=%{_libdir} --with-system-seabios=%{seabiosloc} --with-system-qemu=/usr/bin/qemu-system-i386 --with-linux-backend-modules="xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback xen-scsiback xen-acpi-processor" make %{?_smp_mflags} %{?ocaml_flags} prefix=/usr tools make prefix=/usr docs export RPM_OPT_FLAGS_RED=`echo $RPM_OPT_FLAGS | sed -e 's/-m64//g' -e 's/--param=ssp-buffer-size=4//g' -e's/-fstack-protector-strong//'` %ifarch %{ix86} export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS_RED" %endif make mini-os-dir make -C stubdom build %ifarch x86_64 export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS_RED" XEN_TARGET_ARCH=x86_32 make -C stubdom pv-grub %endif which is a bit messy but seems to work. In summary you need not to set CFLAGS or unset it, and can instead pass extra compile options using EXTRA_CFLAGS_XEN_TOOLS, EXTRA_CFLAGS_QEMU_TRADITIONAL and EXTRA_CFLAGS_QEMU_XEN and with CC="gcc compile_options" added to the make command for the hypervisor. Michael Young _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |