Sun Studio on Linux spinlock patch

From: Julius Stroffek <Julius(dot)Stroffek(at)Sun(dot)COM>
To: pgsql-patches(at)postgresql(dot)org
Subject: Sun Studio on Linux spinlock patch
Date: 2008-03-05 08:48:58
Message-ID: 47CE5E7A.9050509@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi All,

I have made PostgreSQL to compile on linux using sun studio with
spinlock support. The patch is attached. Here is the explanation of
changes I made:

I renamed the following files
solaris_x86.s
solaris_sparch.s

to
sunstudio_x86.s
sunstudio_sparch.s

because the code is used on linux as well and is not related to solaris
but sunstudio.

I added the detection of Sun Studio to configure script, changed the
template for linux, so it gives same settings for sun studio as for solaris.

Finally, I changed the #ifdef of __sun macro to __SUNPRO_C macro in
s_lock.h. Macro __sun is defined on solaris by both gcc and sun studio
and it is not defined on linux. Macro __SUNPRO_C is defined on linux as
well as solaris by sun studio and is never defined by gcc.

I tested the patch (build process & make check) without any problems on:
x86, solaris nevada build 79; gcc 3.4.3 (csl-sol210-3_4-20050802)
x86, solaris nevada build 79; sun studio 12
x86, debian etch, gcc 4.1.2 (20061115)
x86, debian etch, sun studio 12
sparc, solaris 10U3, gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
sparc, solaris 10U3, sun studio 12

I do not have an access to linux sparc machine.

Thanks for your comments.

Cheers

Julo

Attachment Content-Type Size
sunstudio_linux.diff text/x-patch 9.8 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2008-03-05 09:42:28 Re: WIP: guc enums
Previous Message Tom Lane 2008-03-05 05:48:03 Re: WIP: guc enums