From: | "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1311: Can't crosscompile |
Date: | 2004-11-10 10:34:48 |
Message-ID: | 20041110103448.7EED5738702@www.postgresql.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1311
Logged by: Bernhard Rosenkraenzer
Email address: bero(at)arklinux(dot)org
PostgreSQL version: 8.0 Beta
Operating system: Ark Linux
Description: Can't crosscompile
Details:
Hi,
8.0.0beta4 can't be crosscompiled (I know that's hardly mainstream usage --
but I need the client libs on a PDA) because it tries to run the zic binary
it generated for the target platform rather than the build platform.
Quick and dirty [and not really portable] patch:
--- postgresql-8.0.0beta4/src/timezone/Makefile.ark 2004-11-10
06:59:27.000000000 +0100
+++ postgresql-8.0.0beta4/src/timezone/Makefile 2004-11-10
07:01:21.000000000 +0100
@@ -13,12 +13,14 @@
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := $(CPPFLAGS)
+HOST_CC := gcc
+HOST_CFLAGS := $(CFLAGS)
# files to build into backend
OBJS= localtime.o strftime.o pgtz.o
# files needed to build zic utility program
-ZICOBJS= zic.o ialloc.o scheck.o localtime.o
+ZICSOURCES= zic.c ialloc.c scheck.c localtime.c
# timezone data files
TZDATA := africa antarctica asia australasia europe northamerica
southamerica \
@@ -30,8 +32,8 @@
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
-zic: $(ZICOBJS)
- $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $(at)$(X)
+zic: $(ZICSOURCES)
+ $(HOST_CC) $(HOST_CFLAGS) $(CPPFLAGS) $(ZICSOURCES) $(LDFLAGS)
$(LIBS) -o $(at)$(X)
install: all installdirs
./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES)
From | Date | Subject | |
---|---|---|---|
Next Message | Ganesh and Sashi Prasad | 2004-11-10 12:18:29 | Unable to run PostgreSQL 8 beta 3 on Windows XP Home |
Previous Message | Andrew McMillan | 2004-11-10 10:30:32 | Re: ALTER USER SET log_* not allowed... |