diff extra/ld @ 179:606123758641

Added --sysroot support to lwlink and the ld wrapper script
author lost@l-w.ca
date Thu, 15 Sep 2011 17:08:16 -0600
parents 17d82b46f4c9
children 6433cb024174
line wrap: on
line diff
--- a/extra/ld	Fri Sep 09 22:08:07 2011 -0600
+++ b/extra/ld	Thu Sep 15 17:08:16 2011 -0600
@@ -28,7 +28,13 @@
 output_file=a.out
 libpaths=
 libs=
+stdlibpaths="-L=/usr/local/lib -L=/usr/lib -L=/lib"
 verbose=
+
+if [ "$verbose" = 1 ]; then
+	echo "$0 $@"
+fi
+
 case $0 in
 	*m6809-coco-*)
 		options="--format=decb"
@@ -101,6 +107,14 @@
 		--format-lwex)
 			options="$options --format=lwex"
 			;;
+		
+		--sysroot=*)
+			options="$options $arg"
+			;;
+			
+		-nostdlib)
+			stdlibpaths=
+			;;
 
 		-*)
 			echo "ld (m6809): unknown option $arg"
@@ -115,7 +129,7 @@
 options="$options -o $output_file"
 
 if [ "$verbose" = "1" ]; then
-	echo "$path_to_lwlink $options $input_files $startup_files $libpaths $libs"
+	echo "$path_to_lwlink $options $input_files $startup_files $libpaths $stdlibpaths $libs"
 fi
 
 $path_to_lwlink $options $input_files $startup_files $libpaths $libs