On Solaris, gcc can be configured one of two ways when it is built, but correct choice of the options to gcc
s configure script .
* To use the Sun linker in /usr/ccs/bin/ld
* Use the GNU linker from bintuils
The former is generally reckoned to be the better. Sun ship gcc but it uses their own linker, not the GNU one. The GNU linker is generally considered a pain on Solaris.
The problem in polybori is that the flags used for creating the shared libraries are set here incorrectly for any linker other than the GNU one.
Hence I propose you test for SunOS too, and further check that the linker is the GNU one or not. Sorry, I don't know python, but the way I tested this in a shell script is like this:
if [ `uname` = "SunOS" ]; then
if [ "`ld --version 2>&1 | grep GNU`" = "" ]; then
fi
fi
If 'ld --version' has GNU somewhere in the output, then assume the GNU linker, if not assume the Sun one if the operating system is Solaris (for which uname returns 'SunOS'). There are to my knowledge no linkers other than those from Sun or GNU used on Solaris. On other operating systems, there will no doubt be other flags needed.
Some common GNU and Sun equivalents are:
-shared ==> -G
-soname ==> -h
--whole-archive ==> -z allextract
--no-whole-archive ==> -z defaultextract
Thank you for the bug report. Unfortunately, all of these settings (but -soname) are detected by scons, but maybe we could find a work-around. Can you see from the output, whether all flags are wrong, or just -soname?
Regards
As far as I am aware, it is only -soname which is the linker flag set incorrectly.
But on a machine with the Sun C++ compiler, I have noticed that in addition there is a problem of flags being mixed up between Sun and GNU compilers. The first line shows GCC called with a Sun-specific option -KPIC
gcc -o Cudd/epd/so_epd.o -c -std=c99 -O3 -Wno-long-long -Wreturn-type -g
-fPIC -KPIC -DNDEBUG -DPACKED -DHAVE_M4RI -DHAVE_IEEE_754 -DBSD
-I/rootpool2/local/kirkby/sage-4.1.rc1/spkg/build/polybori-0.5rc.p8/src/boost_1_34_1.cropped
-I/rootpool2/local/kirkby/sage-4.1.rc1/local/include/python2.6
-Ipolybori/include -ICudd/obj -ICudd/util -ICudd/cudd -ICudd/mtr
-ICudd/st -ICudd/epd Cudd/epd/epd.c
gcc: unrecognized option '-KPIC'
The very next line, the Sun C++ compiler is called with a dubious set of options, including -O3 twice, then -fPIC which is not a Sun compiler option. Neither are -Wno-long-long or -Wreturn-type acceptable to the Sun compiler.
/opt/SUNWspro/bin/CC -o polybori/src/so_BoolePolyRing.o -c -O3
-Wno-long-long -Wreturn-type -g -fPIC -ftemplate-depth-100 -g -fPIC
-KPIC -O3 -Wno-long-long -Wreturn-type -g -fPIC -KPIC -DNDEBUG -DPACKED
-DHAVE_M4RI -DHAVE_IEEE_754 -DBSD
-I/rootpool2/local/kirkby/sage-4.1.rc1/spkg/build/polybori-0.5rc.p8/src/boost_1_34_1.cropped
-I/rootpool2/local/kirkby/sage-4.1.rc1/local/include/python2.6
-Ipolybori/include -ICudd/obj -ICudd/util -ICudd/cudd -ICudd/mtr
-ICudd/st -ICudd/epd polybori/src/BoolePolyRing.cc
I take your point about 'scons'. I will contact the scons developers, but having never made use of it, or knowing anything about it, it would help if you did too, as you know how you use their tools - I have no iidea at all.
For the record, here are the flags supported by Sun's linker C and C++ compilers.
------------------ SUN LINKER ------------------
I'm not sure how best to get the linker to show the flags it supports, but adding an erronous flag causes it to report basic usage information.
kirkby@t2:[~] $ ld -h
ld: option requires an argument -- h
usage: ld [-6🔤d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s)
[-64] enforce a 64-bit link-edit
[-a] create an absolute file
[-b] do not do special PIC relocations in a.out
[-B direct | nodirect]
establish direct bindings, or inhibit direct binding
to, the object being created
[-B dynamic | static]
search for shared libraries|archives
[-B eliminate] eliminate unqualified global symbols from the
symbol table
[-B group] relocate object from within group
[-B local] reduce unqualified global symbols to local
[-B reduce] process symbol reductions
[-B symbolic] bind external references to definitions when creating
shared objects
[-c name] record configuration file `name'
[-C] demangle C++ symbol name diagnostics
[-d y | n] operate in dynamic|static mode
[-D token,...] print diagnostic messages
[-e epsym] use `epsym' as entry point address
[-f name] specify library for which this file is an auxiliary
filter
[-F name] specify library for which this file is a filter
[-G] create a shared object
[-h name] use `name' as internal shared object identifier
[-i] ignore LD_LIBRARY_PATH setting
[-I name] use `name' as path of interpreter
[-l x] search for libx.so or libx.a
[-L path] search for libraries in directory `path'
[-m] print memory map
[-M mapfile] use processing directives contained in `mapfile'
[-N string] create a dynamic dependency for `string'
[-o outfile] name the output file `outfile'
[-p auditlib] identify audit library to accompany this object
[-P auditlib] identify audit library for processing the dependencies
of this object
[-Q y | n] do|do not place version information in output file
[-r] create a relocatable object
[-R path] specify a library search path to be used at run time
[-s] strip any symbol and debugging information
[-S supportlib]
specify a link-edit support library
[-t] do not warn of multiply-defined symbols that have
different sizes or alignments
[-u symname] create an undefined symbol `symname'
[-V] print version information
[-Y P,dirlist] use `dirlist' as a default path when searching for
libraries
[-z absexec] when building an executable absolute symbols
referenced in dynamic objects are promoted to
the executable
[-z allextract | defaultextract | weakextract]
extract all member files, only members that resolve
undefined tor tentative symbols, or allow extraction of
archive members to resolvetweak references from
archive files
[-z altexec64] execute the 64-bit link-editor
[-z combreloc] combine multiple relocation sections
[-z defs] disallow undefined symbol references
[-z direct | nodirect]
enable|disable direct binding to shared object
dependencies
[-z endfiltee] marks a filtee such that it will terminate a filters
search
[-z finiarray=function]
name of function to be appended to the .finiarray
[-z groupperm | nogroupperm]
enable|disable setting of group permissions
on dynamic dependencies
[-z help ] print this usage message
[-z ignore | record]
ignore|record unused dynamic dependencies
[-z initarray=function]
name of function to be appended to the .initarray
[-z initfirst] mark object to indicate that its .init section should
be executed before the .init section of any other
objects
[-z interpose] dynamic object is to be an `interposer' on direct
bindings
[-z lazyload | nolazyload]
enable|disable delayed loading of shared object
dependencies
[-z ld32=arg1,arg2,...]
define arguments applicable to the 32-bit class of ld(1)
[-z ld64=arg1,arg2,...]
define arguments applicable to the 64-bit class of ld(1)
[-z loadfltr] mark filter as requiring immediate loading of its
filtees at runtime
[-z muldefs] allow multiply-defined symbols
[-z nocompstrtab]
disable compression of string tables
[-z nodefs] allow undefined symbol references
[-z nodefaultlib]
mark object to ignore any default library search path
[-z nodelete] mark object as non-deletable
[-z nodlopen] mark object as non-dlopen()'able
[-z nodump] mark object as non-dldump()'able
[-z now] mark object as requiring non-lazy binding
[-z nopartial] expand any partially initialized symbols
[-z noversion] don't record any version sections
[-z origin] mark object as requiring $ORIGIN processing
[-z preinitarray=function]
name of function to be appended to the .preinitarray
[-z redlocsym] reduce local syms in .symtab to a minimum
[-z rescan] rescan archive list until no further member
extraction occurs
[-z text] disallow output relocations against text
[-z textoff] allow output relocations against text
[-z textwarn] warn if there are relocations against text
[-z verbose] generate warnings for suspicious processings
---- SUN C COMPILER -----
kirkby@t2:[~] $ cc -flags
-# Verbose mode
-### Show compiler commands built by driver, no compilation
-A<name[(tokens)]> Preprocessor predicate assertion
-B<[static|dynamic]> Specify dynamic or static binding
-C Prevent preprocessor from removing comments
-c Compile only - produce .o files, suppress linking
-D<name[=token]> Associate name with token as if by #define
-d[y|n] dynamic [-dy] or static [-dn] option to linker
-dalign Expands to -xmemalign=8s
-E Compile source through preprocessor only, output to stdout
-errhdr=[<a>] Enable diagnostics from standard or user include files, <a>={%all,%none,%user}
-erroff=<t> Suppress warnings specified by tags t(%none, %all, <tag list>)
-errshort[=<a>] Control amount of type details in error messages, <a>={short|full|tags}
-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=<v> Enable/disable C language features, <v>= {[no%]extinl|[no%]typeof|[no%]extensions|[no%]conststrings}
-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
-fPIC Same as -KPIC
-fpic Same as -Kpic
-fround=<r> Select the IEEE rounding mode in effect at startup
-fsimple[=<n>] Select floating-point optimization preferences <n>
-fsingle Use single-precision arithmetic (-Xt and -Xs modes only)
-ftrap=<t> Select floating-point trapping mode in effect at startup
-G Build a dynamic shared library
-g Compile for debugging
-H Print path name of each file included during compilation
-h <name> Assign <name> to generated dynamic shared library
-I<dir> Add <dir> to preprocessor #include file search path
-i Passed to linker to ignore any LD_LIBRARY_PATH setting
-keeptmp Keep temporary files created during compilation
-KPIC Compile position independent code with 32-bit addresses
-Kpic Compile position independent code
-L<dir> Pass to linker to add <dir> to the library search path
-l<name> Link with library lib<name>.a or lib<name>.so
-m32 set 32-bit addressing model
-m64 set 64-bit addressing model
-mc Remove duplicate strings from .comment section of output files
-misalign Expands to -xmemalign=1i
-misalign2 Expands to -xmemalign=2i
-mr Remove all strings from .comment section of output files
-mr,"string" Remove all strings and append "string" to .comment section
-mt Specify options needed when compiling multi-threaded code
-native Optimize for the host system (-xtarget=native)
-O Use default optimization level (-xO3)
-O<n> Same as -xO<n>
-o <outputfile> Set name of output file to <outputfile>
-P Compile source through preprocessor only, output to .i file
-p Compile for profiling with prof
-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
-shared Same as -G
-U<name> Delete initial definition of preprocessor symbol <name>
-V Report version number of each compilation phase
-v Do stricter semantic checking
-W<c>,<arg> Pass <arg> to specified component <c> (a,c,d,l,m,O,o,p,0,2)
-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
-xalias_level=<a> Enable optimizations based on the specified alias_level
-xarch=<a> Specify target architecture instruction set
-xautopar Enable automatic loop parallelization
-xbinopt={prepare|off} Prepare the binary for binary optimizations and analysis
-xbuiltin[=<b>] When profitable inline, or substitute intrinsic functions for system functions, b={%all,%none}
-xc99[=<a>] Enable ISO C99 features, <a>={all,none,[no_]lib}
-xcache=<c> Define cache properties for use by optimizer
-xCC Accept C++ style comments
-xcg89 Expands to -xarch=v7 -xchip=old -xcache=64/32/1
-xcg92 Expands to -xarch=v8 -xchip=super -xcache=16/32/4:1024/32/1
-xchar=<v> Treat type char as signed (<v> = s or signed) or unsigned (<v> = u or unsigned).
-xchar_byte_order=<o> Specify multi-char byte order <o> (default, high, low)
-xcheck[=<a>[,<a>]] Generate runtime checks for error condition <a>={%all|%none|stkovf|no%stkovf}
-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}
-xcsi Allow C source code using non-ISO C compliant locales
-xdebugformat=<a> Selects the format of debugging information; <a>={dwarf|stabs}
-xdepend[=<yes|no>] Analyze loops for data dependencies
-xdryrun The same as -###
-xe Perform only syntax/semantic checking, no code generation
-xexplicitpar Parallelize loops explicitly marked with directives
-xF=<a>[,<a>] Compile for later mapfile reordering and data fragmentation, <a>={[no%]func|[no%]gbldata|%all|%none}
-xhelp=<f> Display on-line help information f(flags, readme)
-xhwcprof[=<a>] Enable/disable program annotation for hardware counter profiling <a>={enable|disable}
-xinline=[<a>,...,<a>] Attempt inlining of specified user routines, <a>={%auto,func,no%func}
-xipo[=<n>] Enable optimization and inlining across source files, n={0|1|2}
-xipo_archive=<a> Enable crossfile optimization including archive files, <a>={none|readonly|writeback}
-xinstrument=<a> Enable/disable instrumentation for race detection tool, <a>=[no%]datarace
-xjobs=<n> Maximum number of components compiler will fork in parallel
-xldscope=<a> Indicates the appropriate linker scoping within the source program; <a>={global|symbolic|hidden}
-xlibmieee Force IEEE 754 return values for math routines in exceptional cases
-xlibmil Inline selected libm math routines for optimization
-xlibmopt Link with optimized math library
-xlic_lib=sunperf Link in the Sun supplied performance libraries
-xlinkopt[={0,1,2}] Perform optimizations on relocatable object files
-Xlinker <arg> Pass <arg> to linker
-xloopinfo Show loops that parallelized
-xM Generate makefile dependencies
-xM1 Generate makefile dependencies, but exclude /usr/include
-xMD Generate makefile dependencies and compile at once
-xMMD Generate makefile dependencies like -xMD, but excluding standard headers
-xMF <file> Specify output <file> for makefile dependencies dump
-xmaxopt=[off,1,2,3,4,5] maximum optimization level allowed on #pragma opt
-xmemalign[=<a><b>] Controls memory alignment, <a>={1|2|4|8|16}, b={f|i|s}.
-xMerge Merge data segment into text segment
-xnolib Do not link with default system libraries
-xnolibmil Cancel -xlibmil on command line
-xnolibmopt Cancel -xlibmopt on command line
-xnorunpath Do not build a runtime search path into the executable
-xO<n> Generate optimized code (n={1|2|3|4|5})
-xopenmp=<a> Enable OpenMP language extension <a>={noopt|parallel|none}
-xP Print prototypes for function definitions
-xpagesize_heap=<a> Controls the preferred page size for the heap, a={8K|64K|512K|4M|32M|256M|2G|16G|default}
-xpagesize_stack=<a> Controls the preferred page size for the stack, a={8K|64K|512K|4M|32M|256M|2G|16G|default}
-xpagesize=<a> Controls the preferred page size for the stack and for the heap, a={8K|64K|512K|4M|32M|256M|2G|16G|default}
-xparallel Perform parallel compilation
-xpch=<p> Enable precompiled headers. Collect data for, or use existing, PCH file <p>={auto|autofirst|{collect,use}:<file>[.cpch]}
-xpchstop=<file> Specified include file marks end of initial common sequence of pre-processing directives for precompiled headers.
-xpg Compile for profiling with gprof
-xprefetch[=<p>] Specify instruction prefetch p (auto,no%auto,explicit,no%explicit,latx:<n>.<n>)
-xprefetch_auto_type=<a> Specify automatic indirect prefetch insertion for loops; <a>=[no%]indirect_array_access
-xprefetch_level[=<n>] Controls the aggressiveness of the -xprefetch=auto option (n={1|2|3})
-xprofile=<p> Collect data for a profile or use a profile to optimize <p>={{collect,use}[:<path>],tcov}
-xprofile_ircache[=path] Path to intermediate file cache used with -xprofile option
-xprofile_pathmap=<collect-path>:<use-path> Map object file path from <collect-path> to <use-path>
-xreduction Recognize reduction operations in parallelized loops
-xregs=<r> Specify the usage of optional registers
-xrestrict[=<f>] Treat pointer valued function parameters as restricted f(%none,%all,<function-name list>)
-xs Allow debugging without object (.o) files
-xsafe=mem Assume that no memory based traps will occur
-xsb Compile for use with the WorkShop source browser
-xsbfast Generate only WorkShop source browser information, no compilation
-xsfpconst Represent unsuffixed floating point constants as single precision
-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>
-xthreadvar=<a>[,<a>] Control code generation for thread variables <a>={[no%]dynamic|[no%]stack|%all|%none}
-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
-xustr=<a> Recognize sixteen-bit string literals <a>={no|ascii_utf16_ushort}
-xvector[=<a>] automatic generation of calls to the vector library functions and/or the generation of the SIMD instructions, <a>={[no%]lib|%none}
-xvis[=<yes|no>] Enable the use of VIS inline templates
-xvpara Verbose parallelization warnings
-Y<c>,<dir> Specify <dir> for location of component <c> (a,c,l,m,p,0,2,o)
-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
-YS,<dir> Change default directory for startup object files
-Zll Create lock_lint database files (.ll)
------ SUN C++ COMPILER ---------
kirkby@t2:[~] $ CC -flags
________________________________________________________________________________
Items within [ ] are optional. Items within < > are variable parameters.
Bar | indicates choice of literal values.
________________________________________________________________________________
+d Do not expand inline functions
+e0 In compatibility mode, don't emit any virtual tables
+e1 In compatibility mode, emit a global vtable for every defined class
+p Ignore non-standard preprocessor asserts
+w Print warnings about additional questionable constructs
+w2 Emit warnings for code with additional portability problems
-a Same as -xa
-Bdynamic Allow dynamic linking
-Bstatic Require static linking
-Bsymbolic Bind references to global symbols to their definitions
-c Compile only; produce .o files but suppress linking
-cg89 Same as -xcg89
-cg92 Same as -xcg92
-compat=5 Standard mode; accept source code that conforms to the C++ standard (default mode)
-compat[=4] Compatibility mode; accept ARM-style source code and generate object code compatible with C++ 4.2 (compatibility mode)
-D<name>[=<token>] Define preprocessor symbol <name> with <token>
-dalign Expands to -xmemalign=8s
-dryrun Same as -xdryrun
-d{y|n} Allow or disallow dynamic libraries for the entire executable
-E Run preprocessor on source files; don't compile; send to stdout
-erroff[=<t>[,<t>...]] Suppress specified warnings; <t>={%all|%none|<msgtag>}
-errtags[=<b>] Display messages with tags; <b>={yes|no}
-errwarn[=<t>[,<t>...]] Treats warnings specified by tags as errors; <t>={%all|%none|<msgtag>}
-fast Optimize for speed using a selection of options
-features=<f>[,<f>...] Enable/disable various C++ language features
-filt[=<a>[,<a>...]] Control the filtering of both linker and compiler error messages
-flags Same as -xhelp=flags
-fma=<n> Enable floating-point multiply-add instructions; <n>={none|fused}
-fnonstd Initialize floating-point hardware to non-standard preferences
-fns[={yes|no}] Select non-standard floating point mode
-fround=<r> Select the IEEE rounding mode in effect at startup
-fsimple[=<n>] Select floating-point optimization level; <n>={1|0|2}
-ftrap=<t>[,<t>...] Select floating-point trapping mode in effect at startup
-G Build a dynamic shared library
-g Compile for debugging
-g0 Compile for debugging by dbx but allow inlining
-H Print path name of each file included during compilation
-h<name> Assign <name> to generated dynamic shared library
-help Same as -xhelp=flags
-I- Override the default search path for include files
-I<path> Add path to #include file search paths
-i Tell linker to ignore any LD_LIBRARY_PATH setting
-inline=[<a>[,<a>...]] Same as -xinline=[<a>[,<a>...]]
-instances=<a> Control the link attributes of template instantiations
-instlib=<library> Inhibit generation of instances already in <library>
-KPIC Same as -xcode=pic32
-Kpic Same as -xcode=pic13
-L<path> Pass to linker to add <path> to the library search paths
-l<name> Add lib<name>.a or lib<name>.so to linker search list
-libmieee Same as -xlibmieee
-libmil Same as -xlibmil
-library=<l>[,<l>...] Force inclusion/exclusion of specified CC-provided libraries
-m32 Set 32-bit addressing model
-m64 Set 64-bit addressing model
-mc Remove duplicate strings from .comment section of output files
-migration Show where to get information about migrating from C++ 4.2
-misalign Expands to -xmemalign=1i
-mr Remove all strings from .comment section of output files
-mr,<string> Remove all strings and append <string> to .comment section
-mt Specify options needed when compiling multi-threaded code
-native Same as -xtarget=native
-noex Same as -features=no%except
-nolib Same as -xnolib
-nolibmil Same as -xnolibmil
-norunpath Do not build a runtime search path into the executable
-O Same as -xO3
-O<n> Same as -xO<n>
-o <outputfile> Set name of output file or executable to <outputfile>
-P Compile source through preprocessor only, output to .i file
-PIC Same as -KPIC
-p Compile for profiling with prof
-pg Same as -xpg
-pic Same as -xcode=pic13
-pta Same as -template=wholeclass
-pti<path> Use additional <path> for locating template definition file
-pto Same as -instances=static
-ptv Same as -verbose=template
-Qoption <p> <o>[,<o>...] Pass option <o> to compilation phase <p>
-qp Same as -p
-R<p>[:<p>...] Build runtime search path list into executable
-readme Same as -xhelp=readme
-S Compile and only generate assembly code (.s)
-s Strip symbol table from the executable file
-sb Same as -xsb
-sbfast Same as -xsbfast
-staticlib=<l>[,<l>...] Force linkage of specified libraries to be static
-sync_stdio=<a> Controls synchronization of the I/O libraries; <a>={yes|no}
-temp=<path> Use <path> as directory for temporary files
-template=<a>[,<a>...] Enable/disable various template options
-time Same as -xtime
-U<name> Delete initial definition of preprocessor symbol <name>
-unroll=<n> Same as -xunroll=<n>
-V Same as -verbose=version
-v Same as -verbose=diags
-vdelx In compatiblity mode, call _vector_deletex_ instead of _vector_delete_
-verbose=<a>[,<a>...] Control verbosity during compilation
-w Suppress most compiler warning messages
-Xm Support dollar character in C++ identifiers
-xa Collect data for tcov basic block profiling (old format)
-xalias_level[=<a>] Enable optimizations based on the specified alias_level; <a>={compatible|any|simple}
-xar Create archive library with instantiated templates
-xarch=<isa> Specify target architecture instruction set
-xautopar Enable automatic loop parallelization
-xbinopt={prepare|off} Prepare the binary for future binary optimizations and analysis
-xbuiltin[=<a>] Enable profitable inline or substitute intrinsic functions; <a>={%all|%none}
-xcache=<c> Define cache properties for use by optimizer
-xcg89 Same as -xtarget=ss2
-xcg92 Same as -xtarget=ss1000
-xchar=<a> Treat type char as signed or unsigned; <a>={s|signed|u|unsigned}
-xcheck[=<a>[,<a>...]] Generate runtime checks for error condition <a>={%all|%none|stkovf|no%stkovf}
-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={1|0}
-xdebugformat=<a> Selects the format of debugging information; <a>={dwarf|stabs}
-xdepend[=<b>] Analyze loops for data dependencies; <b>={yes|no}
-xdryrun Show compiler commands built by driver; no compilation
-xdumpmacros[=<a>[,<a>...]] Prints macro definitions on the standard error output
-xe Perform only syntax/semantic checking, no code generation
-xF[=<a>[,<a>...]] Compile for later mapfile reordering; <a>={[no%]func|[no%]gbldata|[no%]lcldata|%all|%none}
-xhelp=<f> Display on-line help information; <f>={flags|readme}
-xhwcprof[=<a>] Enable/disable program annotation for hardware counter profiling; <a>={enable|disable}
-xia Enable interval arithmetic
-xinline=[<a>[,<a>...]] Attempt inlining of specified user routines, <a>={%auto|[no%]<func>}
-xinstrument=<a> Enable/disable instrumentation for race detection tool, <a>=[no%]datarace
-xipo[=<n>] Perform interprocedural analysis and optimizations, <n>={1|0|2}
-xipo_archive=<a> Enable crossfile optimization including archive files; <a>={none|readonly|writeback}
-xjobs=<n> Maximum number of components compiler will fork in parallel
-xlang=<a>[,<a>...] The set of languages used in the program; <a>={f95|f90|f77|c99}
-xldscope=<a> Indicates the appropriate linker scoping within the source program; <a>={global|symbolic|hidden}
-xlibmieee Force IEEE 754 return values for math routines in exceptional cases
-xlibmil Inline selected libm math routines for optimization
-xlibmopt Link with optimized math library
-xlic_lib=<l>[,<l>...] Link with Sun supplied licensed libraries listed in <l>
-xlinkopt[=<n>] Perform optimizations on relocatable object files, <n>={1|0|2}
-xloopinfo Show loops that parallelized
-xM Generate makefile dependencies
-xM1 Generate makefile dependencies, but exclude /usr/include
-xMD Same as -xM, but put dependency into file (.d) and continue compilation
-xMerge Merge data segment into text segment
-xMF <dependencyfile> Specify file name for makefile dependency output
-xMMD Same as -xM1, but put dependency into file (.d) and continue compilation
-xmaxopt[=<l>] Maximum optimization level allowed on #pragma opt; <l>={5|off|1|2|3|4}
-xmemalign[=<a><b>] Controls memory alignment; <a>={1|2|4|8|16}, <b>={i|s|f}
-xnolib Do not link with default system libraries
-xnolibmil Cancel -xlibmil on command line
-xnolibmopt Cancel -xlibmopt on command line
-xO<n> Generate optimized code; <n>={1|2|3|4|5}
-xopenmp[=<a>] Enable OpenMP language extension; <a>={parallel|noopt|none}
-xpagesize=<a> Controls the preferred page size for the stack and for the heap; <a>={8K|64K|512K|4M|32M|256M|2G|16G|default}
-xpagesize_heap=<a> Controls the preferred page size for the heap; <a>={8K|64K|512K|4M|32M|256M|2G|16G|default}
-xpagesize_stack=<a> Controls the preferred page size for the stack; <a>={8K|64K|512K|4M|32M|256M|2G|16G|default}
-xpch=<a> Enable precompiled headers. Collect data for, or use existing, PCH file; <a>={auto|autofirst|{collect|use}:<file>[.Cpch]}
-xpchstop=<file> Specified include file marks end of initial common sequence of pre-processing directives for precompiled headers
-xpg Compile for profiling with gprof
-xport64[=<a>] Enable extra checking for code ported from 32-bit to 64-bit platforms; <a>={full|implicit|no}
-xprefetch[=<a>[,<a>...]] Enable prefetch instructions; <a>={yes|no|[no%]auto|[no%]explicit|latx:<n>.<n>}
-xprefetch_auto_type=<a> Specify automatic indirect prefetch insertion for loops; <a>=[no%]indirect_array_access
-xprefetch_level[=<n>] Controls the aggressiveness of automatic generation of prefetch instructions; <n>={1|2|3}
-xprofile=collect[:<a>] Compile for profile feedback data collection
-xprofile=tcov Compile for tcov basic block profiling (new format)
-xprofile=use[:<a>] Optimize with runtime profile data feedback
-xprofile_ircache[=<path>] Path to intermediate file cache used with -xprofile option
-xprofile_pathmap=<collect-path>:<use-path> Map object file path from <collect-path> to <use-path>
-xreduction Recognize reduction operations in parallelized loops
-xregs=<r>[,<r>...] Specify the usage of optional registers
-xrestrict[=<f>[,<f>...]] Treat pointer-valued function parameters as restricted; <f>={%source|%all|%none|<function-name list>}
-xs Allow debugging without object (.o) files
-xsafe=mem Assume that no memory based traps will occur
-xsb Compile for use with the WorkShop source browser
-xsbfast Generate only WorkShop source browser information; no compilation
-xspace Do not do optimizations that increase code size
-xtarget=<t> Specify target system for optimization
-xthreadvar[=<a>[,<a>...]] Specify thread-local storage; <a>={%all|%none|[no%]dynamic}
-xtime Report the execution time for each compilation phase
-xtrigraphs[=<b>] Enable|disable trigraph translation; <b>={yes|no}
-xunroll=<n> Enable unrolling loops n times where possible
-xustr=<a> Support sixteen-bit string literals; <a>={ascii_utf16_ushort|no}
-xvector[=<a>] automatic generation of calls to the vector library functions and/or the generation of the SIMD instructions. <a>={[no%]lib|%none}
-xvis[={yes|no}] Enable the use of VIS inline templates
-xwe Convert all warnings to errors
-z <x> Link editor option
All other options are passed down to ld.
Suffix 'a' Object library
Suffix 'il' Inline expansion file
Suffix 'o' Object file
Suffix 'so' Shared object
Suffix 's' Assembler source
Suffix 'S' Assembler source for cpp
Suffix 'c' C++ source
Suffix 'cc' C++ source
Suffix 'cxx' C++ source
Suffix 'cpp' C++ source
Suffix 'C' C++ source
Suffix 'c++' C++ source
Suffix 'i' C++ source after preprocessing
Suffix 'err' ld error file
Ok, first of all, scons seems to detect gcc as C-Compiler, but sun's C++-compiler. This might also cause the "merged" option settings. What happens, if you add CC=/usr/ucb/cc (or whatever the C-compiler is).
k, first of all, scons seems to detect gcc as C-Compiler, but sun's C++-compiler. This might also cause the "merged" option settings. What happens, if you add CC=/usr/ucb/cc (or whatever the C-compiler is) to the command line (something like
scons . CC="path"
) or tocustom.py?
The problem in Sage is that it needs to use gcc - there are too many packages which rely on things specific to the GNU compiler to make it easy to build with Sun's compiler suite. So setting CC=/opt/SUNWspro/bin/cc which is the actual location of the file (though there are links elsewhere) would cause Sage to break well before it hits ploybori.
It would probably be easier if you tested this youself as you know about the code a lot more than me. I can create you an account on the machine 't2' where this problem was observed if you want.
This built ok on my machine at home, since CC was not installed. It appears that it is probably checking for CC and using that in preference to g++.
Drop me a private email if you want an account on the machine.
Sorry if I seemed a 'bit off' earlier. I do get a bit annoyed some times by 'GNUisms' but this one struck me as particularly unique, as it was mixing up Sun flags on the GNU tools. The usual problem with open-source software is that it used GNU specific flags too much. Anyway, I apologise.
Dave
Ok, there are several ways to force consistent settings in scons. I'll have a look at it. I'll contact you per e-mail for the account.
This had been fixed then. But it might be a recurring issue, since we do not know whether somebody has been using this environment during the meantime.
Does anyone have information about that?