1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +03:00

Remove traces of support for Sun Studio compiler

Per discussion, this compiler suite is no longer maintained, and
it has not been able to compile PostgreSQL since at least PostgreSQL
17.

This removes all the remaining support code for this compiler.

Note that the Solaris operating system continues to be supported, but
using GCC as the compiler.

Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/a0f817ee-fb86-483a-8a14-b6f7f5991b6e%40eisentraut.org
This commit is contained in:
Peter Eisentraut
2025-09-11 11:55:29 +02:00
parent e92677e863
commit 25f36066dd
21 changed files with 24 additions and 485 deletions

View File

@@ -157,19 +157,12 @@ ld -Bshareable -o foo.so foo.o
<listitem>
<para>
The compiler flag to create <acronym>PIC</acronym> is
<option>-KPIC</option> with the Sun compiler and
<option>-fPIC</option> with <application>GCC</application>. To
link shared libraries, the compiler option is
<option>-G</option> with either compiler or alternatively
<option>-shared</option> with <application>GCC</application>.
<programlisting>
cc -KPIC -c foo.c
cc -G -o foo.so foo.o
</programlisting>
or
<programlisting>
gcc -fPIC -c foo.c
gcc -G -o foo.so foo.o
gcc -shared -o foo.so foo.o
</programlisting>
</para>
</listitem>

View File

@@ -1676,10 +1676,6 @@ build-postgresql:
using the GCC compiler:
<screen>
./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
</screen>
Using Sun's compiler:
<screen>
./configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64' ...
</screen>
</para>
</listitem>
@@ -3713,24 +3709,13 @@ xcrun --show-sdk-path
<title>Required Tools</title>
<para>
You can build with either GCC or Sun's compiler suite. For
better code optimization, Sun's compiler is strongly recommended
on the SPARC architecture. If
you are using Sun's compiler, be careful not to select
<filename>/usr/ucb/cc</filename>;
use <filename>/opt/SUNWspro/bin/cc</filename>.
Only GCC is supported as the compiler. Sun's compiler suite is no longer
supported.
</para>
<para>
You can download Sun Studio
from <ulink url="https://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/"></ulink>.
Many GNU tools are integrated into Solaris 10, or they are
present on the Solaris companion CD. If you need packages for
older versions of Solaris, you can find these tools
at <ulink url="http://www.sunfreeware.com"></ulink>.
If you prefer
sources, look
at <ulink url="https://www.gnu.org/prep/ftp"></ulink>.
Many additional dependencies can be installed via the package management
system.
</para>
</sect3>
@@ -3753,27 +3738,6 @@ configure ... LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
</para>
</sect3>
<sect3 id="installation-notes-solaris-comp-opt-perf">
<title>Compiling for Optimal Performance</title>
<para>
On the SPARC architecture, Sun Studio is strongly recommended for
compilation. Try using the <option>-xO5</option> optimization
flag to generate significantly faster binaries. Do not use any
flags that modify behavior of floating-point operations
and <varname>errno</varname> processing (e.g.,
<option>-fast</option>).
</para>
<para>
If you do not have a reason to use 64-bit binaries on SPARC,
prefer the 32-bit version. The 64-bit operations are slower and
64-bit binaries are slower than the 32-bit variants. On the
other hand, 32-bit code on the AMD64 CPU family is not native,
so 32-bit code is significantly slower on that CPU family.
</para>
</sect3>
<sect3 id="installation-notes-solaris-using-dtrace">
<title>Using DTrace for Tracing PostgreSQL</title>
@@ -3781,22 +3745,6 @@ configure ... LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
Yes, using DTrace is possible. See <xref linkend="dynamic-trace"/> for
further information.
</para>
<para>
If you see the linking of the <command>postgres</command> executable abort with an
error message like:
<screen>
Undefined first referenced
symbol in file
AbortTransaction utils/probes.o
CommitTransaction utils/probes.o
ld: fatal: Symbol referencing errors. No output written to postgres
collect2: ld returned 1 exit status
make: *** [postgres] Error 1
</screen>
your DTrace installation is too old to handle probes in static
functions. You need Solaris 10u4 or newer to use DTrace.
</para>
</sect3>
</sect2>