]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
build: Use -nostdinc generating macro_list [PR109522]
authorXi Ruoyao <xry111@xry111.site>
Sat, 15 Apr 2023 11:55:50 +0000 (19:55 +0800)
committerXi Ruoyao <xry111@xry111.site>
Sat, 6 May 2023 16:58:05 +0000 (00:58 +0800)
This prevents a spurious message building a cross-compiler when target
libc is not installed yet:

    cc1: error: no include path in which to search for stdc-predef.h

As stdc-predef.h was added to define __STDC_* macros by libc, it's
unlikely the header will ever contain some bad definitions w/o "__"
prefix so it should be safe.

gcc/ChangeLog:

PR other/109522
* Makefile.in (s-macro_list): Pass -nostdinc to
$(GCC_FOR_TARGET).

gcc/Makefile.in

index 9300b3ee7f5dbed73f0820fcadb353b74747c17d..17486585813fe4eb380887aa126503ae626ab8b1 100644 (file)
@@ -3254,7 +3254,7 @@ install-gcc-tooldir:
 
 macro_list: s-macro_list; @true
 s-macro_list : $(GCC_PASSES) cc1$(exeext)
-       echo | $(GCC_FOR_TARGET) -E -dM - | \
+       echo | $(GCC_FOR_TARGET) -nostdinc -E -dM - | \
          sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
                 -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
          sort -u > tmp-macro_list