aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-07-06 21:04:14 +0000
committerBruce Momjian <bruce@momjian.us>2005-07-06 21:04:14 +0000
commit261ffd03f72daf0c52973b6e928e6433d68ba92e (patch)
tree5b50c5890547f84dce0eb221c635e761169221cb
parenta9236028554ca0e11797c887373c1a34800a4fa6 (diff)
downloadpostgresql-261ffd03f72daf0c52973b6e928e6433d68ba92e.tar.gz
postgresql-261ffd03f72daf0c52973b6e928e6433d68ba92e.zip
Reverse out because the lack of using pgport in timezone/ is causing
problems: --------------------------------------------------------------------------- Support cross compilation by compiling "zic" with a native compiler. This relies on the output of zic being platform independent, but that is currently the case.
-rwxr-xr-xconfigure14
-rw-r--r--configure.in13
-rw-r--r--doc/src/sgml/installation.sgml19
-rw-r--r--src/Makefile.global.in3
-rw-r--r--src/timezone/Makefile17
5 files changed, 8 insertions, 58 deletions
diff --git a/configure b/configure
index 8c29ae3d51d..84ce2bcc834 100755
--- a/configure
+++ b/configure
@@ -314,7 +314,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC CC_FOR_BUILD TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -3306,17 +3306,6 @@ _ACEOF
#
-# Native compiler
-#
-
-if test -z "$CC_FOR_BUILD"; then
- CC_FOR_BUILD=$CC
-fi
-
-
-
-
-#
# Set up TAS assembly code if needed; the template file has now had its
# chance to request this.
#
@@ -22904,7 +22893,6 @@ s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@CPP@,$CPP,;t t
s,@GCC@,$GCC,;t t
-s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
s,@TAS@,$TAS,;t t
s,@autodepend@,$autodepend,;t t
s,@INCLUDES@,$INCLUDES,;t t
diff --git a/configure.in b/configure.in
index 9679b24b8f5..3baed6c79f0 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.416 2005/07/05 23:13:57 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.417 2005/07/06 21:04:13 momjian Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -304,17 +304,6 @@ AC_DEFINE_UNQUOTED(PG_VERSION_STR,
#
-# Native compiler
-#
-
-if test -z "$CC_FOR_BUILD"; then
- CC_FOR_BUILD=$CC
-fi
-
-AC_SUBST(CC_FOR_BUILD)
-
-
-#
# Set up TAS assembly code if needed; the template file has now had its
# chance to request this.
#
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 7606e03e3f4..4f9f50cc017 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.239 2005/07/03 18:54:27 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.240 2005/07/06 21:04:14 momjian Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -993,23 +993,6 @@ su - postgres
<userinput>./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'</>
</screen>
</para>
-
- <para>
- If you are cross-compiling<indexterm><primary>cross
- compilation</primary></indexterm> (compiling on one architecture
- with the intent to run on a different architecture), special care
- needs to be taken. First of all, specify the host architecture
- (the architecture PostgreSQL will run on) using the option
- <option>--host</option>. The variables <envar>CC</>,
- <envar>CFLAGS</>, etc. should refer to the build tools for the
- host architecture. During the build process, the time-zone
- database for PostgreSQL is created and a special tool to do that
- is compiled and run during the build process. This tool needs to
- be compiled using a native compiler. Specify this compiler using
- the variable <envar>CC_FOR_BUILD</envar>. Cross compilation
- requires expert knowledge and the support for this process in the
- PostgreSQL tree should be considered somewhat experimental.
- </para>
</step>
<step>
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 0735ecdcc4e..aea8d670895 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.216 2005/07/05 23:13:57 tgl Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.217 2005/07/06 21:04:14 momjian Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -184,7 +184,6 @@ endif
endif # not PGXS
CC = @CC@
-CC_FOR_BUILD = @CC_FOR_BUILD@
GCC = @GCC@
CFLAGS = @CFLAGS@
diff --git a/src/timezone/Makefile b/src/timezone/Makefile
index fa3b9dadff8..d5fd05d0cd7 100644
--- a/src/timezone/Makefile
+++ b/src/timezone/Makefile
@@ -4,7 +4,7 @@
# Makefile for the timezone library
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.20 2005/07/04 19:54:51 momjian Exp $
+# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.21 2005/07/06 21:04:14 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -18,7 +18,7 @@ override CPPFLAGS := $(CPPFLAGS) -I$(srcdir) -DNO_PGPORT
OBJS= localtime.o strftime.o pgtz.o
# files needed to build zic utility program
-ZICOBJS= zic.o ialloc.o scheck.o localtime-zic.o
+ZICOBJS= zic.o ialloc.o scheck.o localtime.o
# timezone data files
TZDATA := africa antarctica asia australasia europe northamerica southamerica \
@@ -30,17 +30,8 @@ all: SUBSYS.o submake-libpgport zic
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
-# In case of cross-compilation, zic needs to be built with a native
-# compiler because it is run during the build, not on the final
-# system.
-
-localtime-zic.c: localtime.c
- $(LN_S) $< $@
-
-$(ZICOBJS): CC=$(CC_FOR_BUILD)
-
zic: $(ZICOBJS)
- $(CC_FOR_BUILD) $(CFLAGS) $(ZICOBJS) -o $@$(X)
+ $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
install: all installdirs
./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES)
@@ -49,4 +40,4 @@ installdirs:
$(mkinstalldirs) $(DESTDIR)$(datadir)
clean distclean maintainer-clean:
- rm -f SUBSYS.o zic zic$(X) $(OBJS) $(ZICOBJS) localtime-zic.c
+ rm -f SUBSYS.o zic$(X) $(OBJS) $(ZICOBJS)