Thread: Fwd: Solaris build of 7.4 problem with --enable-thread-safety

Fwd: Solaris build of 7.4 problem with --enable-thread-safety

From
Seum-Lim Gan
Date:
>Date: Mon, 24 Nov 2003 10:11:15 -0600
>To: pgsql-ports@postgresql.org
>From: Seum-Lim Gan <slgan@lucent.com>
>Subject: Solaris build of 7.4 problem with --enable-thread-safety
>Cc: Josh Berkus <josh@agliodbs.com>
>Bcc:
>X-Attachments:
>
>Hi Josh,
>
>Is there someone could look into this ?
>I have narrowed down the problem.
>
>Thanks.
>
>Gan
>
>
>This problem will only occur if I configure to use
>the --enable-thread-safety option.
>
>Here is the configure options I used:
>
>MYCC=/opt/SUNWspro6.2/SUNWspro/bin/cc
>
>/bin/env CC=$MYCC CFLAGS='-C -mt -D_SVR4 ' ./configure \
>--prefix=/platdb \
>--with-pgport=5333 \
>--without-readline \
>--with-CXX \
>--with-perl \
>--with-java \
>--with-pam \
>--enable-syslog \
>--enable-nls \
>--enable-thread-safety
>
>Wihout the --enable-thread-safety option, everything compiled fine.
>
>With --enable-thread-safety, it failed while trying to compile the
>src/interfaces/ecpg/ecpglib
>
>I have already cut down my configure to have just the following and
>compile failed the same way:
>
>MYCC=/opt/SUNWspro6.2/SUNWspro/bin/cc
>
>/bin/env CC=$MYCC CFLAGS='-C -mt -D_SVR4 ' ./configure \
>--prefix=/platdb \
>--without-readline \
>--enable-thread-safety
>
>Below is the make output:
>
>make[4]: Entering directory
>`/n/DBMS/edbteam/src/sol8/sparc64/postgresql-7.4/src/interfaces/ecpg/ecpglib'
>/opt/SUNWspro6.2/SUNWspro/bin/cc -Xa -G -h libecpg.so.4 execute.o
>typename.o descriptor.o data.o error.o prepare.o memory.o connect.o
>misc.o -L../../../../src/port -L../pgtypeslib -lpgtypes
>-L../../../../src/interfaces/libpq -lpq -lm -pthread -R/platdb/lib
>-o libecpg.so.4.0
>cc: Warning: multiple use of -h option, previous one discarded.
>ld: fatal: recording name conflict: file
>`../../../../src/interfaces/libpq/libpq.so' and -h option provide
>identical dependency names: read
>ld: fatal: File processing errors. No output written to libecpg.so.4.0
>make[4]: *** [libecpg.so.4.0] Error 1
>make[4]: Leaving directory
>`/n/DBMS/edbteam/src/sol8/sparc64/postgresql-7.4/src/interfaces/ecpg/ecpglib'
>make[3]: *** [all] Error 2
>make[3]: Leaving directory
>`/n/DBMS/edbteam/src/sol8/sparc64/postgresql-7.4/src/interfaces/ecpg'
>make[2]: *** [all] Error 2
>make[2]: Leaving directory
>`/n/DBMS/edbteam/src/sol8/sparc64/postgresql-7.4/src/interfaces'
>make[1]: *** [all] Error 2
>make[1]: Leaving directory
>`/n/DBMS/edbteam/src/sol8/sparc64/postgresql-7.4/src'
>make: *** [all] Error 2
>
>
>At 2:44 pm -0600 2003/11/21, Seum-Lim Gan wrote:
>>Hi,
>>
>>I did not get any respond to this build error.
>>How should I proceed with this ?
>>Is there anything in the makefile I need to change ?
>>
>>I did not get this build error when I way compiling the 7.4b4.
>>
>>Thanks.
>>
>>Gan
>>
>>At 11:45 am -0600 2003/11/20, Seum-Lim Gan wrote:
>>>Hi,
>>>
>>>I tried to compile the new 7.4 in Solaris 2.9 Sparc
>>>and Solaris 2.8 intel and got the same make error:
>>>
>>>Solaris 8 intel:
>>>================
>>>/opt/SUNWspro6.2/SUNWspro/bin/cc -Xa -G -h libecpg.so.4 execute.o
>>>typename.o descriptor.o data.o error.o prepare.o memory.o
>>>connect.o misc.o -L../../../../src/port -L../pgtypeslib -lpgtypes
>>>-L../../../../src/interfaces/libpq -lpq -lm -pthread -R/platdb/lib
>>>-o libecpg.so.4.0
>>>cc: Warning: multiple use of -h option, previous one discarded.
>>>ld: fatal: recording name conflict: file
>>>`../../../../src/interfaces/libpq/libpq.so' and -h option provide
>>>identical dependency names: read
>>>ld: fatal: File processing errors. No output written to libecpg.so.4.0
>>>make[4]: *** [libecpg.so.4.0] Error 1
>>>make[4]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol8/intel32/postgresql-7.4/src/interfaces/ecpg/ecpglib'
>>>make[3]: *** [all] Error 2
>>>make[3]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol8/intel32/postgresql-7.4/src/interfaces/ecpg'
>>>make[2]: *** [all] Error 2
>>>make[2]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol8/intel32/postgresql-7.4/src/interfaces'
>>>make[1]: *** [all] Error 2
>>>make[1]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol8/intel32/postgresql-7.4/src'
>>>make: *** [all] Error 2
>>>
>>>
>>>Solaris 9 Sparc:
>>>================
>>>/opt/SUNWspro6.2/SUNWspro/bin/cc -Xa -G -h libecpg.so.4 execute.o
>>>typename.o descriptor.o data.o error.o prepare.o memory.o
>>>connect.o misc.o -L../../../../src/port -L../pgtypeslib -lpgtypes
>>>-L../../../../src/interfaces/libpq -lpq -lm -pthread -R/platdb/lib
>>>-o libecpg.so.4.0
>>>cc: Warning: multiple use of -h option, previous one discarded.
>>>ld: fatal: recording name conflict: file
>>>`../../../../src/interfaces/libpq/libpq.so' and -h option provide
>>>identical dependency names: read
>>>ld: fatal: File processing errors. No output written to libecpg.so.4.0
>>>make[4]: *** [libecpg.so.4.0] Error 1
>>>make[4]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol9/sparc64/postgresql-7.4/src/interfaces/ecpg/ecpglib'
>>>make[3]: *** [all] Error 2
>>>make[3]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol9/sparc64/postgresql-7.4/src/interfaces/ecpg'
>>>make[2]: *** [all] Error 2
>>>make[2]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol9/sparc64/postgresql-7.4/src/interfaces'
>>>make[1]: *** [all] Error 2
>>>make[1]: Leaving directory
>>>`/n/DBMS/edbteam/src/sol9/sparc64/postgresql-7.4/src'
>>>make: *** [all] Error 2
>>>
>>>
>>>Could you help ?
>>>
>>>Thanks.
>>>
>>>Gan
>
>-

--
+--------------------------------------------------------+
| Seum-Lim GAN                 email : slgan@lucent.com  |
| Lucent Technologies                                    |
| 2000 N. Naperville Road, 6B-403F  tel : (630)-713-6665 |
| Naperville, IL 60566, USA.        fax : (630)-713-7272 |
|       web : http://inuweb.ih.lucent.com/~slgan         |
+--------------------------------------------------------+

Re: Fwd: Solaris build of 7.4 problem with --enable-thread-safety

From
Peter Eisentraut
Date:
Seum-Lim Gan writes:

> >make[4]: Entering directory
> >`/n/DBMS/edbteam/src/sol8/sparc64/postgresql-7.4/src/interfaces/ecpg/ecpglib'
> >/opt/SUNWspro6.2/SUNWspro/bin/cc -Xa -G -h libecpg.so.4 execute.o
> >typename.o descriptor.o data.o error.o prepare.o memory.o connect.o
> >misc.o -L../../../../src/port -L../pgtypeslib -lpgtypes
> >-L../../../../src/interfaces/libpq -lpq -lm -pthread -R/platdb/lib
> >-o libecpg.so.4.0
> >cc: Warning: multiple use of -h option, previous one discarded.
> >ld: fatal: recording name conflict: file
> >`../../../../src/interfaces/libpq/libpq.so' and -h option provide
> >identical dependency names: read
> >ld: fatal: File processing errors. No output written to libecpg.so.4.0
> >make[4]: *** [libecpg.so.4.0] Error 1

Could you try to set your compiler into some kind of verbose mode, where
it prints out the commands it executes internally?  I suspect that the
addition of the -pthread option results in side effects that interfere
with the -h option.

--
Peter Eisentraut   peter_e@gmx.net

Re: Fwd: Solaris build of 7.4 problem with

From
Seum-Lim Gan
Date:
Hi Peter,

I got the output from the cc verbose (-#).
Looks like there is a "-hread" towards the end.

Thanks.

Gan

/opt/SUNWspro6.2/SUNWspro/bin/cc -# -Xa -G -h libecpg.so.4 execute.o
typename.o descriptor.o data.o error.o prepare.o memory.o connect.o
misc.o -L../../../../src/port -L../pgtypeslib -lpgtypes
-L../../../../src/interfaces/libpq -lpq -lm -pthread -R/platdb/lib -o
libecpg.so.4.0
cc: Warning: multiple use of -h option, previous one discarded.
### Note: NLSPATH =

/opt/SUNWspro6.2/SUNWspro/bin/../WS6U2/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro6.2/SUNWspro/bin/../WS6U2/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
###     command line files and options (expanded):
### -p -Xa -G execute.o typename.o descriptor.o data.o error.o
prepare.o memory.o connect.o misc.o -L../../../../src/port
-L../pgtypeslib -lpgtypes -L../../../../src/interfaces/libpq -lpq -lm
-t -R/platdb/lib -o libecpg.so.4.0
### Note: LD_LIBRARY_PATH = <null>
### Note: LD_RUN_PATH = <null>
/usr/ccs/bin/ld /opt/SUNWspro6.2/SUNWspro/WS6U2/lib/crti.o
/opt/SUNWspro6.2/SUNWspro/WS6U2/lib/values-xa.o -o libecpg.so.4.0 -G
execute.o typename.o descriptor.o data.o error.o prepare.o memory.o
connect.o misc.o -L../../../../src/port -L../pgtypeslib -lpgtypes
-L../../../../src/interfaces/libpq -lpq -lm -t -R/platdb/lib -hread
-Y

"P,/opt/SUNWspro6.2/SUNWspro/WS6U2/lib/libp:/usr/ccs/lib/libp:/usr/lib/libp:/opt/SUNWspro6.2/SUNWspro/WS6U2/lib:/usr/ccs/lib:/usr/lib"

-Qy /opt/SUNWspro6.2/SUNWspro/WS6U2/lib/crtn.o
ld: fatal: recording name conflict: file
`../../../../src/interfaces/libpq/libpq.so' and -h option provide
identical dependency names: read
ld: fatal: File processing errors. No output written to libecpg.so.4.0



