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

Preferred way to build shared objects from PIC archives?



The shared libraries in ncbi-tools6 and related packages currently
start out as static archives of PIC objects, which then get turned
into shared libraries with commands of the form

gcc  -shared -Wl,-soname=libddvlib.so.6 -o libddvlib.so.6.1.20020426 \
    -Wl,-whole-archive libddvlib.a -Wl,-no-whole-archive

This (admittedly roundabout) procedure works fine on i386, and has
worked on other platforms until now, but as of some time in the past
three months has started failing on arm with

/usr/lib/gcc-lib/arm-linux/2.95.4/libgcc.a(__dummy.o): In function `__dummy':
__dummy.o(.text+0x0): multiple definition of `__dummy'
/usr/lib/gcc-lib/arm-linux/2.95.4/libgcc.a(__dummy.o)(.text+0x0): first defined
 here

and a slew of similar messages.  Is this a toolchain bug, or am I
going about things the wrong way?  (Building the shared libraries
directly, while obviously preferable, would require too much tweaking
to the awkward upstream build system.)

Please Cc me on replies, as I do not subscribe to -devel.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
Finger amu@monk.mit.edu (NOT a valid e-mail address) for more info.



Reply to: