kbuild: Use -nostdinc in compile tests
authorBen Hutchings <ben@decadent.org.uk>
Sat, 19 Oct 2013 18:43:35 +0000 (19:43 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 20 Mar 2018 08:31:07 +0000 (08:31 +0000)
commit897f7eb4768d037b9ae4c98145334d1182faf0de
tree77db23fe97a14b631290a5d615b803eae1142121
parentd28cf91e7ffb1b60885317f516b801ff55329d54
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