At 8:32 pm +0100 2003/11/24, Peter Eisentraut wrote:
>Seum-Lim Gan writes:
>
>>  >make[4]: Entering directory
>>  >`/n/DBMS/edbteam/src/sol8/sparc64/postgresql-7.4/src/interfaces/ecpg/ecpglib'
>>  >/opt/SUNWspro6.2/SUNWspro/bin/cc -Xa -G -h libecpg.so.4 execute.o
>>  >typename.o descriptor.o data.o error.o prepare.o memory.o connect.o
>>  >misc.o -L../../../../src/port -L../pgtypeslib -lpgtypes
>>  >-L../../../../src/interfaces/libpq -lpq -lm -pthread -R/platdb/lib
>>  >-o libecpg.so.4.0
>>  >cc: Warning: multiple use of -h option, previous one discarded.
>>  >ld: fatal: recording name conflict: file
>>  >`../../../../src/interfaces/libpq/libpq.so' and -h option provide
>>  >identical dependency names: read
>>  >ld: fatal: File processing errors. No output written to libecpg.so.4.0
>>  >make[4]: *** [libecpg.so.4.0] Error 1
>
>Could you try to set your compiler into some kind of verbose mode, where
>it prints out the commands it executes internally?  I suspect that the
>addition of the -pthread option results in side effects that interfere
>with the -h option.
>
>--
>Peter Eisentraut   peter_e@gmx.net


