Hi, buildd a linux/x86 -> darwin/x86 cross compiler, the libstdc++ compile calls nm -P .libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/complex_io.o .libs/ctype.o ... which barfs with ../libsupc++/.libs/libsupc++convenience.a|nm: .libs/bitmap_allocator.o: File format not recognized nm: .libs/pool_allocator.o: File format not recognized nm: .libs/mt_allocator.o: File format not recognized it seems that the libstdc++-v3/scripts/make_exports.pl script is hardcoded to "nm" iso. the value for NM_FOR_TARGET. This happens with configuring as /home/hanwen/vc/gub/target/darwin-ppc/src/gcc-4.1.0/configure --prefix=/home/hanwen/vc/gub/target/darwin-ppc/install/gcc-root/usr --program-prefix=powerpc-apple-darwin7- --prefix=/home/hanwen/vc/gub/target/darwin-ppc/system/usr/cross/ --with-slibdir=/usr/lib/ --target=powerpc-apple-darwin7 --with-sysroot=/home/hanwen/vc/gub/target/darwin-ppc/system/ --with-as=/home/hanwen/vc/gub/target/darwin-ppc/system/usr/cross/bin/powerpc-apple-darwin7-as --with-ld=/home/hanwen/vc/gub/target/darwin-ppc/system/usr/cross/bin/powerpc-apple-darwin7-ld --enable-static --enable-shared --enable-languages=c,c++ --enable-libstdcxx-debug
oops, changed target triplet.
Yes most of the darwin configuration stuff is done only for native builds.
Solution is to make make_exports.pl.in with NM_FOR_TARGET substition for current uses of 'nm' This is done with other scripts. This is low-priority, but this is enough of a hint so that you should be able to try and fix it. -benjamin
Subject: Bug 26513 Author: bkoz Date: Wed Apr 26 19:13:18 2006 New Revision: 113281 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113281 Log: 2006-04-26 Shantonu Sen <ssen@opendarwin.org> PR libstdc++/26513 * scripts/make_exports.pl: Use $ENV{NM_FOR_TARGET}, if present. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/scripts/make_exports.pl
Fixed in 4.2.0, 4.1.0
Subject: Bug 26513 Author: bkoz Date: Wed Apr 26 19:59:05 2006 New Revision: 113284 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113284 Log: 2006-04-26 Shantonu Sen <ssen@opendarwin.org> PR libstdc++/26513 * scripts/make_exports.pl: Use $ENV{NM_FOR_TARGET}, if present. Modified: branches/gcc-4_1-branch/libstdc++-v3/ChangeLog branches/gcc-4_1-branch/libstdc++-v3/scripts/make_exports.pl
I think the correct Target Milestone is 4.1.1...