OSDN Git Service

Work around a bug in nm from binutils-2.14.90.0.5.
authorManuel Novoa III <mjn3@codepoet.org>
Mon, 18 Aug 2003 23:14:09 +0000 (23:14 -0000)
committerManuel Novoa III <mjn3@codepoet.org>
Mon, 18 Aug 2003 23:14:09 +0000 (23:14 -0000)
extra/scripts/get-needed-libgcc-objects.sh

index f12aae1..3743b0c 100755 (executable)
@@ -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 | sed -s 's/ *$//' | sed -e 's/^.*U  *//' | 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