[OE-core] [PATCH] cracklib, zlib: install to /lib instead of /usr/libxx
Yao Zhao
yao.zhao at windriver.com
Wed Aug 8 13:36:30 UTC 2012
On 12-08-08 09:25 AM, Phil Blundell wrote:
> On Wed, 2012-08-08 at 09:24 -0400, Yao Zhao wrote:
>> I want both libz.a and libz.so* in /lib.
>>
>> I wrote a simple test case:
>> cat Makefile
>> all:
>> gcc -c -fPIC -DPIC -o test.o test.c -g
>> gcc -o libtest.so -shared test.o
>> gcc -c -o test_main.o test_main.c -g
>> ar rc libtest.a test.o
>> mv libtest.a usr/lib
>> mv libtest.so lib
>> gcc -o test_main_static test_main.o -L./usr/lib -L./lib -ltest
>> gcc -o test_main_shared test_main.o -L./lib -L./usr/lib -ltest
>>
>> If don't install to same directory then it will have problems.
> That testcase isn't terribly representative since you have libtest.so
> being the actual shared library. In the zlib case, since it has a
> proper SONAME, libz.so.1 and libz.so are distinct.
Slightly modified:
cat Makefile
all:
gcc -c -fPIC -DPIC -o test.o test.c -g
gcc -o libtest.so.1.2 -Wl,-soname,libtest.so.1 -shared test.o
gcc -c -o test_main.o test_main.c -g
ar rc libtest.a test.o
ln -s libtest.so.1.2 libtest.so.1
ln -s libtest.so.1.2 libtest.so
mv libtest.a usr/lib
mv libtest.so* lib
gcc -o test_main_static test_main.o -L./usr/lib -L./lib -ltest
gcc -o test_main_shared test_main.o -Llib -L./usr/lib -ltest
yao
> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list