Re: BUG #1999: contrib/spi doesn't receive the configured CFLAGS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seneca Cunningham <scunning(at)ca(dot)afilias(dot)info>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1999: contrib/spi doesn't receive the configured CFLAGS
Date: 2005-10-26 15:21:50
Message-ID: 6418.1130340110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Seneca Cunningham <scunning(at)ca(dot)afilias(dot)info> writes:
> I redid the build changing CFLAGS to "-maix64" and LDFLAGS to
> "-Wl,-bbigtoc", and gmake check still doesn't run without first
> modifying src/makefiles/Makefile.aix to add CFLAGS. The -maix64 from
> CFLAGS is required to get contrib/spi to build since IBM's tools are
> expecting objects using the 64-bit API to operate on, and if I were to
> unset OBJECT_MODE, the linking would fail as ld cannot link against
> XCOFF64 files in 32-bit mode.

Hmm. I think the command in Makefile.aix is correct, since it's only
doing a link and not a compilation.

$(CC) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) $(SHLIB_LINK)

Given that you want -maix64 to be supplied in both compilation and
linking phases, you could either add it to both FLAGS variables, or
put it in CC:

CC="gcc -maix64" ...

I've done stuff like the latter fairly often when fooling with 32/64 bit
build environments.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-10-26 15:24:20 Re: BUG #2001: Signal 11 after concurrent inserts + updates
Previous Message Telin Lin 2005-10-26 15:21:37 Re: BUG #2001: Signal 11 after concurrent inserts + updates