diff options
Diffstat (limited to 'extra/scripts/get-needed-libgcc-objects.sh')
-rwxr-xr-x | extra/scripts/get-needed-libgcc-objects.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extra/scripts/get-needed-libgcc-objects.sh b/extra/scripts/get-needed-libgcc-objects.sh index 349279a70..1c4e7cf11 100755 --- a/extra/scripts/get-needed-libgcc-objects.sh +++ b/extra/scripts/get-needed-libgcc-objects.sh @@ -20,6 +20,7 @@ rm -f libc.ldr $LD -r -o libc.ldr ../../lib/crt0.o ../../lib/crti.o ../../lib/crtn.o --whole-archive ../libc.a if $NM --undefined-only libc.ldr | grep -v "^main$" | grep -v "^_GLOBAL_OFFSET_TABLE_$" > sym.need ; then + EXIT_WITH_ERROR=0 rm -f obj.need touch obj.need for SYM in `cat sym.need | sed -e 's/ U //g'` ; do @@ -27,8 +28,10 @@ if $NM --undefined-only libc.ldr | grep -v "^main$" | grep -v "^_GLOBAL_OFFSET_T $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 + EXIT_WITH_ERROR=1 fi done + exit $EXIT_WITH_ERROR else echo No missing symbols found. exit 0 |