kbuild: Use -nostdinc in compile tests
authorBen Hutchings <ben@decadent.org.uk>
Sat, 19 Oct 2013 18:43:35 +0000 (19:43 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 19 Apr 2018 10:13:03 +0000 (11:13 +0100)
commit47be232360d4900783919d9a0cd49b38873aba2e
treeb798ec1f2280bc93125d9127e9d1e6a1126bbb86
parenta44d9b5ff50038a5ba8a734d9e5ed93229e6c740
kbuild: Use -nostdinc in compile tests

gcc 4.8 and later include <stdc-predef.h> by default.  In some
versions of eglibc that includes <bits/predefs.h>, but that may be
missing when building with a biarch compiler.  Also <stdc-predef.h>
itself could be missing as we are only trying to build a kernel, not
userland.

The -nostdinc option disables this, though it isn't explicitly
documented.  This option is already used when actually building
the kernel, but not by cc-option and other tests.  This can result
in silently miscompiling the kernel.

References: https://bugs.debian.org/717557
References: https://bugs.debian.org/726861
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name kbuild-use-nostdinc-in-compile-tests.patch
Makefile
scripts/Kbuild.include