summaryrefslogtreecommitdiff
path: root/extra/scripts
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 /extra/scripts
parentcaa78fb3fdbd4acd4016e10241dce815483e7d13 (diff)
Define "NM = $(CROSS)nm" and use $NM and $AR in get-needed-libgcc-objects.sh
in all cases.
Diffstat (limited to 'extra/scripts')
-rwxr-xr-xextra/scripts/get-needed-libgcc-objects.sh16
1 files changed, 8 insertions, 8 deletions
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