2008-06-07 13:29:26 Jan Engelhardt napisaĆ(a): > I was compiling an authnz module and noticed that apxs2 does not pass > -fPIC to the compiler by default when compiling .c files into .slo. > Also, when passing -fPIC manually as part of the CFLAGS (command line is > `apxs2 "-Wc,-Wall -fPIC" -c foobar.c`), the -fPIC gets stripped. > libtool normally adds PIC for shared libraries, but apxs2's copy of > libtool even removes an explicitly specified -fPIC flag? > > Opensuse 10.3 i586 and x86_64, Linux 2.6.23.17, apache2 2.2.4. > > > $ touch foo.c > $ apxs2 -c foo.c -fPIC > /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic > -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 > -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o foo.lo foo.c && > touch foo.slo > /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o foo.la > -rpath /usr/lib64/apache2 -module -avoid-version foo.lo -fPIC > > > As can be seen, -fPIC is not passed to the compiler, but only to the > link stage. Any ideas?
apxs2 -Wc,-fPIC -c foo.c -- Arfrever Frehtes Taifersar Arahesis
signature.asc
Description: This is a digitally signed message part.
