Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 261ffd0

Browse files
committed
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.
1 parent a923602 commit 261ffd0

File tree

5 files changed

+8
-58
lines changed

5 files changed

+8
-58
lines changed

configure

+1-13
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ ac_includes_default="\
314314
# include <unistd.h>
315315
#endif"
316316

317-
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'
317+
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'
318318
ac_subst_files=''
319319

320320
# Initialize some variables set by options.
@@ -3305,17 +3305,6 @@ _ACEOF
33053305

33063306

33073307

3308-
#
3309-
# Native compiler
3310-
#
3311-
3312-
if test -z "$CC_FOR_BUILD"; then
3313-
CC_FOR_BUILD=$CC
3314-
fi
3315-
3316-
3317-
3318-
33193308
#
33203309
# Set up TAS assembly code if needed; the template file has now had its
33213310
# chance to request this.
@@ -22904,7 +22893,6 @@ s,@EXEEXT@,$EXEEXT,;t t
2290422893
s,@OBJEXT@,$OBJEXT,;t t
2290522894
s,@CPP@,$CPP,;t t
2290622895
s,@GCC@,$GCC,;t t
22907-
s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
2290822896
s,@TAS@,$TAS,;t t
2290922897
s,@autodepend@,$autodepend,;t t
2291022898
s,@INCLUDES@,$INCLUDES,;t t

configure.in

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.416 2005/07/05 23:13:57 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.417 2005/07/06 21:04:13 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -303,17 +303,6 @@ AC_DEFINE_UNQUOTED(PG_VERSION_STR,
303303
[A string containing the version number, platform, and C compiler])
304304

305305

306-
#
307-
# Native compiler
308-
#
309-
310-
if test -z "$CC_FOR_BUILD"; then
311-
CC_FOR_BUILD=$CC
312-
fi
313-
314-
AC_SUBST(CC_FOR_BUILD)
315-
316-
317306
#
318307
# Set up TAS assembly code if needed; the template file has now had its
319308
# chance to request this.

doc/src/sgml/installation.sgml

+1-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.239 2005/07/03 18:54:27 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.240 2005/07/06 21:04:14 momjian Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -993,23 +993,6 @@ su - postgres
993993
<userinput>./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'</>
994994
</screen>
995995
</para>
996-
997-
<para>
998-
If you are cross-compiling<indexterm><primary>cross
999-
compilation</primary></indexterm> (compiling on one architecture
1000-
with the intent to run on a different architecture), special care
1001-
needs to be taken. First of all, specify the host architecture
1002-
(the architecture PostgreSQL will run on) using the option
1003-
<option>--host</option>. The variables <envar>CC</>,
1004-
<envar>CFLAGS</>, etc. should refer to the build tools for the
1005-
host architecture. During the build process, the time-zone
1006-
database for PostgreSQL is created and a special tool to do that
1007-
is compiled and run during the build process. This tool needs to
1008-
be compiled using a native compiler. Specify this compiler using
1009-
the variable <envar>CC_FOR_BUILD</envar>. Cross compilation
1010-
requires expert knowledge and the support for this process in the
1011-
PostgreSQL tree should be considered somewhat experimental.
1012-
</para>
1013996
</step>
1014997

1015998
<step>

src/Makefile.global.in

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.216 2005/07/05 23:13:57 tgl Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.217 2005/07/06 21:04:14 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -184,7 +184,6 @@ endif
184184
endif # not PGXS
185185

186186
CC = @CC@
187-
CC_FOR_BUILD = @CC_FOR_BUILD@
188187
GCC = @GCC@
189188
CFLAGS = @CFLAGS@
190189

src/timezone/Makefile

+4-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for the timezone library
55

66
# IDENTIFICATION
7-
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.20 2005/07/04 19:54:51 momjian Exp $
7+
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.21 2005/07/06 21:04:14 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -18,7 +18,7 @@ override CPPFLAGS := $(CPPFLAGS) -I$(srcdir) -DNO_PGPORT
1818
OBJS= localtime.o strftime.o pgtz.o
1919

2020
# files needed to build zic utility program
21-
ZICOBJS= zic.o ialloc.o scheck.o localtime-zic.o
21+
ZICOBJS= zic.o ialloc.o scheck.o localtime.o
2222

2323
# timezone data files
2424
TZDATA := africa antarctica asia australasia europe northamerica southamerica \
@@ -30,17 +30,8 @@ all: SUBSYS.o submake-libpgport zic
3030
SUBSYS.o: $(OBJS)
3131
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
3232

33-
# In case of cross-compilation, zic needs to be built with a native
34-
# compiler because it is run during the build, not on the final
35-
# system.
36-
37-
localtime-zic.c: localtime.c
38-
$(LN_S) $< $@
39-
40-
$(ZICOBJS): CC=$(CC_FOR_BUILD)
41-
4233
zic: $(ZICOBJS)
43-
$(CC_FOR_BUILD) $(CFLAGS) $(ZICOBJS) -o $@$(X)
34+
$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
4435

4536
install: all installdirs
4637
./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES)
@@ -49,4 +40,4 @@ installdirs:
4940
$(mkinstalldirs) $(DESTDIR)$(datadir)
5041

5142
clean distclean maintainer-clean:
52-
rm -f SUBSYS.o zic zic$(X) $(OBJS) $(ZICOBJS) localtime-zic.c
43+
rm -f SUBSYS.o zic$(X) $(OBJS) $(ZICOBJS)

0 commit comments

Comments
 (0)