]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
configure.ac: Use nostdlib when checking for nostdinc
authorVladimir Serbinenko <phcoder@google.com>
Mon, 25 Mar 2019 15:09:04 +0000 (16:09 +0100)
committerVladimir Serbinenko <phcoder@google.com>
Tue, 26 Mar 2019 13:59:33 +0000 (14:59 +0100)
With clang nostdinc behaviour is influenced by nostdlib. Since we
always add nostdlib, add it in test as well

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Vladimir Serbinenko <phcoder@google.com>
configure.ac

index 05d040cd6e77460316b00328a1a6110b5f6c5406..2f53a5683a01f3c57cb5a82ff45f9f58f0fd6f3a 100644 (file)
@@ -1395,7 +1395,7 @@ AC_SUBST(TARGET_NMFLAGS_DEFINED_ONLY)
 if test "$platform" != emu; then
 AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [
   SAVED_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
+  CPPFLAGS="$TARGET_CPPFLAGS -nostdlib -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
 #include <stddef.h>
 int va_arg_func (int fixed, va_list args);]], [[]])],