Chapter Contents |
Previous |
Next |
Compatibility Notes |
Compiler Options |
Prior to Release 6.00, most C parsing
phase (phase
1
)
compiler options used the syntax:
-W1,-option_name
-Koption_name
where option_name more closely resembles the corresponding mainframe compiler option.
Options for several other compilation phases have also
been replaced with
-K
option_name forms,
including:
Compiler Option Changes in Release 6.00 shows the correspondence between the old option names and the new option names. To maintain compatibility with existing build procedures, the cross-platform compiler accepts the old names. However, we recommend that you migrate to the new names. For example, you can use either of the following commands and achieve the same results:
sascc370 -Kredef -Kcomnest alpha.c
(new syntax) | |
sascc370 -W1,-cr -W1,-cc alpha.c
(old syntax) |
These commands compile
alpha.c
and allow redefinition
and stacking of
#define
names, and nested comments. For a complete
description of these compiler options, see Option Descriptions.
Pre-Linker |
In this
release, the program
cool
replaces
clink
as the default object code preprocessor. If you do not suppress pre-linking
with the
-c
compiler option,
sascc370
and
sasCC370
pre-link the object file with
cool
.
The
cool
program is designed to be backwards
compatible with source code that was developed prior to Release 6.00. In addition
to accepting all of the driver options supported by the old
clink
program,
cool
accepts the following options, which are new
for this release:
-r
option suppresses copying
the run-time constants CSECTs to the output object file.
-snn
option defines the number of lines per page in the listing file.
-vo
option creates only
the EXTVEC# CSECT.
-xt
option invokes a user
exit program with optional data.
-yl
option causes input
control statements to be echoed to the listing.
-yg
option includes "gathered"
symbols in the listing.
-yp
option includes a pseudoregister
map in the listing.
-zc
option allows processing
to continue even if a corrupted
ar370
archive is detected.
-zd
option allows multiple
input files to define the same SNAME.
-zi
option processes data
after an INCLUDE statement in an input file.
-zv
option prints additional
informational messages.
Since
clink
is still distributed with the SAS/C Cross-Platform
Compiler and C++ Development System, you can pre-link your program with
clink
, instead of
cool
, if desired. You can use either
of the following methods:
-Kuse_clink
compiler option
to invoke
clink
automatically when you run
sascc370
or
sasCC370
. For example, the following commands compile
alpha.c
and pre-link the output file with
clink
:
sascc370 -Kuse_clink -Anolineno alpha.c
(new syntax) | |
sascc370 -Kuse_clink -Wl,-d alpha.c
(old syntax) |
You can pass any of the pre-linker options described
in cool Options to
clink
, except the ones
listed above, which are supported only by
cool
.
In this release, the recommended way to pass an option
to the pre-linker during compilation is with the
-A
option_name
compiler driver form. In the first example above, the
-Anolineno
option is passed to the pre-linker to delete the line number and offset
table CSECTs. However, for compatibility with existing build procedures, you
can also specify the compilation phase with the
-W
l prefix.
In the second example above, the
-Wl
,
-d
option is passed to the pre-linker, which has the same effect as specifying
-Anolineno
. Notice that you must use the actual pre-linker option (in
this case
-d
) when specifying the compilation phase with
-W
l. For more information about specifying the compilation
phase, refer to Compiling C and C++ Programs.
clink
directly. For example, these
commands compile
alpha.c
and pre-link the object file with
clink
in a separate step:
sascc370 -c alpha.c clink -d alpha.o /libdir/libc.a
You can specify any of the pre-linker options described
in cool Options,
except the ones listed above, which are supported only by
cool
.
If you specify any
cool
-only options, they are ignored.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.