Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 2 Oct 2014 16:31:14 -0400
From: stephen Turner <stephen.n.turner@...il.com>
To: musl@...ts.openwall.com
Subject: Re: converting gcc from glibc to musl

since patching with the recommended patch (the one i had wasnt a full patch
apparently) i have been able to use this option --host=i686-linux-musl
however now when i compile i run into new issues.

Firstly gmp, mpfr, and mpc do not like this flag obviously since they do
not have the musl settings patched in so i cant compile with the musl
wrapper because i cannot include those math libraries and when i try to
prebuild them and use the flag --with-mpfr=/target/location it errors out
saying it cant find any compatible versions of these libs/headers.

that brings me to compiling without the musl wrapper but with
--host=i686-linux-musl and that does work until you try to run the binary
of gcc made static which gives the error cant execute or doesnt exist.
Checking with ldd shows its static so the binary itself is corrupted in
some way.

My question now becomes, what would be the troubleshooting steps to see how
its broke if possible?

On Wed, Oct 1, 2014 at 4:54 PM, Samuel Holland <samuel@...lland.net> wrote:

> On 10/01/2014 03:34 PM, stephen Turner wrote:
>
>> Yea i had to patch gcc just to get it to compile which due to various
>> issues i have only gotten to run on the target musl system when i use
>> the musl wrapper to compile gcc.
>>
>> how would i go about fixing this linker issue? is it with binutils, gcc,
>> or musl?
>>
>
> See lines 77-79 of the musl-cross patch. When you set your triple to
> i686-linux-musl instead of i686-linux-gnu, it sets musl as the default
> linker. You didn't, so it defaults to glibc, but you can still tell it to
> use musl manually, either by putting -mmusl in CFLAGS or the command line,
> or by editing the specs file, like the musl-gcc wrapper does.
>
> Once you get it working, though, I recommend recompiling gcc with
> --host=i686-linux-musl
>
>
> --
> Regards,
> Samuel Holland <samuel@...lland.net>
>

Content of type "text/html" skipped

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.