Bug 26513 - make_exports.pl hardcoded to build nm
Summary: make_exports.pl hardcoded to build nm
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.1.1
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2006-03-01 15:54 UTC by Han-Wen Nienhuys
Modified: 2006-04-26 20:01 UTC (History)
3 users (show)

See Also:
Host: i386-redhat-linux
Target: powerpc-apple-darwin7
Build: i386-redhat-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Han-Wen Nienhuys 2006-03-01 15:54:12 UTC
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
Comment 1 Han-Wen Nienhuys 2006-03-01 15:54:48 UTC
oops, changed target triplet.
Comment 2 Andrew Pinski 2006-03-01 16:55:26 UTC
Yes most of the darwin configuration stuff is done only for native builds.
Comment 3 Benjamin Kosnik 2006-03-17 18:29:28 UTC
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
Comment 4 Benjamin Kosnik 2006-04-26 19:13:26 UTC
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

Comment 5 Benjamin Kosnik 2006-04-26 19:54:06 UTC
Fixed in 4.2.0, 4.1.0
Comment 6 Benjamin Kosnik 2006-04-26 19:59:09 UTC
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

Comment 7 Paolo Carlini 2006-04-26 20:01:48 UTC
I think the correct Target Milestone is 4.1.1...