From: Luca Barbato <lu_zero@gentoo.org>
To: musl@lists.openwall.com
Subject: [rfc] gnuconfig and musl
Date: Wed, 13 Jun 2012 07:48:58 +0200 [thread overview]
Message-ID: <4FD829CA.4010905@gentoo.org> (raw)
gnuconfig[1] is a set of updated config.sub and config.guess file for
autotools.
That had been the first change I needed to get gcc to bootstrap in
cross-compile mode from musl.
--- /usr/share/gnuconfig/config.sub.old 2012-06-13 07:26:51.633062078 +0200
+++ /usr/share/gnuconfig/config.sub 2012-06-13 07:26:38.652062564 +0200
@@ -124,7 +124,7 @@
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc |
linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | linux-musl* |\
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -1372,7 +1372,7 @@
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -linux-newlib* | -linux-uclibc* | -linux-musl* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
That bit is enough to get a bare-metal-libc bootstrap of gcc. (so it
expect $sysroot/include and $sysroot/lib instead of $sysroot/usr/lib)
In addition in order to workaround musl incomplete support for
-D_XOPEN_STUFF
The following line should be added to config.site (that also fixes all
the other autotools based programs)
cat /usr/share/config.site
[[ ${CTARGET/-musl/} != $CTARGET ]] && CFLAGS+=" -D_GNU_SOURCE"
[[ ${CHOST/-musl/} != $CHOST ]] && CFLAGS+=" -D_GNU_SOURCE"
I hope it helps.
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
next reply other threads:[~2012-06-13 5:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 5:48 Luca Barbato [this message]
2012-06-13 9:02 ` John Spencer
2012-06-13 9:05 ` Luca Barbato
2012-06-13 9:26 ` John Spencer
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=4FD829CA.4010905@gentoo.org \
--to=lu_zero@gentoo.org \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).