}
dialect="mf gnu"
-out_set=""
-first=""
#
# Iterate over the command-line tokens. We can't use getopts here
opt="$(echo "$opt" | sed -E 's/-f(no-)?ec=/-f\1cobol-exceptions=EC-/g')"
opts="$opts $opt"
;;
- -fno-ec=*)
- ;; # just ignore for now to work around "sorry unimplemented" errors
-ext)
pending_arg="-copyext "
;;
;;
-v | --verbose) opts="$opts -V"
;;
- # note: we want -dumpversion to be passed to gcc
+ # -dumpversion, like all options not handled specifically, is
+ # passed by default.
-V | --version | -version)
$gcobol --version |
awk '1 == NR { ver = $3;
exit
# opts="$opts --version"
;;
- # pass through, strangely -Wall is not supported
- # note that cobc does not support gcc's -Wl options, but they
- # might be passed anyway for different reasons e.g.: -Wl,rpath.
- -w | -W | -Wextra | -Wl,*) opts="$opts $opt"
- ;;
- -Wno-*) no_warn "$opt"
+ # pass through, -Wall support pending gcc to set for all front ends
+ # cobc does not support all gcc -Wl options
+ -w | -W | -Wextra | -Wno-* | -Wl,*) opts="$opts $opt"
;;
-W*) warn "$opt"
output_name="$output_name".so
;;
esac
- opts="$opts $cflags -o $output_name"
+ opts="$opts -o $output_name"
fi
opts="$opts $opt" # pass through
;;
set -x
fi
-exec $gcobol $mode $dialect $opts
+exec $gcobol $mode $dialect $cflags $opts