comparison extra/as @ 424:3aad0ff3c3be

Add support for assembler listings in the as wrapper script.
author David Flamand <dflamand@gmail.com>
date Thu, 22 Sep 2016 19:26:04 -0600
parents c41d72a58ef6
children
comparison
equal deleted inserted replaced
423:a3711f5ac569 424:3aad0ff3c3be
38 38
39 input_file= 39 input_file=
40 output_file= 40 output_file=
41 list_file= 41 list_file=
42 options= 42 options=
43 list_file_enabled=n
44 43
45 # Parse the command-line options. See the GNU 'as' man page for 44 # Parse the command-line options. See the GNU 'as' man page for
46 # an explanation of all these options. Our goal is to translate 45 # an explanation of all these options. Our goal is to translate
47 # them into lwasm form. 46 # them into lwasm form.
48 47
68 fatal_error "invalid CPU option '$arg'" 67 fatal_error "invalid CPU option '$arg'"
69 ;; 68 ;;
70 --) 69 --)
71 fatal_error "standard input not supported" 70 fatal_error "standard input not supported"
72 ;; 71 ;;
73 # -a*) 72 -a*)
74 # options="${options}lc" 73 list_file=${arg#${arg%=*}}
75 # list_file_enabled=y 74 list_file=${list_file#=}
76 # ;; 75 options="$options -l$list_file"
76 ;;
77 -I*) 77 -I*)
78 #include_file=${arg#-I} 78 #include_file=${arg#-I}
79 #echo "warning: include path '$include_file' ignored" 79 #echo "warning: include path '$include_file' ignored"
80 ;; 80 ;;
81 -MD) 81 -MD)
96 ;; 96 ;;
97 -D|-f|-K|--traditional-format|-w|-x|-Z|-W|--no-warn) 97 -D|-f|-K|--traditional-format|-w|-x|-Z|-W|--no-warn)
98 # These options are accepted but ignored by GNU as. 98 # These options are accepted but ignored by GNU as.
99 true 99 true
100 ;; 100 ;;
101 # =*)
102 # # Set the name of the listing file
103 # list_file=${arg#=}
104 # ;;
105 -Qy) 101 -Qy)
106 # "identify in output" - ignore 102 # "identify in output" - ignore
107 true 103 true
108 ;; 104 ;;
109 -*) 105 -*)
143 # lwasm does not create an output file if it errors out but it also doesn't 139 # lwasm does not create an output file if it errors out but it also doesn't
144 # remove an existing file if it fails so we remove it anyway... 140 # remove an existing file if it fails so we remove it anyway...
145 141
146 if [ "$rc" != "0" ]; then 142 if [ "$rc" != "0" ]; then
147 cp -p $input_file /tmp/as6809_error.s 143 cp -p $input_file /tmp/as6809_error.s
148 rm -f $asoutput_file 144 rm -f $output_file $list_file
149 exit $rc 145 exit $rc
150 fi 146 fi
151 147
152 # we don't need anything fancy here since lwasm supports specifying output 148 # we don't need anything fancy here since lwasm supports specifying output
153 # file names.... 149 # file names....