public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "raj.khem at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/115368] New: Wrong order of gcc include paths on musl systems
Date: Thu, 06 Jun 2024 07:00:58 +0000	[thread overview]
Message-ID: <bug-115368-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             reply	other threads:[~2024-06-06  7:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06  7:00 raj.khem at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-115368-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).