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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers