From: "Daniel Cegiełka" <daniel.cegielka@gmail.com>
To: musl@lists.openwall.com
Subject: Re: musl and gcc-4.8 (sabotage)
Date: Fri, 29 Mar 2013 12:07:33 +0100 [thread overview]
Message-ID: <CAPLrYESfUMGz3JXhsv2QB4rwTDkg80aVQBf0aanV8jRuNmj6Mw@mail.gmail.com> (raw)
In-Reply-To: <20130329015655.GE20323@brightrain.aerifal.cx>
2013/3/29 Rich Felker <dalias@aerifal.cx>:
> 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.
What solution do you suggest? Below is the code, which was used for gcc-4.8:
https://bitbucket.org/GregorR/musl-cross/src/74d6e78976bda668af0046f4514cbce1f363c6cd/patches/gcc-4.7.2-musl.diff?at=default
Daniel
next prev parent reply other threads:[~2013-03-29 11:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 20:38 Daniel Cegiełka
2013-03-28 23:32 ` John Spencer
2013-03-28 23:46 ` Daniel Cegiełka
2013-03-28 23:58 ` Daniel Cegiełka
2013-03-29 0:07 ` Rich Felker
2013-03-29 9:42 ` Szabolcs Nagy
2013-03-29 0:35 ` John Spencer
2013-03-29 1:39 ` Daniel Cegiełka
2013-03-29 1:56 ` Rich Felker
2013-03-29 11:07 ` Daniel Cegiełka [this message]
2013-03-29 11:25 ` Szabolcs Nagy
2013-03-29 14:13 ` Daniel Cegiełka
2013-03-29 15:19 ` Szabolcs Nagy
2013-03-29 15:38 ` Daniel Cegiełka
2013-03-30 9:51 ` Daniel Cegiełka
2013-03-29 2:10 ` 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=CAPLrYESfUMGz3JXhsv2QB4rwTDkg80aVQBf0aanV8jRuNmj6Mw@mail.gmail.com \
--to=daniel.cegielka@gmail.com \
--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).