mailing list of musl libc
 help / color / mirror / code / Atom feed
* RE: problems with dynamic linking since 0.9.1
@ 2013-08-14 22:26 writeonce
  0 siblings, 0 replies; 22+ messages in thread
From: writeonce @ 2013-08-14 22:26 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/html, Size: 2502 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread
* problems with dynamic linking since 0.9.1
@ 2013-08-13 10:39 Jens
  2013-08-13 11:07 ` Szabolcs Nagy
  2013-08-15  3:29 ` Rob Landley
  0 siblings, 2 replies; 22+ messages in thread
From: Jens @ 2013-08-13 10:39 UTC (permalink / raw)
  To: musl


Hello!

Dynamic linking with musl has stopped working for me since musl 0.9.1.
I havent tested all versions but 0.9.6 and 0.9.12 does not work.

Im still using that strange uclibc environment where gcc is itself a 
wrapper that calls rawgcc.

Info for 0.9.1 and 0.9.12 below.

Any ideas or pointers welcome.

Regards,
Jens

0.9.1 (working):
bash-4.1# musl-gcc -v t.o
Using built-in specs.
Reading specs from /opt/musl/lib/musl-gcc.specs
rename spec cpp_options to old_cpp_options
rename spec link to old_link
Target: x86_64-unknown-linux
Configured with: 
/home/landley/firmware-0.9.6/build/temp-x86_64/gcc-core/configure 
--prefix=/home/landley/firmware-0.9.6/build/mini-native-x86_64/usr 
--disable-multilib --build=x86_64-walrus-linux --host=x86_64-unknown-linux 
--target=x86_64-unknown-linux --enable-long-long --enable-c99 
--enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-nls 
--enable-languages=c,c++ --disable-libstdcxx-pch --enable-sjlj-exceptions 
--program-prefix=
Thread model: posix
gcc version 4.1.2
  /usr/bin/../libexec/gcc/x86_64-unknown-linux/4.1.2/collect2 
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 
-dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib /opt/musl/lib/crt1.o 
/opt/musl/lib/crti.o /usr/gcc/lib/crtbegin.o -L/opt/musl/lib t.o 
/usr/gcc/lib/libgcc.a /usr/gcc/lib/libgcc_eh.a -lc /usr/gcc/lib/libgcc.a 
/usr/gcc/lib/libgcc_eh.a /usr/gcc/lib/crtend.o /opt/musl/lib/crtn.o

# cat /opt/musl/lib/musl-gcc.specs
%rename cpp_options old_cpp_options

*cpp_options:
-nostdinc -isystem /opt/musl/include %(old_cpp_options)

*cc1:
%(cc1_cpu) -nostdinc -isystem /opt/musl/include

*link_libgcc:
-L/opt/musl/lib

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

*startfile:
%{!shared: /opt/musl/lib/%{pie:S}crt1.o} /opt/musl/lib/crti.o 
%{shared|pie:crtbeginS.o%s;:/usr/gcc/lib/crtbegin.o%s}

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

%rename link old_link

*link:
%(old_link) -dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib

*esp_link:


*esp_options:


*esp_cpp_options:

0.9.12 (non working):
bash-4.1# musl-gcc -v t.o
Using built-in specs.
Reading specs from /opt/musl/lib/musl-gcc.specs
rename spec cpp_options to old_cpp_options
Target: x86_64-unknown-linux
Configured with: 
/home/landley/firmware-0.9.6/build/temp-x86_64/gcc-core/configure 
--prefix=/home/landley/firmware-0.9.6/build/mini-native-x86_64/usr 
--disable-multilib --build=x86_64-walrus-linux --host=x86_64-unknown-linux 
--target=x86_64-unknown-linux --enable-long-long --enable-c99 
--enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-nls 
--enable-languages=c,c++ --disable-libstdcxx-pch --enable-sjlj-exceptions 
--program-prefix=
Thread model: posix
gcc version 4.1.2
  /usr/bin/../libexec/gcc/x86_64-unknown-linux/4.1.2/collect2 
-dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib /opt/musl/lib/crt1.o 
/opt/musl/lib/crti.o /usr/gcc/lib/crtbegin.o -L/opt/musl/lib -L /lib/. t.o 
/usr/gcc/lib/libgcc.a /usr/gcc/lib/libgcc_eh.a -lc /usr/gcc/lib/libgcc.a 
/usr/gcc/lib/libgcc_eh.a /usr/gcc/lib/crtend.o /opt/musl/lib/crtn.o
/opt/musl/lib/libc.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

# cat /opt/musl/lib/musl-gcc.specs
%rename cpp_options old_cpp_options

*cpp_options:
-nostdinc -isystem /opt/musl/include -isystem include%s %(old_cpp_options)

*cc1:
%(cc1_cpu) -nostdinc -isystem /opt/musl/include -isystem include%s

*link_libgcc:
-L/opt/musl/lib -L .%s

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

*startfile:
%{!shared: /opt/musl/lib/%{pie:S}crt1.o} /opt/musl/lib/crti.o 
%{shared|pie:crtbeginS.o%s;:/usr/gcc/lib/crtbegin.o%s}

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

*link:
-dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib %{shared:-shared} 
%{static:-static} %{rdynamic:-export-dynamic}

*esp_link:


*esp_options:


*esp_cpp_options:




^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-08-16  8:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14 22:26 problems with dynamic linking since 0.9.1 writeonce
  -- strict thread matches above, loose matches on Subject: below --
2013-08-13 10:39 Jens
2013-08-13 11:07 ` Szabolcs Nagy
2013-08-13 11:18   ` Jens
2013-08-13 14:53     ` Szabolcs Nagy
2013-08-13 16:00       ` Rich Felker
2013-08-15  3:14         ` Rob Landley
2013-08-13 17:14       ` Jens
2013-08-13 18:03         ` Rich Felker
2013-08-14  9:06           ` Jens
2013-08-14 14:27             ` Rich Felker
2013-08-14 14:49               ` Szabolcs Nagy
2013-08-14 14:51                 ` Rich Felker
2013-08-14 20:47                   ` Jens
2013-08-14 20:58                     ` Rich Felker
2013-08-15 21:19                 ` Rob Landley
2013-08-14 14:51               ` Jens
2013-08-15  3:43         ` Rob Landley
2013-08-15  9:05           ` Jens
2013-08-16  8:28             ` Rob Landley
2013-08-15  2:17       ` Rob Landley
2013-08-15  3:29 ` Rob Landley

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).