mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens <jensl@laas.mine.nu>
To: musl@lists.openwall.com
Subject: problems with dynamic linking since 0.9.1
Date: Tue, 13 Aug 2013 12:39:52 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.10.1308131112290.7612@laas.mine.nu> (raw)


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:




             reply	other threads:[~2013-08-13 10:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 10:39 Jens [this message]
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
2013-08-14 22:26 writeonce

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=alpine.LNX.2.10.1308131112290.7612@laas.mine.nu \
    --to=jensl@laas.mine.nu \
    --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).