Re: BUG #1999: contrib/spi doesn't receive the configured CFLAGS - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1999: contrib/spi doesn't receive the configured CFLAGS
Date
Msg-id 6418.1130340110@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1999: contrib/spi doesn't receive the configured  (Seneca Cunningham <scunning@ca.afilias.info>)
List pgsql-bugs
Seneca Cunningham <scunning@ca.afilias.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

pgsql-bugs by date:

Previous
From: Seneca Cunningham
Date:
Subject: Re: BUG #1999: contrib/spi doesn't receive the configured
Next
From: Tom Lane
Date:
Subject: Re: BUG #2001: Signal 11 after concurrent inserts + updates