pathcc

NAME
SYNOPSIS
DESCRIPTION
LOADER OPTIONS
ENVIRONMENT VARIABLES
NOTES
EXAMPLES
FILES
COPYRIGHT
SEE ALSO

NAME

pathcc, pathCC − Invoke the PathScale(TM) C or C++ compiler

SYNOPSIS

pathcc [-option-list] files

pathCC [-option-list] files

DESCRIPTION

This man page describes the pathcc(1), and pathCC(1) commands. The pathcc command invokes the PathScale(TM) C compiler and the source preprocessor on source files that contain C code. The pathCC command invokes the PathScale(TM) C++ compiler.

A complete list of available options can be found in the eko(7) man page.

Many options have an opposite ("no-") counterpart. This is represented as [no-] in the option description and if used, will turn off or prevent the action of the option. If no [no-] is shown, there is no opposite option to the listed option.

In addition to the options described here, the pathcc/CC compiler supports the following GNU CC options (as described on the GCC man page or at http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/):

overall options

Invoking G++

C Dialect options

C++ Dialect options

Warning options

Preprocessor options

Assembler options

Link options

Directory options

Spec files

Target options

Submodel options

Environment variables

NOTE that the following GCC options are NOT supported:

all optimization options (except the −O option which is described later in this man page)

all configuration dependent options

all code generation options

the −pipe, gcoff, gstabs options

Throughout this man page, the differences between the C and C++ compilers are noted when appropriate. When there is no difference, the phrases, the compiler or the C/C++ compiler, refer to both compilers.

By default, the compiler creates an executable file named a.out. Other files used and created by the compiler are discussed under the FILES section of this man page. See the ld(1) man page for load−time options.

If conflicting options are specified, the option specified last on the command line overrides the previously specified option. Exceptions to this rule are noted in the individual option descriptions.

Most #pragma directives override corresponding command−line options. Exceptions to this rule are noted in the option descriptions on this man page.

Some command options, for example, −LIST, −LNO, −MP, −OPT, and −TENV, accept several arguments and allow you to specify a setting for each argument. To specify multiple arguments, either use colons to separate each argument or specify multiple options on the command line. For example, the following command lines are equivalent:

pathcc −LIST:notes=ON:options=OFF b.c
pathcc −LIST:notes=ON −LIST:options=OFF b.c

Unless otherwise specified in the option description, the following options apply to the pathcc and pathCC commands.

−###

Like the −v option, only nothing is run and args are quoted.

−ar

Creates an archive using ar(1) instead of a shared object or executable. The name of the archive is specified by using the −o option. Template entities required by the objects being archived are instantiated before creating the archive. The pathCC command implicitly passes the −r and −c options of ar to ar in addition to the name of the archive and the objects being created. Any other option that can be used in conjunction with the −c option of ar can be passed to ar using −WR,option_name.

NOTE: The objects specified with this option must include all of the objects that will be included in the archive. Failure to do so may cause prelinker internal errors. In the following example, liba.a is an archive containing only a.o, b.o, and c.o. The a.o, b.o, and c.o objects are prelinked to instantiate any required template entities, and the ar −r −c −v liba.a a.o b.o c.o command is executed. All three objects must be specified with −ar even if only b.o needs to be replaced in lib.a.

pathCC −ar −WR,−v −o liba.a a.o b.o c.o

See the ld(1) man page for more information about shared libraries and archives.

−c

Creates an intermediate object file for each named source file, but does not link the object files. The intermediate object file name corresponds to the name of the source file; a .o suffix is substituted for the suffix of the source file.

Because they are mutually exclusive, do not specify this option with the −r option.

−CG:

Option group to control code generation. See eko(7) man page for more information.

−clist

(C only) Enables the C listing. Specifying −clist is the equivalent of specifying −CLIST:=ON.

−copyright

Show the copyright for the compiler being used.

−D name=def

−D name

Define name to the macro preprocessor, as if by #define. If no definition is given, name is defined as 1.

