Re: BUG #3818: Cross compilation problems - Mailing list pgsql-bugs
From | Richard Evans |
---|---|
Subject | Re: BUG #3818: Cross compilation problems |
Date | |
Msg-id | 489DF3FA.6090805@blueallegro.net Whole thread Raw |
In response to | Re: BUG #3818: Cross compilation problems (Bruce Momjian <bruce@momjian.us>) |
Responses |
Re: BUG #3818: Cross compilation problems
Re: BUG #3818: Cross compilation problems |
List | pgsql-bugs |
Sorry about the delay on this. Just managed to find some time to look into it again. I've made a couple of patches, for 8.3.3 and 8.2.9, which enable cross compilation for windows (mingw32) from a unix platform. The changes are in these areas: 1. configure.in detecting the target system versions of dllwrap, dlltool, windres and ar 2. in various makefiles, checking BUILDOS not PORTNAME when deciding whether to use 'pwd -W' or just 'pwd' 3. Using the local system's 'zic' command when cross compiling, adding a --with-zic option to configure.in in case zic is not in the path (on my fedora 9 system it is in /usr/sbin/zic). 4. Some path tweaks in the make files to allow the cross compile build to occur outside the the source directory. 5. Working round a binutils-2.18 bug in windres when the rc file has / or \ in the path If I apply the patches and run autoconf then I can do a full cross compile and install (to a distribution dir) for 8.3.3 and 8.2.9 using a configure like: PATH=/usr/local/xc/bin:$PATH ../postgresql-8.3.3/configure --host=mingw32 --without-zlib \ --prefix=somedir --libdir=somedir/bin --with-zic=/usr/sbin/zic I have my cross compilation tool set in /usr/local/xc; I set libdir so that the dlls end up in the bin dir which makes running on windows easier ... I've also tested native builds on a mingw32 system using the patched files. Hope this helps. Richard > Richard, would you send us patches for the cross compile variables you > needed changed? Thanks. > > --------------------------------------------------------------------------- > > Richard Evans wrote: > >> The following bug has been logged online: >> >> Bug reference: 3818 >> Logged by: Richard Evans >> Email address: richard.evans@blueallegro.net >> PostgreSQL version: 8.3beta >> Operating system: Linux/windows >> Description: Cross compilation problems >> Details: >> >> I've been investigating cross-compiling for mingw32 on a linux build system. >> I used the current snapshot since it has a fix for the gettimeofday problem >> with new mingw installs. >> >> Mostly it worked, but there were a few problems which I think can all be >> fixed in the configure script: >> >> 1. The configure script does not check for cross-compile installs of ar, >> dlltool, dllwrap and windres. It manages to find the cross compile gcc >> (mingw32-gcc in my install), but does not check for mingw32-dlltool, etc. >> You work round this by setting AR= DLLTOOL= and DLLWRAP= on the make line >> but ideally it should be done in the configure stage. >> >> 2. The Makefile in pgevent/bin refers to dllwrap directly, not $(DLLWRAP). >> >> 3. Several makefiles use windres directly; there is no $(WINDRES) variable >> which can be set. >> >> 4. The zic problem in make install - see bug #1311. Simple solution here is >> to have a configure option which allows the use of the build systems own zic >> command. >> >> I may try coming up with some patches to configure to check for dlltool, etc >> but I haven't edited configure files before. >> >> Once I worked round these problems I was able to cross compile a working >> postgres for mingw32 on a linux host. >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 1: if posting/reading through Usenet, please send an appropriate >> subscribe-nomail command to majordomo@postgresql.org so that your >> message can get through to the mailing list cleanly >> > > Only in postgresql-8.2.9x: autom4te.cache diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/configure.in postgresql-8.2.9x/configure.in *** postgresql-8.2.9/configure.in 2008-06-09 01:34:32.000000000 +0100 --- postgresql-8.2.9x/configure.in 2008-08-09 20:31:29.000000000 +0100 *************** *** 599,604 **** --- 599,633 ---- AC_PATH_PROG(TAR, tar) PGAC_CHECK_STRIP + # + # Additional tools for win32 + # + if test "$PORTNAME" = "win32"; then + AC_CHECK_TOOL(DLLWRAP, dllwrap, :) + AC_CHECK_TOOL(DLLTOOL, dlltool, :) + AC_CHECK_TOOL(WINDRES, windres, :) + fi + + AC_CHECK_TOOL(AR, ar, :) + + # + # zic if cross-compiling + # + if test "$build_os" != "$host_os"; then + PGAC_ARG_REQ(with, zic, [ --with-zic=path set location of zic tool], + [ZIC=$withval], + [ZIC=:]) + + if test "$ZIC" = ":"; then + AC_PATH_TOOL(ZIC, zic, :) + fi + + if test "$ZIC" = ":"; then + AC_MSG_ERROR([zic is required for cross-compilation. + Use --with-zic to set the location.]) + fi + fi + if test -z "$YACC"; then AC_CHECK_PROGS(YACC, ['bison -y']) diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/bin/pgevent/Makefile postgresql-8.2.9x/src/bin/pgevent/Makefile *** postgresql-8.2.9/src/bin/pgevent/Makefile 2006-07-15 04:33:14.000000000 +0100 --- postgresql-8.2.9x/src/bin/pgevent/Makefile 2008-08-09 19:50:50.000000000 +0100 *************** *** 21,31 **** install: all install-lib ! pgevent.dll: $(OBJS) pgevent.def ! dllwrap --def pgevent.def -o $(NAME) $(OBJS) ! pgmsgevent.o: pgmsgevent.rc win32ver.rc ! windres pgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_builddir)/src/include all-lib: $(NAME) --- 21,36 ---- install: all install-lib ! pgevent.dll: $(OBJS) $(srcdir)/pgevent.def ! $(DLLWRAP) --def $(srcdir)/pgevent.def -o $(NAME) $(OBJS) ! # windres from binutils 2.18 can segfault if the input file name contains / or \. For safety, ! # copy to the local directory. ! ! pgmsgevent.o: $(srcdir)/pgmsgevent.rc win32ver.rc ! cp $(srcdir)/pgmsgevent.rc localpgmsgevent.rc ! $(WINDRES) localpgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_srcdir)/src/include --include-dir=$(top_builddir)/src/include--include-dir=$(srcdir) ! rm -f localpgmsgevent.rc all-lib: $(NAME) diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/interfaces/ecpg/Makefile postgresql-8.2.9x/src/interfaces/ecpg/Makefile *** postgresql-8.2.9/src/interfaces/ecpg/Makefile 2006-08-19 14:42:40.000000000 +0100 --- postgresql-8.2.9x/src/interfaces/ecpg/Makefile 2008-08-09 19:49:47.000000000 +0100 *************** *** 8,14 **** $(MAKE) -C ecpglib $@ $(MAKE) -C compatlib $@ $(MAKE) -C preproc $@ - $(MAKE) -C test $@ clean distclean maintainer-clean: -$(MAKE) -C include $@ --- 8,13 ---- diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/interfaces/ecpg/test/Makefile postgresql-8.2.9x/src/interfaces/ecpg/test/Makefile *** postgresql-8.2.9/src/interfaces/ecpg/test/Makefile 2006-09-08 14:32:26.000000000 +0100 --- postgresql-8.2.9x/src/interfaces/ecpg/test/Makefile 2008-08-09 19:43:46.000000000 +0100 *************** *** 17,23 **** NOLOCALE += --no-locale endif ! ifneq ($(PORTNAME),win32) abs_builddir := $(shell pwd) else abs_builddir := $(shell pwd -W) --- 17,23 ---- NOLOCALE += --no-locale endif ! ifneq ($(BUILDOS),mingw32) abs_builddir := $(shell pwd) else abs_builddir := $(shell pwd -W) diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/interfaces/libpq/Makefile postgresql-8.2.9x/src/interfaces/libpq/Makefile *** postgresql-8.2.9/src/interfaces/libpq/Makefile 2008-04-16 15:24:38.000000000 +0100 --- postgresql-8.2.9x/src/interfaces/libpq/Makefile 2008-08-09 19:11:03.000000000 +0100 *************** *** 20,26 **** SO_MINOR_VERSION= 0 DLTYPE= library ! override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port ifneq ($(PORTNAME), win32) override CFLAGS += $(PTHREAD_CFLAGS) endif --- 20,26 ---- SO_MINOR_VERSION= 0 DLTYPE= library ! override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_srcdir)/src/port -I$(top_builddir)/src/port ifneq ($(PORTNAME), win32) override CFLAGS += $(PTHREAD_CFLAGS) endif *************** *** 42,51 **** ifeq ($(PORTNAME), win32) OBJS += win32.o libpqrc.o ! DLL_DEFFILE=libpqdll.def libpqrc.o: libpq.rc ! windres -i libpq.rc -o libpqrc.o ifeq ($(enable_thread_safety), yes) OBJS += pthread-win32.o --- 42,51 ---- ifeq ($(PORTNAME), win32) OBJS += win32.o libpqrc.o ! DLL_DEFFILE=$(srcdir)/libpqdll.def libpqrc.o: libpq.rc ! $(WINDRES) -i $(srcdir)/libpq.rc -o libpqrc.o ifeq ($(enable_thread_safety), yes) OBJS += pthread-win32.o diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/Makefile.global.in postgresql-8.2.9x/src/Makefile.global.in *** postgresql-8.2.9/src/Makefile.global.in 2006-10-08 18:15:33.000000000 +0100 --- postgresql-8.2.9x/src/Makefile.global.in 2008-08-09 19:15:02.000000000 +0100 *************** *** 230,235 **** --- 230,239 ---- LDOUT = -o RANLIB = @RANLIB@ X = @EXEEXT@ + AR = @AR@ + DLLTOOL = @DLLTOOL@ + DLLWRAP = @DLLWRAP@ + WINDRES = @WINDRES@ # Perl *************** *** 256,261 **** --- 260,267 ---- PL_TESTDB = pl_regression CONTRIB_TESTDB = contrib_regression + ZIC = @ZIC@ + # Installation. INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c *************** *** 294,299 **** --- 300,307 ---- # Additional platform-specific settings # + BUILDOS = @build_os@ + # Name of the "template" PORTNAME= @PORTNAME@ *************** *** 457,467 **** ifneq (,$(PGAPPICON)) PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\") endif ! win32ver.rc: $(top_builddir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc ! win32ver.o: $(top_builddir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc ! windres -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include rm -f win32ver.rc endif --- 465,475 ---- ifneq (,$(PGAPPICON)) PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\") endif ! win32ver.rc: $(top_srcdir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_srcdir)/src/port/win32ver.rc > win32ver.rc ! win32ver.o: $(top_srcdir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_srcdir)/src/port/win32ver.rc > win32ver.rc ! $(WINDRES) -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir) rm -f win32ver.rc endif diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/makefiles/Makefile.win32 postgresql-8.2.9x/src/makefiles/Makefile.win32 *** postgresql-8.2.9/src/makefiles/Makefile.win32 2006-06-23 00:50:35.000000000 +0100 --- postgresql-8.2.9x/src/makefiles/Makefile.win32 2008-08-09 19:16:56.000000000 +0100 *************** *** 3,10 **** --- 3,17 ---- # Use replacement include files for those missing on Win32 override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32" + ifndef DLLTOOL DLLTOOL= dlltool + endif + ifndef DLLWRAP DLLWRAP= dllwrap + endif + ifndef WINDRES + WINDRES = windres + endif ifdef PGXS BE_DLLLIBS= -L$(libdir) -lpostgres else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/pl/plperl/GNUmakefile postgresql-8.2.9x/src/pl/plperl/GNUmakefile *** postgresql-8.2.9/src/pl/plperl/GNUmakefile 2006-07-21 01:24:04.000000000 +0100 --- postgresql-8.2.9x/src/pl/plperl/GNUmakefile 2008-08-09 19:20:26.000000000 +0100 *************** *** 53,59 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 53,59 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/pl/plpython/Makefile postgresql-8.2.9x/src/pl/plpython/Makefile *** postgresql-8.2.9/src/pl/plpython/Makefile 2006-07-21 01:24:04.000000000 +0100 --- postgresql-8.2.9x/src/pl/plpython/Makefile 2008-08-09 19:20:03.000000000 +0100 *************** *** 72,78 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 72,78 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/pl/tcl/Makefile postgresql-8.2.9x/src/pl/tcl/Makefile *** postgresql-8.2.9/src/pl/tcl/Makefile 2006-07-21 01:24:04.000000000 +0100 --- postgresql-8.2.9x/src/pl/tcl/Makefile 2008-08-09 19:19:38.000000000 +0100 *************** *** 56,62 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 56,62 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/test/regress/GNUmakefile postgresql-8.2.9x/src/test/regress/GNUmakefile *** postgresql-8.2.9/src/test/regress/GNUmakefile 2006-07-21 01:24:04.000000000 +0100 --- postgresql-8.2.9x/src/test/regress/GNUmakefile 2008-08-09 19:21:34.000000000 +0100 *************** *** 91,97 **** all: $(input_files) $(output_files) ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 91,97 ---- all: $(input_files) $(output_files) ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.2.9/src/timezone/Makefile postgresql-8.2.9x/src/timezone/Makefile *** postgresql-8.2.9/src/timezone/Makefile 2007-03-14 17:38:15.000000000 +0000 --- postgresql-8.2.9x/src/timezone/Makefile 2008-08-09 19:22:58.000000000 +0100 *************** *** 29,34 **** --- 29,40 ---- # for POSIX-style timezone specs POSIXRULES = US/Eastern + # ZIC is set when cross compiling + + ifeq (,$(ZIC)) + ZIC=./zic + endif + all: SUBSYS.o submake-libpgport zic SUBSYS.o: $(OBJS) *************** *** 38,44 **** $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X) install: all installdirs ! ./zic -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES) $(MAKE) -C tznames $@ installdirs: --- 44,50 ---- $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X) install: all installdirs ! $(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES) $(MAKE) -C tznames $@ installdirs: diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/configure.in test/configure.in *** postgresql-8.3.3/configure.in 2008-06-09 01:38:40.000000000 +0100 --- test/configure.in 2008-08-09 20:32:33.000000000 +0100 *************** *** 619,624 **** --- 619,642 ---- AC_SUBST(with_system_tzdata) # + # zic if cross-compiling + # + if test "$build_os" != "$host_os" -a -z "$with_system_tzdata"; then + PGAC_ARG_REQ(with, zic, [ --with-zic=path set location of zic tool], + [ZIC=$withval], + [ZIC=:]) + + if test "$ZIC" = ":"; then + AC_PATH_TOOL(ZIC, zic, :) + fi + + if test "$ZIC" = ":"; then + AC_MSG_ERROR([zic is required for cross-compilation. + Use --with-zic to set the location.]) + fi + fi + + # # Zlib # PGAC_ARG_BOOL(with, zlib, yes, *************** *** 677,682 **** --- 695,708 ---- AC_PROG_RANLIB PGAC_CHECK_STRIP + if test "$PORTNAME" = "win32"; then + AC_CHECK_TOOL(DLLWRAP, dllwrap, :) + AC_CHECK_TOOL(DLLTOOL, dlltool, :) + AC_CHECK_TOOL(WINDRES, windres, :) + fi + + AC_CHECK_TOOL(AR, ar, :) + AC_PATH_PROG(TAR, tar) AC_PROG_LN_S AC_PROG_AWK diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/bin/pgevent/Makefile test/src/bin/pgevent/Makefile *** postgresql-8.3.3/src/bin/pgevent/Makefile 2008-01-01 19:45:55.000000000 +0000 --- test/src/bin/pgevent/Makefile 2008-08-09 14:56:10.000000000 +0100 *************** *** 21,31 **** install: all install-lib ! pgevent.dll: $(OBJS) pgevent.def ! $(DLLWRAP) --def pgevent.def -o $(NAME) $(OBJS) ! pgmsgevent.o: pgmsgevent.rc win32ver.rc ! windres pgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_builddir)/src/include all-lib: $(NAME) --- 21,36 ---- install: all install-lib ! pgevent.dll: $(OBJS) $(srcdir)/pgevent.def ! $(DLLWRAP) --def $(srcdir)/pgevent.def -o $(NAME) $(OBJS) ! # windres from binutils 2.18 can segfault if the input file name contains / or \. For safety, ! # copy to the local directory. ! ! pgmsgevent.o: $(srcdir)/pgmsgevent.rc win32ver.rc ! cp $(srcdir)/pgmsgevent.rc localpgmsgevent.rc ! $(WINDRES) localpgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_srcdir)/src/include --include-dir=$(top_builddir)/src/include--include-dir=$(srcdir) ! rm -f localpgmsgevent.rc all-lib: $(NAME) diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/compatlib/Makefile test/src/interfaces/ecpg/compatlib/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/compatlib/Makefile 2008-01-01 19:45:59.000000000 +0000 --- test/src/interfaces/ecpg/compatlib/Makefile 2008-08-08 21:17:38.000000000 +0100 *************** *** 31,37 **** OBJS= informix.o $(filter snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=libecpg_compatdll.def endif all: def-files all-lib --- 31,37 ---- OBJS= informix.o $(filter snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=$(srcdir)/libecpg_compatdll.def endif all: def-files all-lib diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/ecpglib/Makefile test/src/interfaces/ecpg/ecpglib/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/ecpglib/Makefile 2008-03-21 16:10:10.000000000 +0000 --- test/src/interfaces/ecpg/ecpglib/Makefile 2008-08-08 21:17:08.000000000 +0100 *************** *** 39,45 **** ifeq ($(PORTNAME), win32) # Link to shfolder.dll instead of shell32.dll SHLIB_LINK += -lshfolder ! DLL_DEFFILE=libecpgdll.def endif all: def-files all-lib --- 39,45 ---- ifeq ($(PORTNAME), win32) # Link to shfolder.dll instead of shell32.dll SHLIB_LINK += -lshfolder ! DLL_DEFFILE=$(srcdir)/libecpgdll.def endif all: def-files all-lib diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/pgtypeslib/Makefile test/src/interfaces/ecpg/pgtypeslib/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/pgtypeslib/Makefile 2008-01-01 19:45:59.000000000 +0000 --- test/src/interfaces/ecpg/pgtypeslib/Makefile 2008-08-08 21:16:38.000000000 +0100 *************** *** 32,38 **** $(filter rint.o snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=libpgtypesdll.def endif all: def-files all-lib --- 32,38 ---- $(filter rint.o snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=$(srcdir)/libpgtypesdll.def endif all: def-files all-lib diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/test/Makefile test/src/interfaces/ecpg/test/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/test/Makefile 2007-08-14 11:01:53.000000000 +0100 --- test/src/interfaces/ecpg/test/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 20,26 **** NOLOCALE += --no-locale endif ! ifneq ($(PORTNAME),win32) abs_builddir := $(shell pwd) else abs_builddir := $(shell pwd -W) --- 20,26 ---- NOLOCALE += --no-locale endif ! ifneq ($(BUILDOS),mingw32) abs_builddir := $(shell pwd) else abs_builddir := $(shell pwd -W) diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/libpq/Makefile test/src/interfaces/libpq/Makefile *** postgresql-8.3.3/src/interfaces/libpq/Makefile 2008-04-16 15:21:22.000000000 +0100 --- test/src/interfaces/libpq/Makefile 2008-08-08 21:15:57.000000000 +0100 *************** *** 20,26 **** SO_MINOR_VERSION= 1 DLTYPE= library ! override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port ifneq ($(PORTNAME), win32) override CFLAGS += $(PTHREAD_CFLAGS) endif --- 20,26 ---- SO_MINOR_VERSION= 1 DLTYPE= library ! override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_srcdir)/src/port -I$(top_builddir)/src/port ifneq ($(PORTNAME), win32) override CFLAGS += $(PTHREAD_CFLAGS) endif *************** *** 42,51 **** ifeq ($(PORTNAME), win32) OBJS += win32.o pgsleep.o libpqrc.o ! DLL_DEFFILE=libpqdll.def libpqrc.o: libpq.rc ! windres -i libpq.rc -o libpqrc.o ifeq ($(enable_thread_safety), yes) OBJS += pthread-win32.o --- 42,51 ---- ifeq ($(PORTNAME), win32) OBJS += win32.o pgsleep.o libpqrc.o ! DLL_DEFFILE=$(srcdir)/libpqdll.def libpqrc.o: libpq.rc ! $(WINDRES) -i $(srcdir)/libpq.rc -o libpqrc.o ifeq ($(enable_thread_safety), yes) OBJS += pthread-win32.o diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/Makefile.global.in test/src/Makefile.global.in *** postgresql-8.3.3/src/Makefile.global.in 2007-11-13 00:13:19.000000000 +0000 --- test/src/Makefile.global.in 2008-08-09 10:52:15.000000000 +0100 *************** *** 238,243 **** --- 238,247 ---- LDOUT = -o RANLIB = @RANLIB@ X = @EXEEXT@ + AR = @AR@ + DLLTOOL = @DLLTOOL@ + DLLWRAP = @DLLWRAP@ + WINDRES = @WINDRES@ # Perl *************** *** 264,269 **** --- 268,275 ---- PL_TESTDB = pl_regression CONTRIB_TESTDB = contrib_regression + ZIC = @ZIC@ + # Installation. INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c *************** *** 302,307 **** --- 308,315 ---- # Additional platform-specific settings # + BUILDOS = @build_os@ + # Name of the "template" PORTNAME= @PORTNAME@ *************** *** 465,475 **** ifneq (,$(PGAPPICON)) PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\") endif ! win32ver.rc: $(top_builddir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc ! win32ver.o: $(top_builddir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc ! windres -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include rm -f win32ver.rc endif --- 473,483 ---- ifneq (,$(PGAPPICON)) PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\") endif ! win32ver.rc: $(top_srcdir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_srcdir)/src/port/win32ver.rc > win32ver.rc ! win32ver.o: $(top_srcdir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date'+%y%j' | sed 's/^0*//'`';' $(top_srcdir)/src/port/win32ver.rc > win32ver.rc ! $(WINDRES) -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir) rm -f win32ver.rc endif diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/makefiles/Makefile.win32 test/src/makefiles/Makefile.win32 *** postgresql-8.3.3/src/makefiles/Makefile.win32 2007-08-21 14:32:33.000000000 +0100 --- test/src/makefiles/Makefile.win32 2008-08-08 21:07:09.000000000 +0100 *************** *** 3,10 **** # Use replacement include files for those missing on Win32 override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32" ! DLLTOOL= dlltool ! DLLWRAP= dllwrap ifdef PGXS BE_DLLLIBS= -L$(libdir) -lpostgres else --- 3,17 ---- # Use replacement include files for those missing on Win32 override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32" ! ifndef DLLTOOL ! DLLTOOL = dlltool ! endif ! ifndef DLLWRAP ! DLLWRAP = dllwrap ! endif ! ifndef WINDRES ! WINDRES = windres ! endif ifdef PGXS BE_DLLLIBS= -L$(libdir) -lpostgres else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/pl/plperl/GNUmakefile test/src/pl/plperl/GNUmakefile *** postgresql-8.3.3/src/pl/plperl/GNUmakefile 2007-12-01 15:30:09.000000000 +0000 --- test/src/pl/plperl/GNUmakefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 56,62 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 56,62 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/pl/plpython/Makefile test/src/pl/plpython/Makefile *** postgresql-8.3.3/src/pl/plpython/Makefile 2007-02-10 04:26:24.000000000 +0000 --- test/src/pl/plpython/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 72,78 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 72,78 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/pl/tcl/Makefile test/src/pl/tcl/Makefile *** postgresql-8.3.3/src/pl/tcl/Makefile 2006-07-21 01:24:04.000000000 +0100 --- test/src/pl/tcl/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 56,62 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 56,62 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/test/regress/GNUmakefile test/src/test/regress/GNUmakefile *** postgresql-8.3.3/src/test/regress/GNUmakefile 2008-01-01 19:46:00.000000000 +0000 --- test/src/test/regress/GNUmakefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 97,103 **** ofile_list := $(subst .source,, $(notdir $(wildcard $(top_srcdir)/$(subdir)/output/*.source))) output_files := $(foreach file, $(ofile_list), expected/$(file).out) ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 97,103 ---- ofile_list := $(subst .source,, $(notdir $(wildcard $(top_srcdir)/$(subdir)/output/*.source))) output_files := $(foreach file, $(ofile_list), expected/$(file).out) ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/timezone/Makefile test/src/timezone/Makefile *** postgresql-8.3.3/src/timezone/Makefile 2007-08-25 21:29:25.000000000 +0100 --- test/src/timezone/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 27,32 **** --- 27,38 ---- # for POSIX-style timezone specs POSIXRULES = US/Eastern + # ZIC is set when cross compiling + + ifeq (,$(ZIC)) + ZIC=./zic + endif + # use system timezone data? ifneq (,$(with_system_tzdata)) override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"' *************** *** 46,52 **** install: all installdirs ifeq (,$(with_system_tzdata)) ! ./zic -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES) endif $(MAKE) -C tznames $@ --- 52,58 ---- install: all installdirs ifeq (,$(with_system_tzdata)) ! $(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES) endif $(MAKE) -C tznames $@
pgsql-bugs by date: