The following bug has been logged online:
Bug reference: 1999
Logged by: Seneca Cunningham
Email address: scunning@ca.afilias.info
PostgreSQL version: 8.1beta4
Operating system: AIX 5.3
Description: contrib/spi doesn't receive the configured CFLAGS
Details:
After configuring and building postgres with the CFLAGS necessary to build
postgres using the 64-bit AIX ABI with gcc4, gmake check fails during the
build of contrib/spi due to it not receiving the required CFLAGS.
Sample session:
$ cd postgresql-8.1beta4
$ export OBJECT_MODE=64
$ CFLAGS="-maix64 -Wl,-bbigtoc" ./configure
--prefix=/opt/dbs/pgsql81b4-afilias-AIX53-2005-10-25
--with-includes=/opt/freeware/include --enable-debug --enable-thread-safety
--with-libraries=/opt/freeware/lib --enable-casert
[...]
$ gmake
[...]
All of PostgreSQL successfully made. Ready to install.
$ gmake -C src/test check
gmake[1]: Entering directory
`/opt/test/postgres/postgresql-8.1beta4/src/test'
gmake -C regress check
gmake[2]: Entering directory
`/opt/test/postgres/postgresql-8.1beta4/src/test/regress'
gmake -C ../../../contrib/spi refint.so autoinc.so
gmake[3]: Entering directory
`/opt/test/postgres/postgresql-8.1beta4/contrib/spi'
gcc -maix64 -Wl,-bbigtoc -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-DREFINT_VERBOSE -I. -I../../src/include -I/opt/freeware/include -c -o
refint.o refint.c
gcc: -bbigtoc: linker input file unused because linking not done
../../src/backend/port/aix/mkldexport.sh refint.o > refint.exp
Making shared library refint.so from refint.o, refint.exp and postgres.imp
gcc -L../../src/port -L/opt/freeware/lib -Wl,-bnoentry -Wl,-H512
-Wl,-bM:SRE -o refint.so refint.o -Wl,-bI:../../src/backend/postgres.imp
-Wl,-bE:refint.exp -L../../src/port -lpgport
Assembler:
/tmp//cc0wG03u.s: line 8: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 9: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 10: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 11: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 12: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 13: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 14: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 15: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 16: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 17: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 30: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 62: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 103: 1252-191 Only .llong should be used for
relocatable expressions.
/tmp//cc0wG03u.s: line 171: 1252-191 Only .llong should be used for
relocatable expressions.
collect2: gcc returned 1 exit status
gmake[3]: *** [refint.so] Error 1
rm refint.o refint.exp
gmake[3]: Leaving directory
`/opt/test/postgres/postgresql-8.1beta4/contrib/spi'
gmake[2]: *** [all-spi] Error 2
gmake[2]: Leaving directory
`/opt/test/postgres/postgresql-8.1beta4/src/test/regress'
gmake[1]: *** [check] Error 2
gmake[1]: Leaving directory
`/opt/test/postgres/postgresql-8.1beta4/src/test'
gmake: *** [check] Error 2
$
---- end of sample session
The errors from the assembler are the ones that occur when IBM's assembler
is in 64-bit mode and it has been passed output from gcc generating 32-bit
code, its default mode. This error would not occur if gcc were passed
-maix64.
-bash-2.05b$ gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: /opt/src/gcc4/gcc-4.0.1/configure --prefix=/opt/dbs/gcc4
--enable-languages=c,c++
Thread model: aix
gcc version 4.0.1
-bash-2.05b$ as -v
as V5.3
^C-bash-2.05b$ oslevel -r
5300-03