−dumpversion

Show the version of the compiler being used, and nothing else.

−E

Run only the preprocessor phase on the source files and send the result to standard output. The resultant output will contain line directives. This option overrides the −nocpp option.

−fb-create <path>

Used to specify that an instrumented executable program is to be generated. Such an executable is suitable for producing feedback data files with the specified prefix for use in feedback-directed compilation (FDO). The commonly used prefix is <fbdata>. This is OFF by default.

−fb-opt <path>

Specify the directory that contains the instrumentation output generated by compiling with −fb-create and then run your program with a training input set. This tells the compiler to use this information to better optimize your program. When the −c option is used to produce an object file that is eventually linked to form an instrumented executable, the −fb-opt option should also be specified.

−f[no-]exceptions

−fexceptions enables exception handling. This is the default. −fno−exceptions disables exception handling.

−f[no-]fast−math

−ffast-math improves FP speed by relaxing ANSI & IEEE rules. −fno-fast−math tells the compiler to conform to ANSI and IEEE math rules at the expense of speed.

−f[no-]gnu−keywords

Recognize typeof as a keyword. If −fno−gnu−keywords is used, do not recognize ’typeof’ as a keyword.

−f[no-]implicit-inline-templates

−fimplicit-inline-templates emits code for inline templates instantiated implicitly. −fno−implicit-inline-templates tells the compiler to never emit code for inline templates instantiated implicitly.

−f[no-]implicit-templates

The −fimplicit-templates option emits code for non−inline templates instantiated implicitly. With −fno-implicit-templates the compiler will not emit code for non−inline templates instantiated implicitly.

−fno−math−errno

Do not set ERRNO after calling math functions that are executed with a single instruction, e.g. sqrt. A program that relies on IEEE exceptions for math error handling may want to use this flag for speed while maintaining IEEE arithmetic compatibility. This is implied by −Ofast. The default is −fmath-errno.

−f[no−]preprocessed

−fpreprocessed tells the preprocessor that input has already been preprocessed. Using −fno−preprocessed tells preprocessor that input has not already been preprocessed.

−f[no-]rtti

Using −frtti will generate runtime type information. The −fno-rtti option will not generate runtime type information.

−fpack-struct

Pack structure members together without holes.

−f[no-]unsafe-math-optimizations

−funsafe-math-optimizations improves FP speed by violating ANSI and IEEE rules. −fno-unsafe-math-optimizations makes the compilation conform to ANSI and IEEE math rules at the expense of speed.

−fPIC

Generate position independent code, if possible. It is OFF by default.

−fshared-data

Mark data as shared rather than private.

−ftest-coverage

Create data files for the pathcov(1) code-coverage utility. The data file names begin with the name of your source file:
SOURCENAME.bb

A mapping from basic blocks to line numbers, which pathcov uses to associate basic block execution counts with line numbers.

SOURCENAME.bbg

A list of all arcs in the program flow graph. This allows pathcov to reconstruct the program flow graph, so that it can compute all basic block and arc execution counts from the information in the SOURCENAME.da file.

Use −ftest-coverage with −fprofile-arcs; the latter option adds instrumentation to the program, which then writes execution counts to another data file:
SOURCENAME.da

Runtime arc execution counts, used in conjunction with the arc information in the file SOURCENAME.bbg.

Coverage data will map better to the source files if −ftest-coverage is used without optimization. See the gcc man pages for more information.

−fullwarn

Give more warnings, especially about missing prototypes.

−fuse-cxa-atexit

(For C++ only) Register static destructors with __cxa_atexit instead of atexit.

−fwritable-strings

Attempt to support writable-strings K&R style C.

−g[N]

Specify debugging support and to indicate the level of information produced by the compiler. The supported values for N are:

0

No debugging information for symbolic debugging is produced. This is the default.

1

Produces minimal information, enough for making backtraces in parts of the program that you don’t plan to debug. This is also the flag to use if the user wants backtraces but does not want the overhead of full debug information. This flag also causes −−export−dynamic to be passed to the linker.

