From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 78E94390A352; Thu, 6 Jun 2024 07:00:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78E94390A352 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717657259; bh=xcruqDum2nPEaZA6/5YP02kl48j7+BQPCZVWM1hnXsE=; h=From:To:Subject:Date:From; b=ksHnap5UoUONLSRPMEGEYAa/8XhWC/lxAmPGjWYjO58tDiUsx+k+Ygb/hEF1ExB31 5vVaq7U6E02g/ct4P7T5NQ38z1CWT9Z6MxEhONEtDLXnA8ok60phoPBAO39jqOgU4Q CsnWRDe7IHyxkVJz4hANdN9HhPy3SNXTQdPQ+w3Y= From: "raj.khem at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 14.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: raj.khem at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115368 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 -ipre= fix 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 installat= ion 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.=20 [1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/12477#note_145159=