[adding automake @; replies can drop libtool @]
On 9/13/10 6:31 AM, Elvis Dowson wrote:
Elvis Dowson wrote:
I'm unable to build libtool as binary that includes both 32-bit and 64-bit
intel architecture on Mac OS X 10.6.4 using gcc-4.0.1, and get the
following error:
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple
-arch flags
The solution is to add the --disable-dependency-tracking option to the
configure command as follows:
./configure CC='/usr/bin/gcc-4.0' CPP='/usr/bin/cpp-4.0'
CXX='/usr/bin/g++-4.0' CXXCPP='/usr/bin/cpp-4.0' CFLAGS='-arch i386 -arch
x86_64' CPPFLAGS='-arch i386 -arch x86_64' CXXFLAGS='-arch i386 -arch
x86_64' LDFLAGS='-arch i386 -arch x86_64' --disable-dependency-tracking
The FSF INSTALL file suggests
./configure CC='/usr/bin/gcc-4.0 -arch i386 -arch x86_64'
CPP='/usr/bin/cpp-4.0' CXX='/usr/bin/g++-4.0 -arch i386 -arch x86_64'
CXXCPP='/usr/bin/cpp-4.0'
in which case `configure' automagically disables dependency tracking. It
raises the question why Automake disables dependency tracking when
multi-archs are indicated via compiler variables (CC and CXX) but not
when indicated via CFLAGS, CXXFLAGS and LDFLAGS. Is there a good reason
for this or is it just a missing feature?
Thanks,
Peter