2

Produce additional debugging information for symbolic debugging. Specifying −g without a debug level is equivalent to specifying −g2. If there is no explicit optimization flag specified, the −O0 optimization level is used in order to maintain the accuracy of the debugging information. If optimization options −O1, −O2, or −O3 are explicitly specified, the optimizations are performed accordingly but the accuracy of the debugging cannot be guaranteed. If −ipa is specified along with option −g2, then IPA is disabled.

−H

Print the name of each header file used.

−help

List all of the available options.

−help:

Print list of possible options that contain a given string.

−I dir

Searches directories for #include files whose names do not begin with /. Directories are searched in the following order: directory of the file argument, directories specified in −I options, and the standard directory (/usr/include).

−ignore-suffix

Determine the language of the source file being compiled by the command used to invoke the compiler. By default, the language is determined by the file suffixes (.c, .cpp, .C, .cxx, .f, .f90, .s). When the −ignore-suffix option is specified, the pathcc command invokes the C compiler.

−inline

Request inline processing.

−INLINE: ...

The inliner option group controls application of subprogram inlining (also see the −IPA description). See the eko(7) man page for more information, including the individual options in this group.

−ipa

Invokes inter−procedural analysis (IPA). Specifying this option is identical to specifying −IPA or −IPA:. Default settings for the individual IPA suboptions are used.

−IPA: ...

The inter−procedural analyzer option group controls application of inter−procedural analysis and optimization, including inlining, constant propagation, common block array padding, dead function elimination, alias analysis, and others. Specify −IPA by itself to invoke the inter-procedural analysis phase with default options. If you compile and link in distinct steps, you must specify at least −IPA for the compile step, and specify −IPA and the individual options in the group for the link step. If you specify −IPA for the compile step, and do not specify −IPA for the link step, you will receive an error. See the eko(7) man page for more information, including the individual options in this group.

−keep

Write all intermediate compilation files. file.s contains the generated assembly language code. file.i contains the preprocessed source code. These files are retained after compilation is finished. If IPA is in effect and you want to retain file.s, you must specify −IPA:keeplight=OFF in addition to −keep.

−L directory

In XPG4 mode, change the algorithm of searching for libraries named in −L operands to look in the specified directory before looking in the default location. Directories specified in −L options are searched in the specified order. Multiple instances of −L options can be specified.

−l library

In XPG4 mode, search the specified library. A library is searched when its name is encountered, so the placement of a −l operand is significant.

−LANG:

Option group to control language features. See the eko(7) man page for details.

−m32

Compile for 32-bit ABI, also known as x86 or IA32.

−m64

Compile for 64-bit ABI, also known as AMD64 or x86_64. This is the default.

−march=<cpu-type>

Compiler will optimize code for the selected cpu type: opteron, athlon, athlon64, athlon64fx, barcelona, em64t, pentium4, xeon, core, anyx86, auto. auto means to optimize for the platform that the compiler is running on, which the compiler determines by reading /proc/cpuinfo. anyx86 means a generic x86 processor. Under 32-bit ABI, anyx86 is a processor without SSE2/SSE3/3DNow! support; under 64-bit ABI it is a processor with SSE2 but without SSE3/3DNow!. Core refers to the Intel Core Microarchitecture, used by 64-bit CPUs such as Woodcrest. The default is auto.

−mcmodel=(small|medium)

Select the code size model to use when generating offsets within object files. Most programs will work with −mcmodel=small (using 32−bit data relocations), but some need −mcmodel=medium (using 32−bit relocations for code and 64−bit relocations for data).

−mcpu=<cpu-type>

Behaves like -march. See -march.

−mno-sse2

This flag is only applicable to -m32. −mno-sse2 is ignored under −m64 with a warning.

−msse2

Enable use of SSE2 instructions. This is the default under both −m64 and −m32.

−msse3

Enable use of SSE3 instructions. Default is ON under −march=barcelona, −march=em64t and −march=core. Otherwise, it is OFF by default.

