Because the compiler automatically executes other commands, such as ld and as, as needed during compilation, you usually do not need to concern yourself with the options of those commands. If you want to choose options for these individual commands, you can do one of the following:
xlf95 -berok file.f # -berok is passed to ld
xlf95 -Wl,-berok file.f # -berok is passed to ld
In
this example, the ld option -berok is
passed to the linker (which is denoted by the l in
the -Wl option) when the linker is executed.
This form is more general than the previous one because it works for the as command and any other commands called during compilation, by using different letters after the -W option.
asopt = "w"
ldopt = "m"
and issue this command:
xlf95 -wm -Wa,-x -Wl,-s produces_warnings.s uses_many_symbols.f
the file produces_warnings.s is
assembled with the options -w and -x (issue
warnings and produce cross-reference), and the object files are linked
with the options -m and -s (write
list of object files and strip final executable file).