summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-29 19:21:26 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-29 19:21:26 +0000
commit309c2c53eb49d4f4f21e6a6df670c9f961db662b (patch)
tree0d3b4e905a0b3debd6f7c241b1a18d8e1dfa5113
parentcaa78fb3fdbd4acd4016e10241dce815483e7d13 (diff)
Define "NM = $(CROSS)nm" and use $NM and $AR in get-needed-libgcc-objects.sh
in all cases.
-rw-r--r--extra/Configs/Config.arm1
-rw-r--r--extra/Configs/Config.i3861
-rw-r--r--extra/Configs/Config.m68k1
-rw-r--r--extra/Configs/Config.powerpc1
-rw-r--r--extra/Configs/Config.sh1
-rw-r--r--extra/Configs/Config.x861
-rwxr-xr-xextra/scripts/get-needed-libgcc-objects.sh16
7 files changed, 14 insertions, 8 deletions
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 1d5433b3f..603ae7e07 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -39,6 +39,7 @@ CROSS = #arm-linux-
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
+NM = $(CROSS)nm
STRIPTOOL = $(CROSS)strip
#STRIPTOOL = /bin/true
diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386
index e05059bd4..47d422289 100644
--- a/extra/Configs/Config.i386
+++ b/extra/Configs/Config.i386
@@ -39,6 +39,7 @@ CROSS = #i386-linux-
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
+NM = $(CROSS)nm
STRIPTOOL = $(CROSS)strip
#STRIPTOOL = /bin/true
diff --git a/extra/Configs/Config.m68k b/extra/Configs/Config.m68k
index 69a9623c8..f1f8ed8e7 100644
--- a/extra/Configs/Config.m68k
+++ b/extra/Configs/Config.m68k
@@ -39,6 +39,7 @@ NATIVE_CC = gcc
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
+NM = $(CROSS)nm
STRIPTOOL = $(CROSS)strip
#STRIPTOOL = /bin/true
diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc
index 07b2efc5f..703298958 100644
--- a/extra/Configs/Config.powerpc
+++ b/extra/Configs/Config.powerpc
@@ -39,6 +39,7 @@ CROSS = #powerpc-linux-
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
+NM = $(CROSS)nm
STRIPTOOL = $(CROSS)strip
#STRIPTOOL = /bin/true
diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh
index f34eed523..77a0b0b1a 100644
--- a/extra/Configs/Config.sh
+++ b/extra/Configs/Config.sh
@@ -40,6 +40,7 @@ CROSS = /usr/cygnus/yapp-001013/H-i686-pc-linux-gnulibc2.1/bin/sh-linux-gnu-
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
+NM = $(CROSS)nm
STRIPTOOL = $(CROSS)strip
#STRIPTOOL = /bin/true
diff --git a/extra/Configs/Config.x86 b/extra/Configs/Config.x86
index e05059bd4..47d422289 100644
--- a/extra/Configs/Config.x86
+++ b/extra/Configs/Config.x86
@@ -39,6 +39,7 @@ CROSS = #i386-linux-
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
+NM = $(CROSS)nm
STRIPTOOL = $(CROSS)strip
#STRIPTOOL = /bin/true
diff --git a/extra/scripts/get-needed-libgcc-objects.sh b/extra/scripts/get-needed-libgcc-objects.sh
index 7217ee6ac..79e15dac9 100755
--- a/extra/scripts/get-needed-libgcc-objects.sh
+++ b/extra/scripts/get-needed-libgcc-objects.sh
@@ -19,12 +19,12 @@ echo " partial linking..."
rm -f libc.ldr
$LD -r -o libc.ldr ../crt0.o --whole-archive ../libc.a
-if nm --undefined-only libc.ldr | grep -v "^main$" > sym.need ; then
+if $NM --undefined-only libc.ldr | grep -v "^main$" > sym.need ; then
rm -f obj.need
touch obj.need
for SYM in `cat sym.need | sed -e 's/ U //g'` ; do
- if nm -s $LIBGCC | grep -q $SYM" in " ; then
- nm -s $LIBGCC | grep $SYM" in " | cut -d' ' -f3 >> obj.need
+ if $NM -s $LIBGCC | grep -q $SYM" in " ; then
+ $NM -s $LIBGCC | grep $SYM" in " | cut -d' ' -f3 >> obj.need
else
echo Symbol $SYM needed by libc.a but not found in libgcc.a
fi
@@ -36,7 +36,7 @@ fi
rm -rf tmp-gcc
mkdir tmp-gcc
-(cd tmp-gcc ; ar -x $LIBGCC)
+(cd tmp-gcc ; $AR -x $LIBGCC)
rm -f libgcc.ldr
echo Extracting referenced libgcc.a objects ...
@@ -46,10 +46,10 @@ touch obj.need.0
while [ -s obj.need ] && ! cmp -s obj.need obj.need.0 ; do
(cd tmp-gcc ; cat ../obj.need | xargs $LD -r -o ../libgcc.ldr)
cp obj.need obj.need.0
- if nm --undefined-only libgcc.ldr > sym.need ; then
+ if $NM --undefined-only libgcc.ldr > sym.need ; then
for SYM in `cat sym.need | sed -e 's/ U //g'` ; do
- if nm -s $LIBGCC | grep -q $SYM" in " ; then
- nm -s $LIBGCC | grep $SYM" in " | cut -d' ' -f3 >> obj.need
+ if $NM -s $LIBGCC | grep -q $SYM" in " ; then
+ $NM -s $LIBGCC | grep $SYM" in " | cut -d' ' -f3 >> obj.need
fi
done
fi
@@ -61,7 +61,7 @@ cat obj.need | sort | uniq > obj.need.0
if [ -s obj.need.0 ] ; then
echo Objects added from $LIBGCC:
cat obj.need.0
- (cd tmp-gcc ; cat ../obj.need | xargs ar r ../libgcc-need.a)
+ (cd tmp-gcc ; cat ../obj.need | xargs $AR r ../libgcc-need.a)
else
echo No objects added from $LIBGCC.
fi