[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Bug#853710: xen: ftbfs with GCC-7
Matthias Klose of the Debian Project reports that the Xen package in Debian stretch, which is based on a snapshot of xen.git#stable-4.8, does not build with GCC-7. Matthias Klose writes ("Bug#853710: xen: ftbfs with GCC-7"): > The package fails to build in a test rebuild on at least amd64 with > gcc-7/g++-7, but succeeds to build with gcc-6/g++-6. The > severity of this report may be raised before the buster release. > There is no need to fix this issue in time for the stretch release. > > The full build log can be found at: > http://people.debian.org/~doko/logs/gcc7-20170126/xen_4.8.1~pre.2017.01.23-1_unstable_gcc7.log > The last lines of the build log are at the end of this report. ... > gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes > -Wdeclaration-after-statement -Wno-unused-but-set-variable > -Wno-unused-local-typedefs -O2 -fomit-frame-pointer -nostdinc -fno-builtin > -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ > -include > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/config.h > '-D__OBJECT_FILE__="compat.o"' -Wa,--strip-local-absolute -MMD -MF > ./.compat.o.d > -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include > -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-generic > > -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-default > '-D__OBJECT_LABEL__=arch$x86$efi$compat.o' -msoft-float -fno-stack-protector > -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX -DHAVE_GAS_SSE4_2 > -DHAVE_GAS_EPT -DHAVE_GAS_FSGSBASE -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM > '-D__OBJECT_LABEL__=arch/x86/efi/compat.o' -mno-red-zone -mno-sse -fpic > -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -fshort-wchar > -c compat.c -o compat.o > In file included from > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/uaccess.h:12:0, > from > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/guest_access.h:10, > from > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/guest_access.h:10, > from compat.c:1: > runtime.c: In function 'efi_compat_get_info': > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/x86_64/uaccess.h:56:37: > error: '*' in boolean context, suggest '&&' instead > [-Werror=int-in-bool-context] > compat_access_ok(addr, (count) * (size))) I looked at the code and the macros at the root of the message are these: #define compat_array_access_ok(addr,count,size) \ (likely((count) < (~0U / (size))) && \ compat_access_ok(addr, (count) * (size))) #define __compat_access_ok(d, addr, size) \ __compat_addr_ok(d, (unsigned long)(addr) + ((size) ? (size) - 1 : 0)) This expands to, effectively (and stripping extra parents etc.) addr + (count*size ? count*size - 1 : 0) GCC-7 is complaining about count*size (ie, the result of a multiplication) being used as a boolean (ie, for the ?: conditional). I think the compiler is simply wrong to complain about this. Such idioms must be extremely common. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |