Building on S390 - Mailing list pgsql-hackers

From Michael Meskes
Subject Building on S390
Date
Msg-id 20131122154308.GA21984@feivel.credativ.lan
Whole thread Raw
Responses Re: Building on S390  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I spend some time trying to figure out why PostgreSQL builds on
S390-Linux, but Postgres-XC doesn't. Well at least this holds for the Debian
packages. So far I haven't figured it out.  However, it appears to me that the
build should fail for both. I'm not an S390 expert by any means, but I was told
that S390 requires -fPIC and the build failure in the Debian package of XC came
from a stray -fpic that was used together with -fPIC. But alas the PostgreSQL
build has both as well.

Anyway, I changed src/makefiles/Makefile.linux to include

ifeq "$(findstring s390,$(host_cpu))" "s390"
CFLAGS_SL = -fPIC
else

before setting CFLAGS_SL = -fpic et voila XC builds just fine on S390. 

So I wonder shouldn't we use -fPIC instead of -fpic for S390 in general?

Michael

-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: MultiXact pessmization in 9.3
Next
From: Greg Stark
Date:
Subject: Re: Can we trust fsync?