|
|
Message-ID: <4FD829CA.4010905@gentoo.org>
Date: Wed, 13 Jun 2012 07:48:58 +0200
From: Luca Barbato <lu_zero@...too.org>
To: musl@...ts.openwall.com
Subject: [rfc] gnuconfig and musl
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
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.