diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-11-08 09:14:02 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-11-08 09:14:02 +0000 |
commit | 8406059b605392719761400ecfecf08f274a978a (patch) | |
tree | d62a5d888343decd07b7063900226637431c92fe /extra/scripts | |
parent | 1826a77bb87aee9d858cfe4f46b9d8eedb98c3fe (diff) |
Patch from Stefan Allius for libgcc multilib support
this is the last patch, we need to make the support of multitarget libgcc
complete.
---------------------------------
In ldso/ldso/Makefile
I added the CPU_LDFLAGS-y to the LDFLAGS
---------------------------------
In libc/Makefile
I set the LDFLAGS for the script get-needed-objects.sh with CPU_LDFLAGS-y
---------------------------------
In extra/scripts/get-needed-object.sh
we now use the LIBGCC from Rules.mak and call LD with LDFLAGS
(==CPU_LDFLAGS-y). Addtionally I grep the NM output, to fix the unresolved
external __GLOBAL_OFFSET_TABLE__ on SuperH targets.
---------------------------------
Diffstat (limited to 'extra/scripts')
-rwxr-xr-x | extra/scripts/get-needed-libgcc-objects.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/extra/scripts/get-needed-libgcc-objects.sh b/extra/scripts/get-needed-libgcc-objects.sh index f8d2da4d2..588634c8d 100755 --- a/extra/scripts/get-needed-libgcc-objects.sh +++ b/extra/scripts/get-needed-libgcc-objects.sh @@ -15,12 +15,10 @@ #Enable this when debugging #set -x -LIBGCC=`$CC -print-libgcc-file-name` - echo Finding missing symbols in libc.a ... echo " partial linking..." rm -f libc.ldr -$LD -r -o libc.ldr ../../lib/crt0.o ../../lib/crti.o ../../lib/crtn.o --whole-archive ../libc.a +$LD $LDFLAGS -r -o libc.ldr ../../lib/crt0.o ../../lib/crti.o ../../lib/crtn.o --whole-archive ../libc.a if $NM --undefined-only libc.ldr 2>&1 | grep -v "^main$" | grep -v "^_GLOBAL_OFFSET_TABLE_$" | grep -v "_gp_disp" > sym.need ; then EXIT_WITH_ERROR=0 @@ -54,9 +52,9 @@ touch obj.need.0 cmp -s obj.need obj.need.0 ; state=$? while [ -s obj.need ] && [ $state -ne 0 ] ; do - (cd tmp-gcc && cat ../obj.need | sort | uniq | xargs $LD -r -o ../libgcc.ldr) + (cd tmp-gcc && cat ../obj.need | sort | uniq | xargs $LD $LDFLAGS -r -o ../libgcc.ldr) cp obj.need obj.need.0 - if $NM --undefined-only libgcc.ldr > sym.need 2>&1 ; then + if $NM --undefined-only libgcc.ldr | grep -v "^_GLOBAL_OFFSET_TABLE_$" > sym.need 2>&1 ; then for SYM in `cat sym.need | sed -e 's/ U //g'` ; do if $NM -s $LIBGCC 2>&1 | grep -q $SYM" in " ; then $NM -s $LIBGCC 2>&1 | grep $SYM" in " | cut -d' ' -f3 >> obj.need |