bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible bug with using "-static" and "-dynamic" on the same command


From: Soeren Gerlach
Subject: Possible bug with using "-static" and "-dynamic" on the same command
Date: Tue, 20 Jun 2006 19:29:58 +0200 (CEST)
User-agent: SquirrelMail/1.4.4

Hello,

we're currently following a bug with a special system setup where we need to 
run a
special version of the Intel C++ compiler (icc) and binutils together. The 
setup is as
following:

- Suse Linux "SLES9 (SP1)"
- Hardware: Dual-Xeon x86
- icc 8.0
- binutils 2.15.90.0.1.1

Due to a bug in binutils in this version which is reported here
http://sourceware.org/ml/binutils/2004-10/msg00123.html shared libraries cannot 
be build
and used under certain circumstances. This bug has been reported to Intel (see
http://www.intel.com/support/performancetools/c/linux/sb/CS-022753.htm for 
details) but
obviously this is due to the above described problem in the ld tool.

I tried to use a newer version of binutils (2.15.94 wich comes as part of a 
SLES upgrade
to SP3 and a  freshly self compiled 2.16.1) but both version now show me the 
following
error when trying to compile a shared library: "-static and -shared may not be 
used
together"

I forced the compiler to show the link command which looks like that:

/usr/bin/ld    /usr/lib/crti.o /opt/intel_cc_80/lib/crtxi.o -shared 
--version-script
/opt/intel_cc_80/lib/icrt.internal.map -o .objs/libExceptionTest.so 
.objs/testExLib.o -L
. -Qy -L/opt/intel_cc_80/lib -L/usr/lib -Bstatic -limf -Bdynamic -lm -Bstatic 
-Bdynamic
-lcprts -lcxa -lunwind -Bdynamic -Bstatic -lirc -Bdynamic -lc -Bstatic -lirc
/opt/intel_cc_80/lib/crtxn.o /usr/lib/crtn.o


I don't understand the problem at all. "-shared" means to create a shared 
library. On
the other hand "-Bstatic" means to link a library statically into the target. 
On my
oppinion (sorry, I'm only an application developer <g>) these two things are 
different
issues what is the reason they can't work together? And finally: Until 2.15.90 
it worked
and only from  2.15.94 and above this seems to be "broken".


Thanks a lot in advance,
Soeren Gerlach

---------------------------------------------
Quanteam GbR
Partners: Dr. Bernd Engelmann, Soeren Gerlach
Basaltstrasse 28
D-60487 Frankfurt






reply via email to

[Prev in Thread] Current Thread [Next in Thread]