From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1099 Path: news.gmane.org!not-for-mail From: Luca Barbato Newsgroups: gmane.linux.lib.musl.general Subject: [rfc] gnuconfig and musl Date: Wed, 13 Jun 2012 07:48:58 +0200 Message-ID: <4FD829CA.4010905@gentoo.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1339566547 28652 80.91.229.3 (13 Jun 2012 05:49:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2012 05:49:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1100-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jun 13 07:49:06 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SegS0-0005DD-PU for gllmg-musl@plane.gmane.org; Wed, 13 Jun 2012 07:49:04 +0200 Original-Received: (qmail 28477 invoked by uid 550); 13 Jun 2012 05:49:04 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 28465 invoked from network); 13 Jun 2012 05:49:04 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120529 Thunderbird/12.0.1 X-Enigmail-Version: 1.5pre Xref: news.gmane.org gmane.linux.lib.musl.general:1099 Archived-At: 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