From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3001 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl and gcc-4.8 (sabotage) Date: Thu, 28 Mar 2013 21:56:55 -0400 Message-ID: <20130329015655.GE20323@brightrain.aerifal.cx> References: <5154D2F3.3080709@barfooze.de> <5154E1E9.8000909@barfooze.de> 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: 8bit X-Trace: ger.gmane.org 1364522231 11946 80.91.229.3 (29 Mar 2013 01:57:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Mar 2013 01:57:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3002-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 29 02:57:36 2013 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 1ULOZR-0000oP-FG for gllmg-musl@plane.gmane.org; Fri, 29 Mar 2013 02:57:33 +0100 Original-Received: (qmail 24272 invoked by uid 550); 29 Mar 2013 01:57:08 -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 24263 invoked from network); 29 Mar 2013 01:57:08 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3001 Archived-At: On Fri, Mar 29, 2013 at 02:39:03AM +0100, Daniel Cegiełka wrote: > diff -urN gcc-4.8-20130203.orig/gcc/config/linux.h gcc-4.8-20130203/gcc/config/linux.h > --- gcc-4.8-20130203.orig/gcc/config/linux.h Sun Feb 10 21:27:40 2013 > +++ gcc-4.8-20130203/gcc/config/linux.h Sun Feb 10 21:45:07 2013 > @@ -32,10 +32,12 @@ > #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) > #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) > #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) > +#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) > #else > #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) > #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) > #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) > +#define OPTION_MUSL (linux_libc == LIBC_MUSL) > #endif > > #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ > @@ -53,18 +55,21 @@ > uClibc or Bionic is the default C library and whether > -muclibc or -mglibc or -mbionic has been passed to change the default. */ > > -#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ > - "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" > +#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ > + "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" > > #if DEFAULT_LIBC == LIBC_GLIBC > -#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ > - CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) > +#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ > + CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) > #elif DEFAULT_LIBC == LIBC_UCLIBC > -#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ > - CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) > +#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ > + CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) > #elif DEFAULT_LIBC == LIBC_BIONIC > -#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ > - CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) > +#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ > + CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) > +#elif DEFAULT_LIBC == LIBC_MUSL > +#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ > + CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) > #else > #error "Unsupported DEFAULT_LIBC" > #endif /* DEFAULT_LIBC */ > @@ -81,19 +86,23 @@ > #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" > #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" > #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" > +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl.so.1" This is almost certainly wrong. > diff -r 45cd88d4fb7b -r 0afd9d82498d libgomp/config/posix/time.c > --- a/libgomp/config/posix/time.c Wed Nov 21 21:19:19 2012 -0500 > +++ b/libgomp/config/posix/time.c Wed Nov 21 21:20:22 2012 -0500 > @@ -28,6 +28,8 @@ > The following implementation uses the most simple POSIX routines. > If present, POSIX 4 clocks should be used instead. */ > > +#define _POSIX_C_SOURCE 199309L /* for clocks */ > + > #include "libgomp.h" > #include > #if TIME_WITH_SYS_TIME > diff -r 0afd9d82498d -r 53f3e21a7d14 gcc/config/i386/linux.h > --- a/gcc/config/i386/linux.h Wed Nov 21 21:20:22 2012 -0500 > +++ b/gcc/config/i386/linux.h Wed Nov 21 21:21:21 2012 -0500 > @@ -22,3 +22,4 @@ > > #define GNU_USER_LINK_EMULATION "elf_i386" > #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" > +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl.so.1" This too. > diff -r 53f3e21a7d14 -r 0a4e297edad6 libitm/config/arm/hwcap.cc > --- a/libitm/config/arm/hwcap.cc Wed Nov 21 21:21:21 2012 -0500 > +++ b/libitm/config/arm/hwcap.cc Wed Nov 21 21:21:54 2012 -0500 > @@ -40,7 +40,11 @@ > > #ifdef __linux__ > #include > +#ifdef __GLIBC__ > #include > +#else > +#include > +#endif > #include This should just unconditionally be . is wrong. > # Disable libsanitizer on unsupported systems. > -if test -d ${srcdir}/libsanitizer; then > - if test x$enable_libsanitizer = x; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsanitizer support" >&5 > -$as_echo_n "checking for libsanitizer support... " >&6; } > - if (srcdir=${srcdir}/libsanitizer; \ > - . ${srcdir}/configure.tgt; \ > - test -n "$UNSUPPORTED") > - then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 > -$as_echo "no" >&6; } > - noconfigdirs="$noconfigdirs target-libsanitizer" > - else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 > -$as_echo "yes" >&6; } > - fi > - fi > -fi > +noconfigdirs="$noconfigdirs target-libsanitizer" That works... :-) Rich