Lists: | pgsql-ports |
---|
From: | Mark Round <mark(at)markround(dot)com> |
---|---|
To: | pgsql-ports(at)postgresql(dot)org |
Subject: | PostgreSQL 8.0.0beta2 compile error with Sun CC. |
Date: | 2004-09-24 13:23:48 |
Message-ID: | 41541FE4.2070103@markround.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-ports |
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Mark Round
Your email address : mark(at)markround(dot)com
System Configuration
---------------------
Architecture (example: Intel Pentium) : Sparc (UltraSparc IIi)
Operating System (example: Linux 2.4.18) : Solaris 8
PostgreSQL version (example: PostgreSQL-8.0): PostgreSQL-8.0.0beta2
Compiler used (example: gcc 2.95.2) : Sun C 5.5 2003/03/12
Please enter a FULL description of your problem:
-----------------------------------------------
Compilation fails with the error that ".seg" is no a recognised opcode.
The error is in src/backend/storage/lmgr/s_lock.c , lines 228 and 229.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Compile using Sun's C compiler.
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
.seg should be changed to .section.
Lines 229 and 229 in s_lock.c should be changed to the following :
asm(".section \"data\"");
asm(".section \"text\"");
From docs.sun.com SPARC assembly manual : "This pseudo-op (.seg) is
currently supported for compatibility with existing SunOS 4.1 SPARC
assembly language programs. This pseudo-op has been replaced by the
.section pseudo-op."
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mark Round <mark(at)markround(dot)com> |
Cc: | pgsql-ports(at)postgresql(dot)org |
Subject: | Re: PostgreSQL 8.0.0beta2 compile error with Sun CC. |
Date: | 2004-09-24 14:42:18 |
Message-ID: | 21594.1096036938@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg젠 토토SQL |
Mark Round <mark(at)markround(dot)com> writes:
> Compilation fails with the error that ".seg" is no a recognised opcode.
> The error is in src/backend/storage/lmgr/s_lock.c , lines 228 and 229.
We heard about this before, but the previous complainant didn't answer
the obvious followup question: which versions of Solaris will fail if we
change it to ".section"? Or more to the point, how can we #ifdef the
code so that this works on all Solaris versions?
regards, tom lane
From: | Mark Round <mark(at)markround(dot)com> |
---|---|
To: | pgsql-ports(at)postgresql(dot)org |
Subject: | Re: PostgreSQL 8.0.0beta2 compile error with Sun CC. |
Date: | 2004-09-24 15:33:25 |
Message-ID: | 41543E45.4010306@markround.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg젠 토토SQL |
>We heard about this before, but the previous complainant didn't answer
>the obvious followup question: which versions of Solaris will fail if we
>change it to ".section"? Or more to the point, how can we #ifdef the
>code so that this works on all Solaris versions?
>
>
Hi,
If it is changed to ".section", any SunOS 4.1.x -based (pre-1992) system
will fail to compile it.
I am guessing here (not a programmer), but as the ".seg" pseudo-op was a
SunOS 4.1.x construct, you could probably check for a 5.x version of
SunOS, and in which case, set the lines to ".section". I am not sure
what the appropriate #ifdef lines should look like, but will try to find
out for you.
-Mark
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mark Round <mark(at)markround(dot)com> |
Cc: | pgsql-ports(at)postgresql(dot)org |
Subject: | Re: PostgreSQL 8.0.0beta2 compile error with Sun CC. |
Date: | 2004-09-24 15:40:06 |
Message-ID: | 22791.1096040406@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-ports |
Mark Round <mark(at)markround(dot)com> writes:
> If it is changed to ".section", any SunOS 4.1.x -based (pre-1992) system
> will fail to compile it.
Hmm. AFAIK no one has cared about SunOS for a couple of years now.
I was more concerned about whether there were any Solaris versions
that would fail to recognize .section.
> I am guessing here (not a programmer), but as the ".seg" pseudo-op was a
> SunOS 4.1.x construct, you could probably check for a 5.x version of
> SunOS, and in which case, set the lines to ".section". I am not sure
> what the appropriate #ifdef lines should look like, but will try to find
> out for you.
When I went looking a few days ago, it wasn't clear that there were any
predefined symbols that would let one tell the difference --- "__sun"
seems to be the only OS-specific predefine on Solaris, and I imagine it
was defined in SunOS too. But if you find out anything please do let me
know.
regards, tom lane