This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] libstdc++/26513: make_exports.pl hardcoded to build nm
- From: Shantonu Sen <ssen at opendarwin dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, libstdc++ at gcc dot gnu dot org
- Date: Mon, 24 Apr 2006 05:37:11 -0700
- Subject: [PATCH] libstdc++/26513: make_exports.pl hardcoded to build nm
When building a cross-compiler for a target that uses a binary format
that the build nm does not support (like a linux -> darwin cross
compiler), scripts/make_exports.pl fails with:
nm -P .libs/bitmap_allocator.o .libs/pool_allocator.o ... |
nm: .libs/bitmap_allocator.o: File format not recognized
nm: .libs/pool_allocator.o: File format not recognized
The problem is that "nm" in my PATH does not understand the Mach-O
binary format, whereas "i686-apple-darwin8-nm" does (and is in my PATH)
The following change resolves <http://gcc.gnu.org/PR26513>, as
suggested by Benjamin Kosnik. I've been using this patch for over a
year locally for testing cross compilers.
Tested by doing a native bootstrap for x86_64-unknown-linux-gnu and
regtested with no regressions. Also built a linux -> darwin cross
compiler with --enable-languages=c,c++, and whereas this failed
earlier, it now succeeds. I created a few simple C and C++ programs
linked against the MacOSX10.4u.sdk, transported them to an Intel Mac,
and ran them, and they worked.
2006-04-24 Shantonu Sen <ssen@opendarwin.org>
PR libstdc++/26513
* scripts/make_exports.pl: Use $ENV{NM_FOR_TARGET}, if present
make_exports.diff