Re: Solaris compiler status

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-09-04T16:29:12Z
Lists: pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> Here is a patch set to remove what turns out to be a significant amount 
> of code and documentation to support this compiler.

Looks generally sane by eyeball -- I did not grep for anything that
you missed.  I concur with Andres that tas.o is probably never going
to be used again, and if it is we can put back support for it.

> In src/include/storage/s_lock.h, there was a comment to look in 
> src/backend/port/tas/sunstudio_sparc.s for some explanation.  But the 
> latter is to be removed, so I copied the comment over and tried to fit 
> it in.  But I don't understand it much, and it makes some claims about 
> gcc support for sparc, so it could be that some more code for newer 
> sparc variants is dead, or maybe gcc has caught up in the meantime. 

I would reduce the comment in s_lock.h to something along the lines of

    /*
     * "cas" would be better than "ldstub", but it is only present on
     * sparcv8plus and later, while some platforms still support sparcv7
     * or sparcv8. Also, "cas" requires that the system be running in
     * TSO mode.
     */

There's a comment a few lines above explaining TSO, so we don't need
more than that here.

Possibly at some point somebody will be motivated to improve the
s_lock.h code beyond its current state, but I agree that that's
material for future work.

			regards, tom lane



Commits

  1. Remove traces of support for Sun Studio compiler

  2. Remove checks for no longer supported GCC versions

  3. Remove stray semicolon at global scope

  4. Provide vectored variants of smgrread() and smgrwrite().

  5. Convert *GetDatum() and DatumGet*() macros to inline functions