public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] build: Use -nostdinc generating macro_list [PR109522]
@ 2023-04-15 12:01 Xi Ruoyao
  2023-04-29 18:05 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Xi Ruoyao @ 2023-04-15 12:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek, Xi Ruoyao

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index ad9a5d94cd0..eb26d5c7be5 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3215,7 +3215,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
-- 
2.40.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-06 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-15 12:01 [PATCH] build: Use -nostdinc generating macro_list [PR109522] Xi Ruoyao
2023-04-29 18:05 ` Jeff Law
2023-05-06 17:01   ` Pushed: " Xi Ruoyao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).