i have an another question about pic or non pic objects stored
inside a library archive
if i do something like this :
gcc \
-dynamiclib \
-undefined suppress \
-flat_namespace \
-single_module \
-all_load ./libMy.a \
-install_name /usr/local/lib/libMy.1.dylib \
-compatibility_version 1
-current_version 1.3
-o libMy.1.0.dylib \
-lz
1 - is there an importance that stored objects have been built with
the pic or non-pic option ?
because the "normal" way is
gcc -dynamiclib *.pic.o \
-install_name /usr/local/lib/libMy.1.dylib \
-compatibility_version 1
-current_version 1.3
-o libMy.1.0.dylib \
-lz
and
ar rc libMy.a *.non-pic.o
2 - is it normal that the lib archive has a bigger size than the
shared archive ( +15% ) ?
gcc3 gcc2 gcc4 ? and -fPIC
this has an importance under Linux
but for a mach-o archive ?
this case can be found ?
prelink: /usr/bin/mybin: Cannot prelink against non-PIC shared library
/usr/lib/libMy.dylib
3 - is there an importance that stored objects have been built
with the pic option in a library archive ?
gcc -dynamiclib *.pic.o \
-install_name /usr/local/lib/ libMyOther.1.dylib \
-compatibility_version 1
-current_version 1.3
-o libMyOther.1.0.dylib \
-lz ./libMy.a
Best Regards, {Plum}