comparison 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
comparison
equal deleted inserted replaced
178:35f7ce3ef857 179:606123758641
26 # Set defaults. Some are based on the target type, which is 26 # Set defaults. Some are based on the target type, which is
27 # determined by the name by which the program was invoked. 27 # determined by the name by which the program was invoked.
28 output_file=a.out 28 output_file=a.out
29 libpaths= 29 libpaths=
30 libs= 30 libs=
31 stdlibpaths="-L=/usr/local/lib -L=/usr/lib -L=/lib"
31 verbose= 32 verbose=
33
34 if [ "$verbose" = 1 ]; then
35 echo "$0 $@"
36 fi
37
32 case $0 in 38 case $0 in
33 *m6809-coco-*) 39 *m6809-coco-*)
34 options="--format=decb" 40 options="--format=decb"
35 # options="-b .text=0x2000 -b .data=0x7000 -b .bss=0x7C00 -b .ctors=0x7F00 -b .dtors=0x7F80 -b vector=0x7FF0" 41 # options="-b .text=0x2000 -b .data=0x7000 -b .bss=0x7C00 -b .ctors=0x7F00 -b .dtors=0x7F80 -b vector=0x7FF0"
36 # aslink_options="-nwxst" 42 # aslink_options="-nwxst"
99 exit 1; 105 exit 1;
100 ;; 106 ;;
101 --format-lwex) 107 --format-lwex)
102 options="$options --format=lwex" 108 options="$options --format=lwex"
103 ;; 109 ;;
110
111 --sysroot=*)
112 options="$options $arg"
113 ;;
114
115 -nostdlib)
116 stdlibpaths=
117 ;;
104 118
105 -*) 119 -*)
106 echo "ld (m6809): unknown option $arg" 120 echo "ld (m6809): unknown option $arg"
107 exit 1 121 exit 1
108 ;; 122 ;;
113 done 127 done
114 128
115 options="$options -o $output_file" 129 options="$options -o $output_file"
116 130
117 if [ "$verbose" = "1" ]; then 131 if [ "$verbose" = "1" ]; then
118 echo "$path_to_lwlink $options $input_files $startup_files $libpaths $libs" 132 echo "$path_to_lwlink $options $input_files $startup_files $libpaths $stdlibpaths $libs"
119 fi 133 fi
120 134
121 $path_to_lwlink $options $input_files $startup_files $libpaths $libs 135 $path_to_lwlink $options $input_files $startup_files $libpaths $libs
122 rc=$? 136 rc=$?
123 137