From: Noah Misch <noah@leadboat.com>
To: pgsql-hackers@postgresql.org
Subject: Removing -qsrcmsg (AIX)
Date: Wed, 2 Oct 2019 23:41:05 -0700
Message-ID: <20191003064105.GA3955242@rfd.leadboat.com> (raw)
With AIX xlc v16.1.0, various compilations get internal errors:
/opt/IBM/xlc/16.1.0/bin/xlc_r -qmaxmem=33554432 -qnoansialias -g -O2 -qsrcmsg -I/scratch/nm/farmlike/../cmpx/src/interfaces/libpq -I../../../src/include -I/scratch/nm/farmlike/../cmpx/src/include -c -o pg_backup_utils.o /scratch/nm/farmlike/../cmpx/src/bin/pg_dump/pg_backup_utils.c
/opt/IBM/xlc/16.1.0/bin/.orig/xlc_r: 1501-230 (S) Internal compiler error; please contact your Service Representative. For more information visit:
http://www.ibm.com/support/docview.wss?uid=swg21110810
I tracked this down to our use of -qsrcmsg, which I plan to remove from the
default CFLAGS, including back branches. While this is a compiler bug, it's
not worth breaking plausible builds to default-enable the minor change
-qsrcmsg provides:
$ echo 'break me' >x.c
$ /opt/IBM/xlc/16.1.0/bin/xlc_r x.c
"x.c", line 1.1: 1506-275 (S) Unexpected text 'break' encountered.
"x.c", line 1.7: 1506-166 (S) Definition of function me requires parentheses.
"x.c", line 1.9: 1506-204 (S) Unexpected end of file.
$ /opt/IBM/xlc/16.1.0/bin/xlc_r -qsrcmsg x.c
1 | break me
a.....b.c
a - 1506-275 (S) Unexpected text 'break' encountered.
b - 1506-166 (S) Definition of function me requires parentheses.
c - 1506-204 (S) Unexpected end of file.
Attachments:qsrcmsg-v1.patch (text/plain, 862B) downloaddiff --git a/src/template/aix b/src/template/aixindex ed83284..999cd35 100644--- a/src/template/aix+++ b/src/template/aix@@ -1,13 +1,14 @@-# Set appropriate default compiler options if using xlc-# Note: configure will add -qnoansialias if the compiler accepts it,-# even if user specifies a non-default CFLAGS setting.+# Set default options if using xlc. This formerly included -qsrcmsg, but that+# option elicits internal compiler errors from xlc v16.1.0. Note: configure+# will add -qnoansialias if the compiler accepts it, even if user specifies a+# non-default CFLAGS setting.
if test "$GCC" != yes ; then
case $host_os in
aix3.2.5 | aix4.1*)
- CFLAGS="-O -qmaxmem=16384 -qsrcmsg"+ CFLAGS="-O -qmaxmem=16384"
;;
*)
- CFLAGS="-O2 -qmaxmem=16384 -qsrcmsg"+ CFLAGS="-O2 -qmaxmem=16384"
;;
esac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: noah@leadboat.com
Subject: Re: Removing -qsrcmsg (AIX)
In-Reply-To: <20191003064105.GA3955242@rfd.leadboat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox