kbuild: Use -nostdinc in compile tests
authorBen Hutchings <ben@decadent.org.uk>
Sat, 19 Oct 2013 18:43:35 +0000 (19:43 +0100)
committerBastian Blank <waldi@debian.org>
Fri, 22 Jun 2018 09:50:22 +0000 (10:50 +0100)
commit18ba1a3c5fc6e3eb99912838535b3a12d4e15c74
tree641fee0d7c89d74aa85849c0ad96e4204c0c27ab
parentb986e11f502146c2d114496acb15b287844d1d27
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