1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Adjust configure to use "+Olibmerrno" with HP-UX C compiler, if possible.

This is reported to be necessary on some versions of that OS.  In service
of this, cause PGAC_PROG_CC_CFLAGS_OPT to reject switches that result in
compiler warnings, since on yet other versions of that OS, the switch does
nothing except provoke a warning.

Report and patch by Ibrar Ahmed, further tweaking by me.
This commit is contained in:
Tom Lane
2011-05-26 17:29:33 -04:00
parent 7b158d1bae
commit 44404f3945
3 changed files with 94 additions and 0 deletions

View File

@ -445,6 +445,10 @@ elif test "$ICC" = yes; then
elif test "$PORTNAME" = "aix"; then
# AIX's xlc has to have strict aliasing turned off too
PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
elif test "$PORTNAME" = "hpux"; then
# On some versions of HP-UX, libm functions do not set errno by default.
# Fix that by using +Olibmerrno if the compiler recognizes it.
PGAC_PROG_CC_CFLAGS_OPT([+Olibmerrno])
fi
# supply -g if --enable-debug