public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/115368] New: Wrong order of gcc include paths on musl systems
@ 2024-06-06  7:00 raj.khem at gmail dot com
  2024-06-06  7:03 ` [Bug driver/115368] " raj.khem at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: raj.khem at gmail dot com @ 2024-06-06  7:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115368

            Bug ID: 115368
           Summary: Wrong order of gcc include paths on musl systems
           Product: gcc
           Version: 14.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raj.khem at gmail dot com
  Target Milestone: ---

When doing cross-builds targeting musl based systems, gcc driver adds -iprefix
to cc1/cc1plus call, the path is based on gcc cross compiler installation
location, and points to GCC private headers which override some of system
headers e.g. stddef.h stdint.h, stdarg.h to name a few. This works ok with
glibc based systems but musl does not depend/use gcc's private headers [1] and
-iprefix prepends to search path which means the headers from gcc installation
will be picked up first. This causes problems e.g. when configuring python
build, it tries to detect platform and logic to detect musl system is based on
musl specific define coming from stdarg.h, however musl cross gcc feeds the
gcc's own stdarg.h header and the test fails. 

[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/12477#note_145159

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

end of thread, other threads:[~2024-06-06 18:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-06  7:00 [Bug driver/115368] New: Wrong order of gcc include paths on musl systems raj.khem at gmail dot com
2024-06-06  7:03 ` [Bug driver/115368] " raj.khem at gmail dot com
2024-06-06 16:56 ` raj.khem at gmail dot com
2024-06-06 18:33 ` redi at gcc dot gnu.org
2024-06-06 18:40 ` pinskia at gcc dot gnu.org
2024-06-06 18:42 ` pinskia at gcc dot gnu.org
2024-06-06 18:47 ` pinskia 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).