--
+--------------------------------------------------------+
| Seum-Lim GAN                 email : slgan@lucent.com  |
| Lucent Technologies                                    |
| 2000 N. Naperville Road, 6B-403F  tel : (630)-713-6665 |
| Naperville, IL 60566, USA.        fax : (630)-713-7272 |
|       web : http://inuweb.ih.lucent.com/~slgan         |
+--------------------------------------------------------+

Re: Fwd: Solaris build of 7.4 problem with

From
Peter Eisentraut
Date:
Seum-Lim Gan writes:

> I got the output from the cc verbose (-#).
> Looks like there is a "-hread" towards the end.

Apparently, your compiler does not understand the -pthread option.  I've
read on the net that the Sun compiler options for thread-safety have
changed a few times, but I haven't found a system yet.  If you just want
to get going, edit src/template/solaris and replace -pthread by the right
option (-mt in your case?).

--
Peter Eisentraut   peter_e@gmx.net

Re: Fwd: Solaris build of 7.4 problem with

From
Seum-Lim Gan
Date:
Hi Peter,

You are right. I looked at the man page and it does not
have the -pthread option but the -mt option.

Perhaps there is a way to automate and detect which
one it has ?

I find in the man page that there is another option
-###, which is like -# but does not actually execute:

      The following options are interpreted by cc:

      -#   Show each component as it is invoked (verbose mode).

      -### Show each component as it is invoked, but, unlike the
           -# option, do not actually execute.

Maybe a better way is to do cc -flags and it will return
all the flags and then grep for pthread and see if it is a valid
option. Here is the output of 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
-erroff=<t>     Suppress warnings specified by tags t(%none, %all, <tag list>)
-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
-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
-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
-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)
-noqueue        Disable queuing of compiler license requests
-O              Use default optimization level (-xO2)
-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
-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,l,m,p,0,2,o)
-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
-xa             Collect data for tcov basic block profiling (old format)
-xalias_level=<a>       Enable optimizations based on the specified alias_level
-xarch=<a>      Specify target architecture instruction set
-xautopar       Enable automatic loop parallelization (requires
WorkShop license)
-xbuiltin[=<b>] When profitable inline, or substitute intrinisic
functions for system functions, b={%all,%none}
-xc99[=<a>]     Enable ISO C99 features, <a>={%all,%none}
-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_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}
-xcsi           Allow C source code using non-ISO C compliant locales
-xdepend        Analyze loops for data dependencies
-xe             Perform only syntax/semantic checking, no code generation
-xexplicitpar   Parallelize loops explicitly marked with directives
(requires WorkShop license)
-xF             Compile for later mapfile reordering
-xhelp=<f>      Display on-line help information f(flags, readme)
-xildoff        Cancel -xildon
-xildon         Enable use of the incremental linker, ild
-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}
-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
-xloopinfo      Show loops that parallelized (requires WorkShop license)
-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
-xmemalign[=<a><b>]     Controls memory alignment, <a>={1|2|4|8|16}, b={i|s}.
-xMerge         Merge data segment into text segment
-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})
-xopenmp        Enable OpenMP language extension
-xP             Print prototypes for function definitions
-xparallel      Perform parallel compilation
-xpg            Compile for profiling with gprof
-xprefetch[=<p>]        Specify instruction prefetch p
(auto,no%auto,explicit,no%explicit,latx:<n>.<n>)
-xprofile=<p>   Collect data for a profile or use a profile to
optimize <p>={{collect,use}[:<path>],tcov}
-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>
-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
-xvector<=yes|no>       Automatic Generation of calls to vector
library functions
-xvpara         Verbose parallelization warnings (requires WorkShop license)
-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)
-Zlp            Compile for looptool profiling

