Tom Lane wrote:
So it seems we have a couple of problems here.  Using xlc_r or xlC_r
or adding -q64 to CC (rather than CFLAGS which is where it really
belongs) will confuse this check.

Correction: Flags that determine the architecture usually belong in CC, not in CFLAGS.

Test case for when a flag belongs into CC instead of CFLAGS:

To compile a file, you use $(CC) $(CPPFLAGS) $(CFLAGS).

To preprocess a file, you use $(CPP) $(CPPFLAGS), where CPP is usually $(CC) -E.

If you have a compiler flag that applies for preprocessing, you must put it into CC.

Another class of flags that is typically put into CC are those selecting the C standards mode.

Would it be reasonable to change the test quoted above to

elif test "$PORTNAME" = "aix"; then ...

that is try -qnoansialias anytime the compiler isn't gcc and the
platform is aix?  Is xlc used on any platform other than aix?

That would probably make sense. I think we just never supported xlc_r, and the threading code rejects a separate thread-safe compiler.

Also, has anyone got a clue what the switches selected in
src/template/aix actually do, and whether they still make sense
for modern AIX versions?

-qmaxmem=16384 is the memory for optimizations (in bytes).

-qsrcmsg prints the affected code line in a compiler error (instead of just file name and line number).

-qlonglong is clear.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to