Re : Re: glibtool question
Re : Re: glibtool question
- Subject: Re : Re: glibtool question
- From: plumber Idraulico <email@hidden>
- Date: Sun, 27 Nov 2005 20:42:08 +0100
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% ) ?
GCC 2.95.2
When building a shared library, gcc will compile additional code
to be included in the library.
That additional code must also be compiled with the proper PIC
option.
gcc -c -fPIC myfile.c
gcc -shared -o libmyfile.so -fPIC myfile.o
http://developer.apple.com/releasenotes/DeveloperTools/GCC4.html
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}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden