Re: Build system problem in 8.3.x - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Build system problem in 8.3.x
Date
Msg-id 4A966329.3070103@enterprisedb.com
Whole thread Raw
In response to Build system problem in 8.3.x  (Boszormenyi Zoltan <zb@cybertec.at>)
Responses Re: Build system problem in 8.3.x  (Boszormenyi Zoltan <zb@cybertec.at>)
Re: Build system problem in 8.3.x  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Boszormenyi Zoltan wrote:
> we have come across a problem in 8.3.x (8.3.5 and 8.3.7 was tested)
> while building PostgreSQL for 32-bit on 64-bit RHEL5 and Fedora 9.
> 
> The following defines were used before running configure:
> 
> export CFLAGS="-m32"
> export LD="ld -melf_i386"
> 
> The above are needed because when SUBSYS.o files are created,
> the $(LD) ... lines don't contain $(LDFLAGS) anywhere, so overriding
> $(LD) on the command line has to be done instead.
> 
> However, there's one additional problem that can be solved by the
> attached one liner. The problem is that during building the core,
> something (test/regress) requires contrib/spi/refint.so to be built.

If you're willing to override $(LD), seems you could get around that
additional problem by overriding $(CC) as well:

export CC="$(CC) -m32"
export LD="ld -melf_i386"

> *** src/Makefile.port.old    2009-08-27 10:56:46.000000000 +0200
> --- src/Makefile.port    2009-08-27 10:56:46.000000000 +0200
> ***************
> *** 11,16 ****
>   endif
>   
>   %.so: %.o
> !     $(CC) -shared -o $@ $<
>   
>   sqlmansect = 7
> --- 11,16 ----
>   endif
>   
>   %.so: %.o
> !     $(CC) $(CFLAGS) -shared -o $@ $<
>   
>   sqlmansect = 7

I guess we should change that rule to use $(LD) instead of $(CC), and
include $(LDFLAGS) in the rules that build SUBSYS.o. Or maybe there's a
reason they are what they are, I don't know. (SUBSYS.o's are gone in 8.4
anyway)

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: MySQL Compatibility WAS: 8.5 release timetable, again
Next
From: Roger Leigh
Date:
Subject: Re: Unicode UTF-8 table formatting for psql text output