−msse4a

Enable use of SSE4A instructions. Default is OFF.

−nobool

Do not allow boolean keywords.

−nocpp

(C only) Do not run the preprocessor phase on the source files. This option is ignored when compiling a .i file.

−noinline

Suppress expansion of inline functions. When this option is specified, copies of inline functions are emitted as static functions in each compilation unit where they are called. It is preferable to use −INLINE:=OFF or −IPA:inline=OFF if you are using IPA (see ipa(1)). One of these options must be specified if you are using IPA.

−no-pathcc

−no−pathcc turns off the __PATHSCALE__ and other predefined preprocessor macros.

−o outfile

When this option is used in conjunction with the −c option and a single C source file, a relocatable object file named outfile is produced. When specified with the −S option, the −o option is ignored. If −o and −c are not specified, a file named a.out is produced.

−O[n]

Specifies the basic level of optimization desired. n can be one of the following:

0

Turns off all optimizations.

1

Turns on local optimizations that can be done quickly.

2

Turns on extensive optimization. This is the default. The optimizations at this level are generally conservative, in the sense that they are virtually always beneficial, provide improvements commensurate to the compile time spent to achieve them, and avoid changes that affect such things as floating point accuracy.

3

Turns on aggressive optimization. The optimizations at this level are distinguished from −O2 by their aggressiveness, generally seeking highest−quality generated code even if it requires extensive compile time. They may include optimizations that are generally beneficial but may hurt performance.

This includes but is not limited to turning on the Loop Nest Optimizer, −LNO:opt=1, and setting −OPT:ro=1:IEEE_arith=2:Olimit=9000:reorg_common=ON.

s

Specify that code size is to be given priority in tradeoffs with execution time.

If no value is specified for n, 2 is assumed.

−Ofast

Equivalent to -O3 -ipa -OPT:Ofast -fno-math-errno -ffast-math. Use optimizations selected to maximize performance. Although the optimizations are generally safe, they may affect floating point accuracy due to rearrangement of computations. -OPT:Ofast effectively turns on the following optimizations: −OPT:ro=2:Olimit=0:div_split=on:alias=typed. −OPT:Ofast is also described in the eko(7) man page.

NOTE: −Ofast enables -ipa (inter−procedural analysis), which places limitations on how libraries and .o files are built. See the eko(7) man page for more information.

−OPT:...

Controls miscellaneous optimizations. This option overrides default optimizations. See the eko(7) man page for more information, including the individual options in this group.

−pathcc

Define __PATHCC__ and other macros.

−pg

Generate extra code to profile information suitable for the analysis program pathprof(1). You must use this option when compiling the source files you want data about, and you must also use it when linking. See the gcc man pages for more information.

−r

Produce a relocatable .o and stop.

−S

Compile the specified source files and create symbolic assembly language output files suffixed with .s.

−shared

DSO−shared PIC code.

−shared−libgcc

Force the use of the shared libgcc library.

−show

Print the passes as they execute, with their arguments and their input and output files.

−show-defaults

Show the default options in the compiler.defaults file.

−show0

Show what phases would be called, but don’t invoke anything.

−showt

Show time taken by each phase.

−-static

Same as −static.

−static

Suppress dynamic linking at runtime for shared libraries; use static linking instead.

−static-libgcc

Force the use of the static libgcc library.

−std=c89

−std option for gcc/g++.

−std=c99

−std option for gcc/g++.

−std=c9x

−std option for gcc/g++.

−std=gnu89

−std option for gcc/g++.

−std=gnu99

−std option for gcc/g++.

−std=gnu9x

−std option for gcc/g++.

−std=iso9899:1990

−std option for gcc/g++.

−std=iso9899:199409

−std option for gcc/g++.

−std=iso9899:1999

−std option for gcc/g++.

−std=iso9899:199x

−std option for gcc/g++.

−stdinc

Predefined include search path list.

−subverbose

