[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-22 Thread aph at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #13 from Andrew Haley 2010-11-22 10:12:04 UTC --- Sure, but not everyone uses the driver, some use ld directly. I might as well ask: why not? libc is linked this way on GNU/Linux systems too. It's easy and convenient. I don't know

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-22 Thread christophe.lyon at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #12 from christophe.lyon at st dot com 2010-11-22 10:06:07 UTC --- Yes, I appreciate your help very much (and I spent quite some time investigating on my own before deciding to bother you). Now, I am sorry to insist, but it's still unc

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-22 Thread aph at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 Andrew Haley changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-22 Thread christophe.lyon at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #10 from christophe.lyon at st dot com 2010-11-22 09:01:19 UTC --- However, I'd like to ask a question: why use a link script in libgcc_s.so, rather than having the driver link with -lgcc?

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-22 Thread christophe.lyon at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #9 from christophe.lyon at st dot com 2010-11-22 08:50:20 UTC --- Indeed the build script explicitly removes libgcc_s.so and replaces it with a symlink to libgcc_s.so.1 I am going to have a discussion with the colleague who originally

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-22 Thread christophe.lyon at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #8 from christophe.lyon at st dot com 2010-11-22 08:39:45 UTC --- Yes, it is a gnueabi; -v says: Configured with: ../configure --target=arm-cortex-linux-gnueabi --program-prefix=arm-linux- --enable-languages=c,c++ --enable-threads=posix

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-19 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #7 from Mikael Pettersson 2010-11-19 17:38:35 UTC --- The example works for me also with a cross built from gcc-4.5.1 with --enable-shared --enable-languages=c,c++. > armv5tel-unknown-linux-gnueabi-g++ atomic.cxx -fPIC -shared -o lib

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-19 Thread aph at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #6 from Andrew Haley 2010-11-19 17:30:35 UTC --- I am cross-compiling too. Try this: $ cat /home/aph/x-arm/install/arm-linux-gnueabi/lib/libgcc_s.so /* GNU ld script Use the shared library, but some functions are only in the

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-19 Thread christophe.lyon at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #5 from christophe.lyon at st dot com 2010-11-19 16:49:05 UTC --- I am not sure what you mean about "libgcc_s.so linker script". But I think the difference is that I am cross-compiling.

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-19 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 Mikael Pettersson changed: What|Removed |Added CC||mikpe at it dot uu.se --- Comment #4

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-19 Thread christophe.lyon at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #3 from christophe.lyon at st dot com 2010-11-19 16:12:11 UTC --- Yes. I did find this workaround myself, but I was very surprised I had to do it manually. (As I said, the problem arised when building QT, and I guess I'm not the first

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-19 Thread aph at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #2 from Andrew Haley 2010-11-19 16:09:00 UTC --- If you try linking with "-lgcc_s -lgcc", does everything then work?

[Bug driver/46563] link with -lgcc when creating a shared lib

2010-11-19 Thread christophe.lyon at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46563 --- Comment #1 from christophe.lyon at st dot com 2010-11-19 16:05:16 UTC --- Created attachment 22458 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22458 shared lib C++ source