Thanks.

Gan

At 7:41 am +0100 2003/11/26, Peter Eisentraut wrote:
>Seum-Lim Gan writes:
>
>>  I got the output from the cc verbose (-#).
>>  Looks like there is a "-hread" towards the end.
>
>Apparently, your compiler does not understand the -pthread option.  I've
>read on the net that the Sun compiler options for thread-safety have
>changed a few times, but I haven't found a system yet.  If you just want
>to get going, edit src/template/solaris and replace -pthread by the right
>option (-mt in your case?).
>
>--
>Peter Eisentraut   peter_e@gmx.net
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


--
+--------------------------------------------------------+
| Seum-Lim GAN                 email : slgan@lucent.com  |
| Lucent Technologies                                    |
| 2000 N. Naperville Road, 6B-403F  tel : (630)-713-6665 |
| Naperville, IL 60566, USA.        fax : (630)-713-7272 |
|       web : http://inuweb.ih.lucent.com/~slgan         |
+--------------------------------------------------------+

Re: Fwd: Solaris build of 7.4 problem with

From
Bruce Momjian
Date:
I think we need some code in templates/solaris to identify the compiler
and use -pthread for gcc and -mt for Sun's compiler.

Would you please try the attached patch and let us know how it works.
If it works, we can include it in 7.4.1.

---------------------------------------------------------------------------

Seum-Lim Gan wrote:
> Hi Peter,
>
> You are right. I looked at the man page and it does not
> have the -pthread option but the -mt option.
>
> Perhaps there is a way to automate and detect which
> one it has ?
>
> I find in the man page that there is another option
> -###, which is like -# but does not actually execute:
>
>       The following options are interpreted by cc:
>
>       -#   Show each component as it is invoked (verbose mode).
>
>       -### Show each component as it is invoked, but, unlike the
>            -# option, do not actually execute.
>
> Maybe a better way is to do cc -flags and it will return
> all the flags and then grep for pthread and see if it is a valid
> option. Here is the output of 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
> -erroff=<t>     Suppress warnings specified by tags t(%none, %all, <tag list>)
> -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
> -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
> -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
> -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)
> -noqueue        Disable queuing of compiler license requests
> -O              Use default optimization level (-xO2)
> -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
> -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,l,m,p,0,2,o)
> -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
> -xa             Collect data for tcov basic block profiling (old format)
> -xalias_level=<a>       Enable optimizations based on the specified alias_level
> -xarch=<a>      Specify target architecture instruction set
> -xautopar       Enable automatic loop parallelization (requires
> WorkShop license)
> -xbuiltin[=<b>] When profitable inline, or substitute intrinisic
> functions for system functions, b={%all,%none}
> -xc99[=<a>]     Enable ISO C99 features, <a>={%all,%none}
> -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_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}
> -xcsi           Allow C source code using non-ISO C compliant locales
> -xdepend        Analyze loops for data dependencies
> -xe             Perform only syntax/semantic checking, no code generation
> -xexplicitpar   Parallelize loops explicitly marked with directives
> (requires WorkShop license)
> -xF             Compile for later mapfile reordering
> -xhelp=<f>      Display on-line help information f(flags, readme)
> -xildoff        Cancel -xildon
> -xildon         Enable use of the incremental linker, ild
> -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}
> -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
> -xloopinfo      Show loops that parallelized (requires WorkShop license)
> -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
> -xmemalign[=<a><b>]     Controls memory alignment, <a>={1|2|4|8|16}, b={i|s}.
> -xMerge         Merge data segment into text segment
> -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})
> -xopenmp        Enable OpenMP language extension
> -xP             Print prototypes for function definitions
> -xparallel      Perform parallel compilation
> -xpg            Compile for profiling with gprof
> -xprefetch[=<p>]        Specify instruction prefetch p
> (auto,no%auto,explicit,no%explicit,latx:<n>.<n>)
> -xprofile=<p>   Collect data for a profile or use a profile to
> optimize <p>={{collect,use}[:<path>],tcov}
> -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>
> -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
> -xvector<=yes|no>       Automatic Generation of calls to vector
> library functions
> -xvpara         Verbose parallelization warnings (requires WorkShop license)
> -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)
> -Zlp            Compile for looptool profiling
>
> Thanks.
>
> Gan
>
> At 7:41 am +0100 2003/11/26, Peter Eisentraut wrote:
> >Seum-Lim Gan writes:
> >
> >>  I got the output from the cc verbose (-#).
> >>  Looks like there is a "-hread" towards the end.
> >
> >Apparently, your compiler does not understand the -pthread option.  I've
> >read on the net that the Sun compiler options for thread-safety have
> >changed a few times, but I haven't found a system yet.  If you just want
> >to get going, edit src/template/solaris and replace -pthread by the right
> >option (-mt in your case?).
> >
> >--
> >Peter Eisentraut   peter_e@gmx.net
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
> --
> +--------------------------------------------------------+
> | Seum-Lim GAN                 email : slgan@lucent.com  |
> | Lucent Technologies                                    |
> | 2000 N. Naperville Road, 6B-403F  tel : (630)-713-6665 |
> | Naperville, IL 60566, USA.        fax : (630)-713-7272 |
> |       web : http://inuweb.ih.lucent.com/~slgan         |
> +--------------------------------------------------------+
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073