Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 21 Sep 2012 12:51:36 +0200 (CEST)
From: Jens <>
Subject: Re: musl-gcc question

On Thu, 20 Sep 2012, Rich Felker wrote:

> On Thu, Sep 20, 2012 at 04:50:13PM +0200, Jens wrote:
>> Hello!
>> Looks like musl-gcc in my uclibc environment doesn't work correctly
>> (for me):
> Aboriginal Linux? The problem is that the underlying gcc is not gcc,
> but Rob Landley's gcc wrapper which serves a similar purpose to
> musl-gcc, but using the command line rather than spec files, so it
> takes precedence. You need to either find a way to get musl-gcc to
> call the underlying gcc, or build a native toolchain.

Thank you all for the help.
I got it working now. Its the mini-native chroot from uclibcs site Im 
working in, so its pretty old.

musl-gcc changed as suggested.

I had to change the specs-file also, but I suspect its my borkish 
environment thats at fault.
Basically I need to add /usr/gcc/lib/ so the linker could find the 
objectfiles. I tried but failed to get the linker to look into other 
directories, so I changed the spec-file instead.

Incase somebody else runs into this, the (linewrap broken) patch is 

Thanks again,

--- opt/musl/lib/musl-gcc.specs.orig	Fri Sep 21 07:04:50 2012
+++ opt/musl/lib/musl-gcc.specs	Fri Sep 21 07:12:34 2012
@@ -10,13 +10,13 @@
  -L/opt/musl/lib -L .%s

-libgcc.a%s %:if-exists(libgcc_eh.a%s)
+/usr/gcc/lib/libgcc.a%s %:if-exists(/usr/gcc/lib/libgcc_eh.a%s)

-%{!shared: /opt/musl/lib/%{pie:S}crt1.o} /opt/musl/lib/crti.o 
+%{!shared: /opt/musl/lib/%{pie:S}crt1.o} /opt/musl/lib/crti.o 

-%{shared|pie:crtendS.o%s;:crtend.o%s} /opt/musl/lib/crtn.o
+%{shared|pie:crtendS.o%s;:/usr/gcc/lib/crtend.o%s} /opt/musl/lib/crtn.o

  -dynamic-linker /lib/ -nostdlib %{shared:-shared} 
%{static:-static} %{rdynamic:-export-dynamic}

> Rich

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.