Re: fixing Makefile.shlib for solaris/gcc with -m64 flag

From: "Jignesh K(dot) Shah" <J(dot)K(dot)Shah(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
Subject: Re: fixing Makefile.shlib for solaris/gcc with -m64 flag
Date: 2007-01-17 17:46:14
Message-ID: 45AE60E6.2090307@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I tried that but it didn't work.

Also on Solaris it typically uses the ld in /usr/ccs/bin/ld which uses "-64" as its flag for 64 bit
and if you put LDFLAGS out there it will fail as unrecognized unless gcc parses -64 to -m64.

Putting -m64 in CC will do the workaround but then I guess that's what CFLAGS is for..

Regards,
Jignesh

Tom Lane wrote:
> "Jignesh K. Shah" <J(dot)K(dot)Shah(at)Sun(dot)COM> writes:
>> simple if I use -m64 for 64 bit then all end binaries are generated 64-bit and the shared libraries
>> are generated 32-bit and the compilation fails (ONLY ON SOLARIS) since that particular line is only
>> for the condition Solaris AND gcc.
>
>> If I use the COMPILER which is CC + CFLAGS it passes -m64 properly to it and generates shared
>> libraries 64-bit and the compile continues..
>
> Hmm ... I see we're doing it that way already for some other platforms,
> but I can't help thinking it's a kluge. Wouldn't the correct answer be
> that -m64 needs to be in LDFLAGS?
>
> regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2007-01-17 18:50:59 Re: [PATCHES] pg_standby
Previous Message Chuck McDevitt 2007-01-17 17:44:30 Re: O_DIRECT support for Windows