Browse Source

Stefan Allius writes:

1. Under Solaris the test command with the 'string' argument don't
   work well. So I added the '-n' argument, which might work on all
   platforms.

2. The sed under Solaris don't support the '-s' argument, which is a
   GNU extension. I changed it to '-e' which works fine for me.
Eric Andersen 20 years ago
parent
commit
7f01718389
2 changed files with 5 additions and 5 deletions
  1. 4 4
      extra/scripts/fix_includes.sh
  2. 1 1
      extra/scripts/get-needed-libgcc-objects.sh

+ 4 - 4
extra/scripts/fix_includes.sh

@@ -49,11 +49,11 @@ usage () {
 }
 
 HAS_MMU="y";
-while [ "$1" ]; do
+while [ -n "$1" ]; do
     case $1 in
-	-k ) shift; if [ "$1" ]; then KERNEL_SOURCE=$1; shift; else usage; fi; ;;
-	-t ) shift; if [ "$1" ]; then TARGET_ARCH=$1; shift; else usage; fi; ;;
-	-n ) shift; if [ "$1" ]; then HAS_MMU="n"; shift; else usage; fi; ;;
+	-k ) shift; if [ -n "$1" ]; then KERNEL_SOURCE=$1; shift; else usage; fi; ;;
+	-t ) shift; if [ -n "$1" ]; then TARGET_ARCH=$1; shift; else usage; fi; ;;
+	-n ) shift; if [ -n "$1" ]; then HAS_MMU="n"; shift; else usage; fi; ;;
 	-* ) usage; ;;
 	* ) usage; ;;
     esac;

+ 1 - 1
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 | 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
+if $NM --undefined-only libc.ldr 2>&1 | sed -e '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