From: | Shinji Teragaito <shinji(at)kobe(dot)hp(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: HP-UX PA-RISC/Itanium 64-bit Patch and HP-UX 11.23 Patch |
Date: | 2004-08-24 08:23:19 |
Message-ID: | vvdeklxdjwo.wl%Shinji.Teragaito@hp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
>> On Tue, 24 Aug 2004 00:39:55 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> said:
> Shinji Teragaito <shinji(at)kobe(dot)hp(dot)com> writes:
>> I made a patch to let PostgreSQL work in the LP64 data model on
>> HP-UX PA-RISC and HP-UX Itanium platform.
> The s_lock change looks good ... but ...
> This patch seems likely to break many other platforms. You do not
> seriously expect us to apply that change to float8.out, do you?
No.
> I'd also like to know the rationale for the Makefile.shlib changes
> (which did not seem to be needed the last time I tested on HPUX 11)
> and the -lxnet addition to Makefile.hpux (ditto).
* Makefile.shlib changes are required to link libgcc.a 64-bit
version correctly on HP-UX 11.23 (Itanium). Without specifying
-mlp64 in LDFLAGS, you will get libgcc.a 32-bit version. Then
linking libpq.so.3 with ld, you will see the following error:
/usr/ccs/bin/ld +h libpq.so.3 -b +b /usr/local/pgsql/lib
fe-auth.o ..(snip).. `gcc -print-libgcc-file-name` -o libpq.so.3
ld: Mismatched Data ABI. Expected EF_IA_64_ABI64 but found None in file
/usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.1/libgcc.a[__divdi3.oS]
To link 64-bit object files with libgcc.a, libgcc.a must be
64-bit.
On the other hand, the changes to SHLIB_LINK is not required for
PA-RISC HP-UX. Becase the gcc binaries are seperated for 32-bit
and 64-bit uses respectively. According to the data model, ILP32
or LP64, you will select the appropriate gcc binary. Then `$(CC)
-print-libgcc-file-name` results to be the correct libgcc.a.
* When you specify _XOPEN_SOURCE_EXTENDED in CFLAGS, X/Open
Networking Interfaces doesn't work in LP64 data model without
linking with libxnet. The third parameter type in sockets and IP
resolution interfaces such as bind() and getpeername() is defined
as socklen_t. socklen_t is typedefed as size_t, which is typedefed
as unsigned long. In LP64 data model, size_t results to be
64-bit. But inside the HP-UX X/Open Networking Interfaces
implementation, the third parameter is expected as 32-bit
length. To work around this problem in LP64 data model especially,
the -lxnet addition to Makefile.hpux is required.
Refer to man 7 xopen_networking.
Cheers,
Shinji Teragaito
Hewlett-Packard Japan, Ltd.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Kalchev | 2004-08-24 08:30:20 | Re: missing data/global |
Previous Message | Zeugswetter Andreas SB SD | 2004-08-24 08:08:53 | Re: PITR: XLog File compression on Archive |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2004-08-24 13:08:08 | Re: [PATCHES] BUG #1219: pgxs does not work fully |
Previous Message | Tom Lane | 2004-08-24 04:39:55 | Re: HP-UX PA-RISC/Itanium 64-bit Patch and HP-UX 11.23 Patch |