Print this page
9868 unused cw translations should be removed
*** 35,45 ****
* Since the translation is inexact, this is something of a work-in-progress.
*
*/
/* If you modify this file, you must increment CW_VERSION */
! #define CW_VERSION "2.0"
/*
* -# Verbose mode
* -### Show compiler commands built by driver, no compilation
* -A<name[(tokens)]> Preprocessor predicate assertion
--- 35,45 ----
* Since the translation is inexact, this is something of a work-in-progress.
*
*/
/* If you modify this file, you must increment CW_VERSION */
! #define CW_VERSION "3.0"
/*
* -# Verbose mode
* -### Show compiler commands built by driver, no compilation
* -A<name[(tokens)]> Preprocessor predicate assertion
*** 54,65 ****
* -errtags=<a> Display messages with tags a(no, yes)
* -errwarn=<t> Treats warnings specified by tags t(%none, %all, <tag list>)
* as errors
* -fast Optimize using a selection of options
* -fd Report old-style function definitions and declarations
- * -features=zla Allow zero-length arrays
- * -flags Show this summary of compiler options
* -fnonstd Initialize floating-point hardware to non-standard preferences
* -fns[=<yes|no>] Select non-standard floating point mode
* -fprecision=<p> Set FP rounding precision mode p(single, double, extended)
* -fround=<r> Select the IEEE rounding mode in effect at startup
* -fsimple[=<n>] Select floating-point optimization preferences <n>
--- 54,63 ----
*** 82,102 ****
* -mr,"string" Remove all strings and append "string" to .comment section
* -mt Specify options needed when compiling multi-threaded code
* -native Find available processor, generate code accordingly
* -nofstore Do not force floating pt. values to target precision
* on assignment
- * -nolib Same as -xnolib
- * -noqueue Disable queuing of compiler license requests
* -norunpath Do not build in a runtime path for shared libraries
* -O Use default optimization level (-xO2 or -xO3. Check man page.)
* -o <outputfile> Set name of output file to <outputfile>
* -P Compile source through preprocessor only, output to .i file
- * -PIC Alias for -KPIC or -xcode=pic32
* -p Compile for profiling with prof
- * -pic Alias for -Kpic or -xcode=pic13
* -Q[y|n] Emit/don't emit identification info to output file
- * -qp Compile for profiling with prof
* -R<dir[:dir]> Build runtime search path list into executable
* -S Compile and only generate assembly code (.s)
* -s Strip symbol table from the executable file
* -t Turn off duplicate symbol warnings when linking
* -U<name> Delete initial definition of preprocessor symbol <name>
--- 80,95 ----
*** 104,123 ****
* -v Do stricter semantic checking
* -W<c>,<arg> Pass <arg> to specified component <c> (a,l,m,p,0,2,h,i,u)
* -w Suppress compiler warning messages
* -Xa Compile assuming ANSI C conformance, allow K & R extensions
* (default mode)
- * -Xc Compile assuming strict ANSI C conformance
* -Xs Compile assuming (pre-ANSI) K & R C style code
* -Xt Compile assuming K & R conformance, allow ANSI C
- * -x386 Generate code for the 80386 processor
- * -x486 Generate code for the 80486 processor
* -xarch=<a> Specify target architecture instruction set
* -xbuiltin[=<b>] When profitable inline, or substitute intrinisic functions
* for system functions, b={%all,%none}
* -xCC Accept C++ style comments
- * -xchar_byte_order=<o> Specify multi-char byte order <o> (default, high, low)
* -xchip=<c> Specify the target processor for use by the optimizer
* -xcode=<c> Generate different code for forming addresses
* -xcrossfile[=<n>] Enable optimization and inlining across source files,
* n={0|1}
* -xe Perform only syntax/semantic checking, no code generation
--- 97,112 ----
*** 131,149 ****
* -xlibmieee Force IEEE 754 return values for math routines in
* exceptional cases
* -xlibmil Inline selected libm math routines for optimization
* -xlic_lib=sunperf Link in the Sun supplied performance libraries
* -xlicinfo Show license server information
- * -xM Generate makefile dependencies
- * -xM1 Generate makefile dependencies, but exclude /usr/include
* -xmaxopt=[off,1,2,3,4,5] maximum optimization level allowed on #pragma opt
- * -xnolib Do not link with default system libraries
- * -xnolibmil Cancel -xlibmil on command line
* -xO<n> Generate optimized code (n={1|2|3|4|5})
* -xP Print prototypes for function definitions
- * -xpentium Generate code for the pentium processor
- * -xpg Compile for profiling with gprof
* -xprofile=<p> Collect data for a profile or use a profile to optimize
* <p>={{collect,use}[:<path>],tcov}
* -xregs=<r> Control register allocation
* -xs Allow debugging without object (.o) files
* -xsb Compile for use with the WorkShop source browser
--- 120,132 ----
*** 153,164 ****
* -xspace Do not do optimizations that increase code size
* -xstrconst Place string literals into read-only data segment
* -xtarget=<t> Specify target system for optimization
* -xtemp=<dir> Set directory for temporary files to <dir>
* -xtime Report the execution time for each compilation phase
- * -xtransition Emit warnings for differences between K&R C and ANSI C
- * -xtrigraphs[=<yes|no>] Enable|disable trigraph translation
* -xunroll=n Enable unrolling loops n times where possible
* -Y<c>,<dir> Specify <dir> for location of component <c> (a,l,m,p,0,h,i,u)
* -YA,<dir> Change default directory searched for components
* -YI,<dir> Change default directory searched for include files
* -YP,<dir> Change default directory for finding libraries files
--- 136,145 ----
*** 182,193 ****
* -erroff=E_EMPTY_TRANSLATION_UNIT ignore
* -errtags=%all -Wall
* -errwarn=%all -Werror else -Wno-error
* -fast error
* -fd error
- * -features=zla ignore
- * -flags --help
* -fnonstd error
* -fns[=<yes|no>] error
* -fprecision=<p> error
* -fround=<r> error
* -fsimple[=<n>] error
--- 163,172 ----
*** 210,229 ****
* -mr,"string" error
* -mt -D_REENTRANT
* -native error
* -nofstore error
* -nolib -nodefaultlibs
- * -noqueue ignore
* -norunpath ignore
* -O -O1 (Check the man page to be certain)
* -o <outputfile> pass-thru
* -P -E -o filename.i (or error)
- * -PIC -fPIC (C++ only)
* -p pass-thru
- * -pic -fpic (C++ only)
* -Q[y|n] error
- * -qp -p
* -R<dir[:dir]> pass-thru
* -S pass-thru
* -s -Wl,-s
* -t -Wl,-t
* -U<name> pass-thru
--- 189,204 ----
*** 231,254 ****
* -v -Wall
* -Wa,<arg> pass-thru
* -Wp,<arg> pass-thru except -xc99=<a>
* -Wl,<arg> pass-thru
* -W{m,0,2,h,i,u> error/ignore
- * -Wu,-xmodel=kernel -ffreestanding -mcmodel=kernel -mno-red-zone
* -xmodel=kernel -ffreestanding -mcmodel=kernel -mno-red-zone
* -Wu,-save_args -msave-args
* -w pass-thru
* -Xa -std=iso9899:199409 or -ansi
- * -Xc -ansi -pedantic
* -Xt error
* -Xs -traditional -std=c89
- * -x386 -march=i386 (x86 only)
- * -x486 -march=i486 (x86 only)
* -xarch=<a> table
* -xbuiltin[=<b>] -fbuiltin (-fno-builtin otherwise)
* -xCC ignore
- * -xchar_byte_order=<o> error
* -xchip=<c> table
* -xcode=<c> table
* -xdebugformat=<format> ignore (always use dwarf-2 for gcc)
* -xcrossfile[=<n>] ignore
* -xe error
--- 206,224 ----
*** 258,276 ****
* -xildon ignore
* -xinline ignore
* -xlibmieee error
* -xlibmil error
* -xlic_lib=sunperf error
- * -xM -M
- * -xM1 -MM
* -xmaxopt=[...] error
- * -xnolib -nodefaultlibs
- * -xnolibmil error
* -xO<n> -O<n>
* -xP error
- * -xpentium -march=pentium (x86 only)
- * -xpg error
* -xprofile=<p> error
* -xregs=<r> table
* -xs error
* -xsb error
* -xsbfast error
--- 228,240 ----
*** 279,289 ****
* -xstrconst ignore
* -xtarget=<t> table
* -xtemp=<dir> error
* -xtime error
* -xtransition -Wtransition
- * -xtrigraphs=<yes|no> -trigraphs -notrigraphs
* -xunroll=n error
* -W0,-xdbggen=no%usedonly -fno-eliminate-unused-debug-symbols
* -fno-eliminate-unused-debug-types
* -Y<c>,<dir> error
* -YA,<dir> error
--- 243,252 ----
*** 525,546 ****
Xamode(struct aelist __unused *h)
{
}
static void
- Xcmode(struct aelist *h)
- {
- static int xconce;
-
- if (xconce++)
- return;
-
- newae(h, "-ansi");
- newae(h, "-pedantic-errors");
- }
-
- static void
Xsmode(struct aelist *h)
{
static int xsonce;
if (xsonce++)
--- 488,497 ----
*** 717,743 ****
if (strcmp(arg, "-xwe") == 0) {
/* turn warnings into errors */
newae(ctx->i_ae, "-Werror");
continue;
}
- if (strcmp(arg, "-noex") == 0) {
- /* no exceptions */
- newae(ctx->i_ae, "-fno-exceptions");
- /* no run time type descriptor information */
- newae(ctx->i_ae, "-fno-rtti");
- continue;
- }
- if (strcmp(arg, "-pic") == 0) {
- newae(ctx->i_ae, "-fpic");
- pic = 1;
- continue;
- }
- if (strcmp(arg, "-PIC") == 0) {
- newae(ctx->i_ae, "-fPIC");
- pic = 1;
- continue;
- }
if (strcmp(arg, "-norunpath") == 0) {
/* gcc has no corresponding option */
continue;
}
if (strcmp(arg, "-nolib") == 0) {
--- 668,677 ----
*** 872,895 ****
newae(ctx->i_ae, "-Werror");
break;
}
error(arg);
break;
- case 'f':
- if (strcmp(arg, "-flags") == 0) {
- newae(ctx->i_ae, "--help");
- break;
- }
- if (strncmp(arg, "-features=zla", 13) == 0) {
- /*
- * Accept but ignore this -- gcc allows
- * zero length arrays.
- */
- break;
- }
- error(arg);
- break;
case 'G':
newae(ctx->i_ae, "-shared");
nolibc = 1;
break;
case 'k':
--- 806,815 ----
*** 962,980 ****
(void) snprintf(s, len, "-Wl,-%c%s", c, opt);
newae(ctx->i_ae, s);
free(s);
}
break;
- case 'n':
- if (strcmp(arg, "-noqueue") == 0) {
- /*
- * Horrid license server stuff - n/a
- */
- break;
- }
- error(arg);
- break;
case 'O':
if (arglen == 1) {
newae(ctx->i_ae, "-O");
break;
}
--- 882,891 ----
*** 990,1006 ****
*/
newae(ctx->i_ae, "-E");
op = CW_O_PREPROCESS;
nolibc = 1;
break;
- case 'q':
- if (strcmp(arg, "-qp") == 0) {
- newae(ctx->i_ae, "-p");
- break;
- }
- error(arg);
- break;
case 's':
if (arglen == 1) {
newae(ctx->i_ae, "-Wl,-s");
break;
}
--- 901,910 ----
*** 1040,1061 ****
strncmp(arg, "-Wp,", 4) == 0 ||
strncmp(arg, "-Wl,", 4) == 0) {
newae(ctx->i_ae, arg);
break;
}
- if (strcmp(arg, "-W0,-xc99=pragma") == 0) {
- /* (undocumented) enables _Pragma */
- break;
- }
- if (strcmp(arg, "-W0,-xc99=%none") == 0) {
- /*
- * This is a polite way of saying
- * "no c99 constructs allowed!"
- * For now, just accept and ignore this.
- */
- break;
- }
if (strcmp(arg, "-W0,-noglobal") == 0 ||
strcmp(arg, "-W0,-xglobalstatic") == 0) {
/*
* gcc doesn't prefix local symbols
* in debug mode, so this is not needed.
--- 944,953 ----
*** 1082,1098 ****
* for integer wrapping.
* gcc does not need this.
*/
break;
}
- if (strcmp(arg, "-W2,-Rcond_elim") == 0) {
- /*
- * Elimination and expansion of conditionals;
- * gcc has no direct equivalent.
- */
- break;
- }
if (strcmp(arg, "-Wd,-xsafe=unboundsym") == 0) {
/*
* Prevents optimizing away checks for
* unbound weak symbol addresses. gcc does
* not do this, so it's not needed.
--- 974,983 ----
*** 1118,1134 ****
* gcc does not do this, so it's not needed.
*/
break;
}
#if defined(__x86)
- if (strcmp(arg, "-Wu,-xmodel=kernel") == 0) {
- newae(ctx->i_ae, "-ffreestanding");
- newae(ctx->i_ae, "-mno-red-zone");
- model = "-mcmodel=kernel";
- nolibc = 1;
- break;
- }
if (strcmp(arg, "-Wu,-save_args") == 0) {
newae(ctx->i_ae, "-msave-args");
break;
}
#endif /* __x86 */
--- 1003,1012 ----
*** 1138,1177 ****
if (strcmp(arg, "-Xa") == 0 ||
strcmp(arg, "-Xt") == 0) {
Xamode(ctx->i_ae);
break;
}
- if (strcmp(arg, "-Xc") == 0) {
- Xcmode(ctx->i_ae);
- break;
- }
if (strcmp(arg, "-Xs") == 0) {
Xsmode(ctx->i_ae);
break;
}
error(arg);
break;
case 'x':
if (arglen == 1)
error(arg);
switch (arg[2]) {
- #if defined(__x86)
- case '3':
- if (strcmp(arg, "-x386") == 0) {
- newae(ctx->i_ae, "-march=i386");
- break;
- }
- error(arg);
- break;
- case '4':
- if (strcmp(arg, "-x486") == 0) {
- newae(ctx->i_ae, "-march=i486");
- break;
- }
- error(arg);
- break;
- #endif /* __x86 */
case 'a':
if (strncmp(arg, "-xarch=", 7) == 0) {
mflag |= xlate_xtb(ctx->i_ae, arg + 7);
break;
}
--- 1016,1035 ----
*** 1208,1226 ****
xlate(ctx->i_ae, arg + 7, xcode_tbl);
if (strncmp(arg + 7, "pic", 3) == 0)
pic = 1;
break;
}
- if (strncmp(arg, "-xcache=", 8) == 0)
- break;
if (strncmp(arg, "-xcrossfile", 11) == 0)
break;
error(arg);
break;
case 'd':
- if (strcmp(arg, "-xdepend") == 0)
- break;
if (strncmp(arg, "-xdebugformat=", 14) == 0)
break;
error(arg);
break;
case 'F':
--- 1066,1080 ----
*** 1253,1280 ****
break;
}
error(arg);
break;
#endif /* __x86 */
- case 'M':
- if (strcmp(arg, "-xM") == 0) {
- newae(ctx->i_ae, "-M");
- break;
- }
- if (strcmp(arg, "-xM1") == 0) {
- newae(ctx->i_ae, "-MM");
- break;
- }
- error(arg);
- break;
- case 'n':
- if (strcmp(arg, "-xnolib") == 0) {
- nolibc = 1;
- break;
- }
- error(arg);
- break;
case 'O':
if (strncmp(arg, "-xO", 3) == 0) {
size_t len = strlen(arg);
char *s = NULL;
int c = *(arg + 3);
--- 1107,1116 ----
*** 1304,1324 ****
free(s);
break;
}
error(arg);
break;
- case 'p':
- if (strcmp(arg, "-xpentium") == 0) {
- newae(ctx->i_ae, "-march=pentium");
- break;
- }
- if (strcmp(arg, "-xpg") == 0) {
- newae(ctx->i_ae, "-pg");
- break;
- }
- error(arg);
- break;
case 'r':
if (strncmp(arg, "-xregs=", 7) == 0) {
xlate(ctx->i_ae, arg + 7, xregs_tbl);
break;
}
--- 1140,1149 ----
*** 1330,1351 ****
strcmp(arg, "-xstrconst") == 0)
break;
error(arg);
break;
case 't':
- if (strcmp(arg, "-xtransition") == 0) {
- newae(ctx->i_ae, "-Wtransition");
- break;
- }
- if (strcmp(arg, "-xtrigraphs=yes") == 0) {
- newae(ctx->i_ae, "-trigraphs");
- break;
- }
- if (strcmp(arg, "-xtrigraphs=no") == 0) {
- newae(ctx->i_ae, "-notrigraphs");
- break;
- }
if (strncmp(arg, "-xtarget=", 9) == 0) {
xlate(ctx->i_ae, arg + 9, xtarget_tbl);
break;
}
error(arg);
--- 1155,1164 ----