Hi, On Mon, Feb 04, 2019 at 03:54:05PM +0000, Andre Przywara wrote: > On Mon, 4 Feb 2019 10:59:41 +0100 > Anisse Astier <aastier@xxxxxxxxxx> wrote: > > > Hi, > > > > This patch series fixes a few warnings when building kvmtool with > > GCC8. I'm not sure it's the best solution for each case. > > Ah, thanks, I was just about to come back to this. > So I installed x86->arm64 and arm64->x86 cross compilers from the > vanilla FSF GCC 8.2 sources, and could reproduce the warnings/errors, > plus can confirm the fixes. > However my toolchain complained about more issues, which I fixed in > three more patches on top of this. I will send them out in a minute. > > Out of curiosity, what was your compiler version / build? Did your > distro disable some warnings during build time? > > Cheers, > Andre. I'm using ubuntu 18.10's default native gcc compiler: $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1) I haven't tried cross-building with a recent gcc, but note that I'm using the below patch to enable cross-building on kvmtool; but I don't really like this approach, which is why I haven't submitted it. Anisse -- From: Anisse Astier <aastier@xxxxxxxxxx> Subject: [PATCH] Put extra build flags from CPPFLAGS in CFLAGS before checking dependencies Signed-off-by: Anisse Astier <aastier@xxxxxxxxxx> --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index c4faff6..c0f338c 100644 --- a/Makefile +++ b/Makefile @@ -194,6 +194,7 @@ ifeq (,$(ARCH_INCLUDE)) endif ### +CFLAGS += $(CPPFLAGS) # Detect optional features. # On a given system, some libs may link statically, some may not; so, check -- 2.19.1