[Bug target/58446] New: Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 Bug ID: 58446 Summary: Support for musl libc Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bug-espfv4bhi9 at gregor dot im Created attachment 30829 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30829&action=edit gcc/ arch-generic configuration and fixes for musl The attached patches add support for targeting the musl C library for Linux, http://musl-libc.org/ The patches are: gcc-config-musl.diff: Addition of -mmusl (akin to -mglibc, -muclibc, -mbionic) for musl libc support, as well as support for using the musl ld.so, patch to stddef.h for musl size_t support, etc. Most controversially, redefines the include dir ordering iff musl is the default target. gomp-posix.diff: Not directly related to musl, a fix to libgomp to make it properly specify required POSIX version. gcc-config-dliterate.diff: gcc_cv_target_dl_iterate_phdr=yes for musl libssp.diff: Support for libcs which provide libssp functions in libc (of which musl is the only example at present) x86.diff, arm.diff, mips.diff, powerpc.diff, aarch64.diff: ld.so specification for each target and related fixes.
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #1 from Gregor Richards --- Created attachment 30830 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30830&action=edit Fix for gomp to specify _POSIX_SOURCE requirements
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #2 from Gregor Richards --- Created attachment 30831 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30831&action=edit gcc_cv_target_dl_iterate_phdr=yes on musl (note that due to a bug in making these .diffs, the configure.ac change is in libssp.diff ...)
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #3 from Gregor Richards --- Created attachment 30832 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30832&action=edit libssp support for musl
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #6 from Gregor Richards --- Created attachment 30835 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30835&action=edit mips support for musl
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #5 from Gregor Richards --- Created attachment 30834 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30834&action=edit arm support for musl
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #8 from Gregor Richards --- Created attachment 30837 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30837&action=edit aarch64 support for musl
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #7 from Gregor Richards --- Created attachment 30836 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30836&action=edit powerpc support for musl
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #4 from Gregor Richards --- Created attachment 30833 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30833&action=edit x86/x86_64 support for musl
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 --- Comment #11 from Gregor Richards --- Aha. I didn't realize such a setting already existed; I'll test and update my patch later today to use the existing mechanism. Thanks for the info.
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 Gregor Richards changed: What|Removed |Added Attachment #30831|0 |1 is obsolete|| Attachment #30832|0 |1 is obsolete|| --- Comment #12 from Gregor Richards --- Created attachment 30864 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30864&action=edit Changes to gcc/configure.ac for musl Making libssp use the same system as everything else. (I'll leave the whether-to-build-libssp debate to future generations :) )
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 Gregor Richards changed: What|Removed |Added Attachment #30834|0 |1 is obsolete|| --- Comment #13 from Gregor Richards --- Created attachment 30865 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30865&action=edit arm support for musl This change to arm.diff adds support for musl's -eb and -hf linkers (/lib/ld-musl-arm[eb][hf].so.1)
[Bug target/58446] Support for musl libc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58446 Gregor Richards changed: What|Removed |Added Attachment #30835|0 |1 is obsolete|| --- Comment #14 from Gregor Richards --- Created attachment 30866 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30866&action=edit mips support for musl And the equivalent change for MIPS (/lib/ld-musl-mips[el].so.1)