[PATCH] nptl: proper soname handling

Arnaud Lacombe lacombar at gmail.com
Sat Apr 24 18:06:03 UTC 2010


Hi,

On Fri, Apr 23, 2010 at 8:36 PM, Kevin Day <thekevinday at gmail.com> wrote:
>>  > Since it seems that ld.so soname is hardcoded in GCC. If you want to
>>  > use something else than /lib/ld-uClibc.so.0 as dynamic linker, you also
>>  > need to update GCC default configration, create alternate specfile
>>  > overriding the hardcoded -dynamic-linker, or pass-in
>>  > -Wl,-dynamic-linker,...
>>  > when compiling.
>>
>> Hmm, I didn't realize GCC hardcoded that. I'll push a fix.
>>
>>  -Austin
>
> I have a gcc patch that gives compile time freedom to do just that.
> This patch is sort of hackish, but gets all archs I was able to find
> at the time.
> It adds 3 configure commands:
> --with-dynamic-linker=$PATH
> --with-dynamic-linker-prefix=$PATH
> --with-nostdinc
>
> The dynamic-linker is the linker name, such as ld-uClibc.so.0
> The prefix one allows one to dynamically at configure time set either
> '/lib' or '/lib64'
> The nostdinc tells gcc to ignore standard includes during compile time
>
All these settings can be changed dynamically hacking gcc's specfile.
You Just need to get the default specfile with -dumpspec, change
values and tell gcc to use the new file with -specs=. It might be less
flexible, but doesn't require rebuilding gcc. This should work with
every gcc 4.x, older gcc were using an external specfile.

 - Arnaud


More information about the uClibc mailing list