summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-06-05 21:25:53 +0000
committerEric Andersen <andersen@codepoet.org>2003-06-05 21:25:53 +0000
commit84db602fe3898f49b62e09e496360e1c82f47799 (patch)
treea14be8d0f801d3cc3cc1b1c163417fd3f53130f9
parent55a99c3281d199e140774103e0d35f1353a67359 (diff)
Patch from Peter S. Mazinger to make the get-needed-libgcc-objects
script work with newer binutils versions.
-rwxr-xr-xextra/scripts/get-needed-libgcc-objects.sh2
-rw-r--r--libc/Makefile5
2 files changed, 4 insertions, 3 deletions
diff --git a/extra/scripts/get-needed-libgcc-objects.sh b/extra/scripts/get-needed-libgcc-objects.sh
index 6aac14b4c..f12aae153 100755
--- a/extra/scripts/get-needed-libgcc-objects.sh
+++ b/extra/scripts/get-needed-libgcc-objects.sh
@@ -20,7 +20,7 @@ echo " partial linking..."
rm -f libc.ldr
$LD $LDFLAGS -r -o libc.ldr $CRTOBJS --whole-archive ../libc.a
-if $NM --undefined-only libc.ldr 2>&1 | grep -v "^main$" | grep -v "^_GLOBAL_OFFSET_TABLE_$" | grep -v "_gp_disp" | grep -v "^etext$" | grep -v "^__gmon_start__$" > sym.need ; then
+if $NM --undefined-only libc.ldr 2>&1 | grep -v "main$" | grep -v "_GLOBAL_OFFSET_TABLE_$" | grep -v "_gp_disp" | grep -v "^etext$" | grep -v "^__gmon_start__$" > sym.need ; then
EXIT_WITH_ERROR=0
rm -f obj.need
touch obj.need
diff --git a/libc/Makefile b/libc/Makefile
index a9a7e3244..e43580847 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -76,8 +76,9 @@ $(LIBGCC_NEED): $(TOPDIR)lib/$(LIBNAME)
@rm -rf tmp
@mkdir tmp
$(AR) rv $@
- @(cd tmp && CC=$(CC) LD=$(LD) LDFLAGS=$(CPU_LDFLAGS-y) NM=$(NM) AR=$(AR) \
- LIBGCC=$(LIBGCC) CRTOBJS=$(CRTOBJS) \
+ (cd tmp && CC=$(CC) LD=$(LD) LDFLAGS=$(CPU_LDFLAGS-y) NM=$(NM) AR=$(AR) \
+ LIBGCC=$(LIBGCC) \
+ CRTOBJS=$(CRTOBJS) \
/bin/sh $(TOPDIR)../extra/scripts/get-needed-libgcc-objects.sh)
halfclean: