[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Incomplete support of Darwin's -isysroot gcc option?
From: |
Stéphane Corthésy |
Subject: |
Incomplete support of Darwin's -isysroot gcc option? |
Date: |
Sun, 5 Mar 2006 19:22:58 +0100 |
Hi,
I think that I found a bug: when trying to compile some third-party
library (gpgme), with the latest libtool version (1.5.22; I replaced
gpgme's old libtool with 1.5.22) on MacOSX 10.4, trying to create a
static universal library (i.e. binary with 2 architectures, i386 and
ppc), I need to patch libtool to change its (system) library search
paths.
When compiling a universal binary, we pass the -isysroot /path/to/
ppc_and_intel_SDK option to gcc 4 (as well as -arch ppc -arch i386).
When libtool is invoked, it compiles binaries for both architectures,
but when linking it looks for system libraries and it doesn't use the
isysroot path prefix, so it searches only for libraries which have
been compiled for one architecture, not for both (because system
libraries, out of the SDK's, are compiled only for one architecture):
# Compile-time system search path for libraries
sys_lib_search_path_spec=" /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/ /
usr/lib/gcc/powerpc-apple-darwin8/4.0.1/ /usr/lib/gcc/powerpc-apple-
darwin8/4.0.1/../../../../powerpc-apple-darwin8/lib/powerpc-apple-
darwin8/4.0.1/ /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../../
powerpc-apple-darwin8/lib/ /usr/lib/gcc/powerpc-apple-
darwin8/4.0.1/../../../powerpc-apple-darwin8/4.0.1/ /Developer/SDKs/
MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../ /
lib/powerpc-apple-darwin8/4.0.1/ /lib/ /usr/lib/powerpc-apple-
darwin8/4.0.1/ /usr/lib/ /lib /usr/lib /usr/local/lib"
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/usr/local/lib /lib/Developer/SDKs/
MacOSX10.4u.sdk /usr/lib"
It should first search for the same paths, prefixed by the passed
isysroot prefix, and then the paths as of now, i.e.
# Compile-time system search path for libraries
sys_lib_search_path_spec=" /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/
gcc/powerpc-apple-darwin8/4.0.1/ /Developer/SDKs/MacOSX10.4u.sdk/usr/
lib/gcc/powerpc-apple-darwin8/4.0.1/ /Developer/SDKs/MacOSX10.4u.sdk/
usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../../powerpc-apple-
darwin8/lib/powerpc-apple-darwin8/4.0.1/ /Developer/SDKs/
MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../../
powerpc-apple-darwin8/lib/ /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/
gcc/powerpc-apple-darwin8/4.0.1/../../../powerpc-apple-
darwin8/4.0.1/ /Developer/SDKs/MacOSX10.4u.sdk/Developer/SDKs/
MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../ /
Developer/SDKs/MacOSX10.4u.sdk/lib/powerpc-apple-darwin8/4.0.1/ /
Developer/SDKs/MacOSX10.4u.sdk/lib/ /Developer/SDKs/MacOSX10.4u.sdk/
usr/lib/powerpc-apple-darwin8/4.0.1/ /Developer/SDKs/MacOSX10.4u.sdk/
usr/lib/ /Developer/SDKs/MacOSX10.4u.sdk/lib /Developer/SDKs/
MacOSX10.4u.sdk/usr/lib /Developer/SDKs/MacOSX10.4u.sdk/usr/local/
lib /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/ /usr/lib/gcc/powerpc-
apple-darwin8/4.0.1/ /usr/lib/gcc/powerpc-apple-
darwin8/4.0.1/../../../../powerpc-apple-darwin8/lib/powerpc-apple-
darwin8/4.0.1/ /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../../
powerpc-apple-darwin8/lib/ /usr/lib/gcc/powerpc-apple-
darwin8/4.0.1/../../../powerpc-apple-darwin8/4.0.1/ /Developer/SDKs/
MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../ /
lib/powerpc-apple-darwin8/4.0.1/ /lib/ /usr/lib/powerpc-apple-
darwin8/4.0.1/ /usr/lib/ /lib /usr/lib /usr/local/lib"
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/Developer/SDKs/MacOSX10.4u.sdk/usr/local/
lib /Developer/SDKs/MacOSX10.4u.sdk/lib/Developer/SDKs/
MacOSX10.4u.sdk /Developer/SDKs/MacOSX10.4u.sdk/usr/lib /usr/local/
lib /lib/Developer/SDKs/MacOSX10.4u.sdk /usr/lib"
I hope my explanations are clear enough.
Regards,
Stéphane
- Incomplete support of Darwin's -isysroot gcc option?,
Stéphane Corthésy <=