Produce diagnostic output about the subscription management for the compiler.

−TENV: ...

The target environment option group controls the target environment assumed and/or produced by the compiler. See TENV in the eko(7) man page for details about the individual controls in this group.

−traditional

Attempt to support traditional K&R style C.

−U name

Remove any initial definition of name.

−v

Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper.

−version

Display the version number of the compiler.

−VHO

Option group to control vho lowering. See the eko(7) man page.

−Wc,arg1[,arg2...]

Passes the argument(s) argi to the compiler pass c where c is one of [pfibal]. The c selects the compiler pass according to the following table:

Character

Name

p

preprocessor

f

front-end

i

inliner

b

backend

a

assembler

l

loader

Sets of these phase names can be used to select any combination of phases. For example, −Wba,−o,foo passes the option −o foo to the b and a phases.

−w

Suppresses warning messages.

−Wall

Enable most warning messages.

−W[no−]error

−Werror makes all warnings into errors. −Wno−error tells the compiler not to make all warnings into errors.

−W[no−]uninitialized

−Wuninitialized warns about unitialized automatic variables. −Wno−uninitialized tells the compiler not warn about unitialized automatic variables.

−Wswitch−default

Warn when a switch statement has no default.

−WOPT:

Specifies options that affect the global optimizer enabled at −O2 or above. See the eko(7) man page.

−Wswitch−enum

Warn when a switch statement is missing a case for an enum member.

−Yc,path

Sets the path in which to find the associated phase, using the same phase names as given in the −W option. The following characters can also be specified:

I

Specifies where to search for include files

S

Specifies where to search for startup files (crt*.o)

L

Specifies where to search for libraries

files

Indicates the source files to be compiled or assembled. File suffixes and the commands that accept them are as follows:

Command

File Suffix

pathCC

.c, .C, .ii, .c++, .C++, .cc, .cxx, .CXX, .CC, .cpp, and .CPP

pathcc

.c and .i

LOADER OPTIONS

Other arguments are assumed to be either loader options, object files, or libraries. These files, together with the results of any compilations specified, are loaded in the order given, producing an executable program with the default name a.out.

ENVIRONMENT VARIABLES

For information on environment variables, see the eko(7) man page.

NOTES

The compiler attempts to continue after finding semantic errors. These errors may result in compiler internal errors.

EXAMPLES

EXAMPLE 1: Compile with extensive optimization enabled, allowing transformations which affect floating point roundoff and overflow, assuming strict ANSI C aliasing rules.

pathcc −O2 −OPT:roundoff=2:alias=typed ...

EXAMPLE 2: Compile with aggressive optimization enabled, allowing transformations with arbitrary effects on floating point roundoff and overflow.

pathcc −O3 −OPT:roundoff=3 ...

FILES

The following is a file summary:

File

Type

a.out

Default name of executable output file

file.a

Object file archive.

file.B

Intermediate file written by the front-end of the compiler. To retain this file, specify the −keep option.

file.c

C source file

file.i

pre-processed C source file

file.ii

pre-processed C++ source file

file.o

Object file

file.s

Assembly language source file

file.l

Listing file

ii_files

Directory that contains .ii files

/usr/include

Standard directory for #include files

/usr/bin/ld

Loader

/tmp/cc*

Temporary files

COPYRIGHT

Copyright (C) 2007, 2008 PathScale, LLC. All Rights Reserved.

Copyright (C) 2006, 2007 QLogic Corp. All Rights Reserved.

Copyright (C) 2003, 2004, 2005, 2006 PathScale, Inc. All Rights Reserved.

Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved.

SEE ALSO

pathscale_intro(7), pathf95(1), assign(1), explain(1), fsymlist(1), eko(7), compiler.defaults(5), pathopt2(1)

PathScale Compiler Suite and Subscription Manager Install Guide

PathScale Compiler Suite User Guide

PathScale Compiler Suite Support Guide

PathScale Debugger User Guide

Online documentation available at http://www.pathscale.com/docs.html