This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 4.0.0->4.0.1 regression: Can't use 64-bit shared libs on powerpc-apple-darwin8.1.0
It seems that the libtool command line may be wrong. Here's a simple
test.
[descartes:~/programs] lucier% cat conftest.c
int main2() { return 0;}
[descartes:~/programs] lucier% gcc -m64 -mcpu=970 -o conftest
-dynamiclib conftest.c -v -save-temps
Using built-in specs.
Target: powerpc-apple-darwin8.1.0
Configured with: ../configure --prefix=/pkgs/gcc-4.0-mainline
--with-gmp=/pkgs/gmp-4.1.3 --with-mpfr=/pkgs/gmp-4.1.3
--enable-languages=c,c++,objc,obj-c++,f95
Thread model: posix
gcc version 4.1.0 20050615 (experimental)
/pkgs/gcc-4.0-mainline/libexec/gcc/powerpc-apple-darwin8.1.0/4.1.0/cc1
-E -quiet -v -D__DYNAMIC__ -D__APPLE_CC__=1 conftest.c -fPIC -m64
-mcpu=970 -fpch-preprocess -o conftest.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/../../
../../powerpc-apple-darwin8.1.0/include"
#include "..." search starts here:
#include <...> search starts here:
/pkgs/gcc-4.0-mainline/include
/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
End of search list.
/pkgs/gcc-4.0-mainline/libexec/gcc/powerpc-apple-darwin8.1.0/4.1.0/cc1
-fpreprocessed conftest.i -fPIC -quiet -dumpbase conftest.c -m64
-mcpu=970 -auxbase conftest -version -o conftest.s
GNU C version 4.1.0 20050615 (experimental) (powerpc-apple-darwin8.1.0)
compiled by GNU C version 4.1.0 20050615 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 856564be1b7d2e1a3d0c80ce3c26789d
as -arch ppc64 -o conftest.o conftest.s
/usr/bin/libtool -dynamic -arch_only ppc64 -noall_load
-weak_reference_mismatches non-weak -o conftest
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/ppc64
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/../../
../ppc64 conftest.o -lgcc_s_ppc64 -lgcc -lSystemStubs -lmx -lSystem
/usr/bin/libtool: can't locate file for: -lgcc_s_ppc64
/usr/bin/libtool: file: -lgcc_s_ppc64 is not an object file (not
allowed in a library)
However, if I add by hand /pkgs/gcc-4.0-mainline/lib, where
libgcc_s_ppc64.1.0.dylib is installed, to the link path to libtool, I
get
[descartes:~/programs] lucier% /usr/bin/libtool -dynamic -arch_only
ppc64 -noall_load -weak_reference_mismatches non-weak -o conftest
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/ppc64
-L/pkgs/gcc-4.0-mainline/lib/gcc/powerpc-apple-darwin8.1.0/4.1.0/../../
../ppc64 conftest.o -lgcc_s_ppc64 -lgcc -lSystemStubs -lmx -lSystem
-L/pkgs/gcc-4.0-mainline/lib
[descartes:~/programs] lucier% file conftest
conftest: Mach-O 64-bit dynamically linked shared library ppc64
[descartes:~/programs] lucier% otool64 -L conftest
conftest:
conftest (compatibility version 0.0.0, current version 0.0.0)
/pkgs/gcc-4.0-mainline/lib/libgcc_s_ppc64.1.0.dylib
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
version 92.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.0.0)
Perhaps someone moved libgcc_s_ppc64.1.0.dylib but didn't change the
script that builds the libtool command line to tell libtool where to
find it?
Brad