Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Sat, 27 Jul 2013 20:48:46 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Fixing gcc paths for musl

A longstanding issue with using gcc with musl has been that the
gcc installs its own versions of a number of ISO C headers (basically,
the ones for a freestanding implementation) in its own include
directory and puts that ahead of /usr/include in the search path
order. Some people have been solving this by patching those headers
not to conflict with musl so badly, while others (myself included)
have been just deleting the offending headers after installing, but
the real fix is to make gcc aware that it should have a different
search order for musl that searches the libc headers before its own
versions. This allows use of the useful gcc headers (e.g. the ones for
intrinsics) while letting the libc headers override for libc things.

The attached patch (against gcc 4.6.3 but the idea is the same for
other versions) attempts to do this the same was it's done in
gcc/config/openbsd.h and gcc/config/netbsd.h. It's untested and just
to get an idea of what I'd like to do. My hope is that this can be
merged into Gregor's musl-cross gcc patch to make a universal gcc
patch that covers all the issues needed for using gcc with musl, so
that you can just apply it and install.

For reference, musl-cross repo is here:

https://bitbucket.org/GregorR/musl-cross/

Rich

View attachment "gcc-path.diff" of type "text/plain" (718 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.