public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/109522] New: Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler
@ 2023-04-15 7:42 xry111 at gcc dot gnu.org
2023-04-15 7:53 ` [Bug other/109522] " jakub at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-04-15 7:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109522
Bug ID: 109522
Summary: Spurious "cc1: error: no include path in which to
search for stdc-predef.h" building a cross compiler
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: xry111 at gcc dot gnu.org
Target Milestone: ---
Build a cross compiler (with target libc not installed yet):
../gcc/configure --target=loongarch64-linux-gnu --disable-multilib
--with-system-zlib && make gcc
Then a spurious message is outputted for macro_list:
echo | /home/xry111/git-repos/gcc-la/./gcc/xgcc
-B/home/xry111/git-repos/gcc-la/./gcc/ -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
cc1: error: no include path in which to search for stdc-predef.h
/bin/sh ../../gcc/gcc/../move-if-change tmp-macro_list macro_list
Though the macro_list file is created successfully, the message can lead people
to think something is wrong.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/109522] Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler
2023-04-15 7:42 [Bug other/109522] New: Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler xry111 at gcc dot gnu.org
@ 2023-04-15 7:53 ` jakub at gcc dot gnu.org
2023-04-15 11:45 ` xry111 at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-15 7:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109522
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I bet we really don't need the macros from stdc-predef.h, so perhaps we could
use -nostdinc.
stdc-predef.h currently (sometimes) predefines
__STDC_IEC_559__
__STDC_IEC_60559_BFP__
__STDC_IEC_559_COMPLEX__
__STDC_IEC_60559_COMPLEX__
__STDC_ISO_10646__
and grep doesn't find any STDC_IEC nor STDC_ISO occurrences in fixincl.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/109522] Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler
2023-04-15 7:42 [Bug other/109522] New: Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler xry111 at gcc dot gnu.org
2023-04-15 7:53 ` [Bug other/109522] " jakub at gcc dot gnu.org
@ 2023-04-15 11:45 ` xry111 at gcc dot gnu.org
2023-04-15 12:02 ` xry111 at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-04-15 11:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109522
--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> I bet we really don't need the macros from stdc-predef.h, so perhaps we
> could use -nostdinc.
> stdc-predef.h currently (sometimes) predefines
> __STDC_IEC_559__
> __STDC_IEC_60559_BFP__
> __STDC_IEC_559_COMPLEX__
> __STDC_IEC_60559_COMPLEX__
> __STDC_ISO_10646__
> and grep doesn't find any STDC_IEC nor STDC_ISO occurrences in fixincl.
Yes, these macros are some sort of "modern" (stdc-predef.h was firstly added to
Glibc in 2012), and it's unlikely anyone has ever used them in a broken way
(without "__").
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/109522] Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler
2023-04-15 7:42 [Bug other/109522] New: Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler xry111 at gcc dot gnu.org
2023-04-15 7:53 ` [Bug other/109522] " jakub at gcc dot gnu.org
2023-04-15 11:45 ` xry111 at gcc dot gnu.org
@ 2023-04-15 12:02 ` xry111 at gcc dot gnu.org
2023-05-06 16:59 ` cvs-commit at gcc dot gnu.org
2023-05-06 17:01 ` xry111 at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-04-15 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109522
Xi Ruoyao <xry111 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2023-April/6
| |15791.html
--- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Posted the patch adding -nostdinc for review.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/109522] Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler
2023-04-15 7:42 [Bug other/109522] New: Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler xry111 at gcc dot gnu.org
` (2 preceding siblings ...)
2023-04-15 12:02 ` xry111 at gcc dot gnu.org
@ 2023-05-06 16:59 ` cvs-commit at gcc dot gnu.org
2023-05-06 17:01 ` xry111 at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-06 16:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109522
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Xi Ruoyao <xry111@gcc.gnu.org>:
https://gcc.gnu.org/g:be6c13d5cef6fd9ca97dea7a6f5fbf93c51235b5
commit r14-544-gbe6c13d5cef6fd9ca97dea7a6f5fbf93c51235b5
Author: Xi Ruoyao <xry111@xry111.site>
Date: Sat Apr 15 19:55:50 2023 +0800
build: Use -nostdinc generating macro_list [PR109522]
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).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/109522] Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler
2023-04-15 7:42 [Bug other/109522] New: Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler xry111 at gcc dot gnu.org
` (3 preceding siblings ...)
2023-05-06 16:59 ` cvs-commit at gcc dot gnu.org
@ 2023-05-06 17:01 ` xry111 at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-05-06 17:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109522
Xi Ruoyao <xry111 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Known to fail| |13.1.0
Known to work| |14.0
--- Comment #5 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Fixed for 14.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-06 17:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-15 7:42 [Bug other/109522] New: Spurious "cc1: error: no include path in which to search for stdc-predef.h" building a cross compiler xry111 at gcc dot gnu.org
2023-04-15 7:53 ` [Bug other/109522] " jakub at gcc dot gnu.org
2023-04-15 11:45 ` xry111 at gcc dot gnu.org
2023-04-15 12:02 ` xry111 at gcc dot gnu.org
2023-05-06 16:59 ` cvs-commit at gcc dot gnu.org
2023-05-06 17:01 ` xry111 at gcc dot gnu.org
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).