summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>2012-08-10 03:52:29 +0200
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>2012-08-10 03:52:29 +0200
commit62eda65923410d85e9122f6454461e3064bef9d6 (patch)
treea6f5813cfc96466bbe4352acd476fb0773ecd2a1 /toolchain
parent3c087553827269f44021cb5204860e32ea864eb7 (diff)
update glibc
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/Makefile1
-rw-r--r--toolchain/gcc/patches/4.6.3/siginfo.patch15
-rw-r--r--toolchain/glibc/Makefile2
-rw-r--r--toolchain/glibc/Makefile.inc4
-rw-r--r--toolchain/glibc/patches/gcc_eh.patch19
-rw-r--r--toolchain/glibc/patches/getpagesize.patch14
-rw-r--r--toolchain/glibc/patches/glibc-cross.patch99
-rw-r--r--toolchain/glibc/patches/i686_define_bug.patch23
-rw-r--r--toolchain/glibc/patches/stdio_lim.patch31
-rw-r--r--toolchain/glibc/patches/timezone.patch60
-rw-r--r--toolchain/glibc/patches/tz.patch135
11 files changed, 190 insertions, 213 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 67a2b1b76..a9f361ffe 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -101,6 +101,7 @@ $(GCC_BUILD_DIR_MINIMAL)/.configured:
ln -sf ${STAGING_TARGET_DIR}/include $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
rm -rf ${STAGING_HOST_DIR}/$(REAL_GNU_TARGET_NAME)/lib
ln -sf ${STAGING_TARGET_DIR}/lib $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+ sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' $(WRKBUILD)/gcc/configure
cd $(GCC_BUILD_DIR_MINIMAL); PATH='$(TARGET_PATH)' \
$(WRKBUILD)/configure \
${GCC_CONFOPTS} \
diff --git a/toolchain/gcc/patches/4.6.3/siginfo.patch b/toolchain/gcc/patches/4.6.3/siginfo.patch
new file mode 100644
index 000000000..6d0b3e9b9
--- /dev/null
+++ b/toolchain/gcc/patches/4.6.3/siginfo.patch
@@ -0,0 +1,15 @@
+diff -Nur gcc-4.6.3.orig/gcc/config/i386/linux-unwind.h gcc-4.6.3/gcc/config/i386/linux-unwind.h
+--- gcc-4.6.3.orig/gcc/config/i386/linux-unwind.h 2011-01-03 21:52:22.000000000 +0100
++++ gcc-4.6.3/gcc/config/i386/linux-unwind.h 2012-08-02 11:47:11.000000000 +0200
+@@ -133,9 +133,9 @@
+ {
+ struct rt_sigframe {
+ int sig;
+- struct siginfo *pinfo;
++ siginfo_t *pinfo;
+ void *puc;
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index 4b0573078..65341591b 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -23,7 +23,7 @@ endif
GLIBC_MAKEOPTS+= cross-compiling=yes
ifeq (${ADK_MAKE_PARALLEL},y)
-GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j${ADK_MAKE_JOBS}"
+GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j1"
endif
GLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers
diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc
index 636fbe142..a491fc5bc 100644
--- a/toolchain/glibc/Makefile.inc
+++ b/toolchain/glibc/Makefile.inc
@@ -2,9 +2,9 @@
# material, please see the LICENCE file in the top-level directory.
PKG_NAME:= glibc
-PKG_VERSION:= 2.14.1
+PKG_VERSION:= 2.16.0
PKG_RELEASE:= 1
-PKG_MD5SUM:= f3841fd7812db4713115ff4447b29207
+PKG_MD5SUM:= b5f786fa7df4ff947bcd240c0e595f98
PKG_SITES:= ${MASTER_SITE_GNU:=glibc/}
GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
diff --git a/toolchain/glibc/patches/gcc_eh.patch b/toolchain/glibc/patches/gcc_eh.patch
index 10749dcdb..46f3c784a 100644
--- a/toolchain/glibc/patches/gcc_eh.patch
+++ b/toolchain/glibc/patches/gcc_eh.patch
@@ -1,18 +1,15 @@
-diff -Nur glibc-2.10.1.orig/Makeconfig glibc-2.10.1/Makeconfig
---- glibc-2.10.1.orig/Makeconfig 2009-08-20 08:51:54.000000000 +0200
-+++ glibc-2.10.1/Makeconfig 2009-08-21 01:53:59.000000000 +0200
-@@ -525,12 +525,12 @@
- libunwind = -lunwind
- endif
- ifneq ($(have-as-needed),yes)
-- libgcc_eh := -lgcc_eh $(libunwind)
-+ libgcc_eh := $(libunwind)
+diff -Nur glibc-2.16.0.orig/Makeconfig glibc-2.16.0/Makeconfig
+--- glibc-2.16.0.orig/Makeconfig 2012-06-30 21:12:34.000000000 +0200
++++ glibc-2.16.0/Makeconfig 2012-08-02 10:18:56.000000000 +0200
+@@ -521,9 +521,9 @@
else
- libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
+ libunwind = -lunwind
endif
+-libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
++libgcc_eh := -Wl,--as-needed $(libunwind) -Wl,--no-as-needed
gnulib := -lgcc $(libgcc_eh)
-static-gnulib := -lgcc -lgcc_eh $(libunwind)
+static-gnulib := -lgcc $(libunwind)
libc.so-gnulib := -lgcc
endif
- ifeq ($(elf),yes)
+ +preinit = $(addprefix $(csu-objpfx),crti.o)
diff --git a/toolchain/glibc/patches/getpagesize.patch b/toolchain/glibc/patches/getpagesize.patch
deleted file mode 100644
index de9b73213..000000000
--- a/toolchain/glibc/patches/getpagesize.patch
+++ /dev/null
@@ -1,14 +0,0 @@
- This patch is needed at least on kirkwood. Otherwise DNS-lookups will fail, since
- GLRO(dl_pagesize) is zero. Solution taken from this resource:
- http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg228455.html
---- glibc-2.12.1/sysdeps/unix/sysv/linux/getpagesize.c.orig 2011-02-28 03:41:47.870001678 +0100
-+++ glibc-2.12.1/sysdeps/unix/sysv/linux/getpagesize.c 2011-02-28 03:42:16.712993932 +0100
-@@ -28,7 +28,7 @@
- int
- __getpagesize ()
- {
--#ifdef __ASSUME_AT_PAGESIZE
-+#if 0
- assert (GLRO(dl_pagesize) != 0);
- return GLRO(dl_pagesize);
- #else
diff --git a/toolchain/glibc/patches/glibc-cross.patch b/toolchain/glibc/patches/glibc-cross.patch
new file mode 100644
index 000000000..f8e0c2416
--- /dev/null
+++ b/toolchain/glibc/patches/glibc-cross.patch
@@ -0,0 +1,99 @@
+diff -Nur glibc-2.16.0.orig/sunrpc/rpc/types.h glibc-2.16.0/sunrpc/rpc/types.h
+--- glibc-2.16.0.orig/sunrpc/rpc/types.h 2012-06-30 21:12:34.000000000 +0200
++++ glibc-2.16.0/sunrpc/rpc/types.h 2012-08-01 18:05:49.000000000 +0200
+@@ -69,19 +69,25 @@
+ #include <sys/types.h>
+ #endif
+
+-#ifndef __u_char_defined
+-typedef __u_char u_char;
+-typedef __u_short u_short;
+-typedef __u_int u_int;
+-typedef __u_long u_long;
+-typedef __quad_t quad_t;
+-typedef __u_quad_t u_quad_t;
+-typedef __fsid_t fsid_t;
+-# define __u_char_defined
++typedef unsigned char u_char;
++typedef unsigned short u_short;
++typedef unsigned int u_int;
++typedef unsigned long u_long;
++#if __WORDSIZE == 64
++typedef long int quad_t;
++typedef unsigned long int u_quad_t;
++#elif defined __GLIBC_HAVE_LONG_LONG
++typedef long long int quad_t;
++typedef unsigned long long int u_quad_t;
++#endif
++#if defined(_CROSS_RPCGEN_)
++typedef u_quad_t fsid_t;
+ #endif
+-#ifndef __daddr_t_defined
+-typedef __daddr_t daddr_t;
+-typedef __caddr_t caddr_t;
++
++# define __u_char_defined
++#if !defined(__daddr_t_defined) && defined(linux)
++typedef long int daddr_t;
++typedef char *caddr_t;
+ # define __daddr_t_defined
+ #endif
+
+diff -Nur glibc-2.16.0.orig/sunrpc/rpc_clntout.c glibc-2.16.0/sunrpc/rpc_clntout.c
+--- glibc-2.16.0.orig/sunrpc/rpc_clntout.c 2012-06-30 21:12:34.000000000 +0200
++++ glibc-2.16.0/sunrpc/rpc_clntout.c 2012-08-01 18:05:49.000000000 +0200
+@@ -31,7 +31,7 @@
+ */
+ #include <stdio.h>
+ #include <string.h>
+-#include <rpc/types.h>
++#include "rpc/types.h"
+ #include "rpc_parse.h"
+ #include "rpc_util.h"
+ #include "proto.h"
+diff -Nur glibc-2.16.0.orig/sunrpc/rpc_main.c glibc-2.16.0/sunrpc/rpc_main.c
+--- glibc-2.16.0.orig/sunrpc/rpc_main.c 2012-06-30 21:12:34.000000000 +0200
++++ glibc-2.16.0/sunrpc/rpc_main.c 2012-08-01 18:05:49.000000000 +0200
+@@ -38,7 +38,11 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
++#ifdef _CROSS_RPCGEN_
++#define gettext(X) (X)
++#else
+ #include <libintl.h>
++#endif
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+@@ -958,10 +962,12 @@
+ abort ();
+ temp = rindex (cmd->infile, '.');
+ cp = stpcpy (mkfilename, "Makefile.");
+- if (temp != NULL)
+- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
+- else
++ if (temp != NULL) {
++ strncpy (cp, cmd->infile, temp - cmd->infile);
++ cp[temp - cmd->infile - 1] = '\0';
++ } else {
+ stpcpy (cp, cmd->infile);
++ }
+
+ }
+ else
+diff -Nur glibc-2.16.0.orig/sunrpc/rpc_scan.c glibc-2.16.0/sunrpc/rpc_scan.c
+--- glibc-2.16.0.orig/sunrpc/rpc_scan.c 2012-06-30 21:12:34.000000000 +0200
++++ glibc-2.16.0/sunrpc/rpc_scan.c 2012-08-01 18:05:49.000000000 +0200
+@@ -37,7 +37,11 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
++#ifdef _CROSS_RPCGEN_
++#define gettext(X) (X)
++#else
+ #include <libintl.h>
++#endif
+ #include "rpc_scan.h"
+ #include "rpc_parse.h"
+ #include "rpc_util.h"
diff --git a/toolchain/glibc/patches/i686_define_bug.patch b/toolchain/glibc/patches/i686_define_bug.patch
index 0414fecc9..cef7440b8 100644
--- a/toolchain/glibc/patches/i686_define_bug.patch
+++ b/toolchain/glibc/patches/i686_define_bug.patch
@@ -7,25 +7,10 @@
http://bugs.gentoo.org/show_bug.cgi?id=201815. There are lots of duplicates to it, many people are
affected, one can find really elaborate reports. And the responsible gentoo developers are too
elite to even point to the actual patch fixing the issue.
-diff -Naur glibc-2.11.1-orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
---- glibc-2.11.1-orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000
-+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 02:24:02.000000000 +0100
-@@ -45,6 +45,11 @@
- /* Embed an #include to pull in the alignment and .end directives. */
- asm ("\n#include \"defs.h\"");
-
-+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
-+asm ("\n#undef __i686");
-+asm ("\n#define __i686 __i686");
-+asm ("\n#endif");
-+
- /* The initial common code ends here. */
- asm ("\n/*@HEADER_ENDS*/");
-
-diff -Naur glibc-2.11.1-orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h
---- glibc-2.11.1-orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000
-+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 02:24:02.000000000 +0100
-@@ -29,6 +29,10 @@
+diff -Nur glibc-2.16.0.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.16.0/sysdeps/unix/sysv/linux/i386/sysdep.h
+--- glibc-2.16.0.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2012-06-30 21:12:34.000000000 +0200
++++ glibc-2.16.0/sysdeps/unix/sysv/linux/i386/sysdep.h 2012-08-01 17:56:05.000000000 +0200
+@@ -28,6 +28,10 @@
#include <dl-sysdep.h>
#include <tls.h>
diff --git a/toolchain/glibc/patches/stdio_lim.patch b/toolchain/glibc/patches/stdio_lim.patch
deleted file mode 100644
index 41f8447dc..000000000
--- a/toolchain/glibc/patches/stdio_lim.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -Nur glibc-2.11.orig/stdio-common/Makefile glibc-2.11/stdio-common/Makefile
---- glibc-2.11.orig/stdio-common/Makefile 2009-10-30 18:17:08.000000000 +0100
-+++ glibc-2.11/stdio-common/Makefile 2009-12-30 23:52:08.000000000 +0100
-@@ -21,7 +21,7 @@
- #
- subdir := stdio-common
-
--headers := stdio_ext.h printf.h bits/printf-ldbl.h
-+headers := stdio_ext.h printf.h bits/printf-ldbl.h bits/stdio_lim.h
-
- routines := \
- ctermid cuserid \
-@@ -40,8 +40,6 @@
- isoc99_vsscanf \
- psiginfo
-
--install-others = $(inst_includedir)/bits/stdio_lim.h
--
- include ../Makeconfig
-
- aux := errlist siglist printf-parsemb printf-parsewc fxprintf
-@@ -66,9 +64,6 @@
-
- include ../Rules
-
--$(inst_includedir)/bits/stdio_lim.h: $(common-objpfx)bits/stdio_lim.h $(+force)
-- $(do-install)
--
- ifeq ($(cross-compiling),no)
- .PHONY: do-tst-unbputc do-tst-printf
- tests: do-tst-unbputc do-tst-printf
diff --git a/toolchain/glibc/patches/timezone.patch b/toolchain/glibc/patches/timezone.patch
new file mode 100644
index 000000000..0855ef578
--- /dev/null
+++ b/toolchain/glibc/patches/timezone.patch
@@ -0,0 +1,60 @@
+--- toolchain_build_i686_eglibc/w-eglibc-2.16-1/eglibc-2.16/libc/timezone/Makefile 2012-07-31 08:58:48.000000000 +0200
++++ toolchain_build_i686_glibc/w-glibc-2.16.0-1/glibc-2.16.0/timezone/Makefile 2012-06-30 21:12:34.000000000 +0200
+@@ -52,16 +52,7 @@
+ include ../Rules
+
+
+-zic-objs = zic.o ialloc.o scheck.o
+-
+-$(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
+-
+-$(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
+- $(BUILD_CC) $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
+- -DCROSS_ZIC $(compile-mkdep-flags)
+-
+-$(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
+- $(BUILD_CC) $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
++$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
+
+ tz-cflags = -DTZDIR='"$(zonedir)"' \
+ -DTZDEFAULT='"$(localtime-file)"' \
+@@ -78,17 +69,10 @@
+ # Don't add leapseconds here since test-tz made checks that work only without
+ # leapseconds.
+ testdata = $(objpfx)testdata
+-ifeq (no,$(cross-compiling))
+ define build-testdata
+ GCONV_PATH=${common-objpfx}iconvdata LANGUAGE=C LC_ALL=C \
+ $(built-program-cmd) -d $(testdata) -y ./yearistype $<
+ endef
+-else
+-define build-testdata
+-LANGUAGE=C LC_ALL=C \
+- $(objpfx)cross-zic -d $(testdata) -y ./yearistype $<
+-endef
+-endif
+
+ $(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
+ $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
+@@ -101,11 +85,7 @@
+ tst-timezone-ENV = TZDIR=$(testdata)
+
+ # Note this must come second in the deps list for $(built-program-cmd) to work.
+-ifeq (no,$(cross-compiling))
+ zic-deps = $(objpfx)zic $(leapseconds) yearistype
+-else
+-zic-deps = $(objpfx)cross-zic $(objpfx)zic $(leapseconds) yearistype
+-endif
+
+ $(testdata)/America/New_York: northamerica $(zic-deps)
+ $(build-testdata)
+@@ -127,8 +107,6 @@
+
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+ sed -e 's%@KSH@%$(KSH)%g' \
+- -e 's%@TZDIR@%$(zonedir)%g' \
+- -e 's%@PKGVERSION@%$(PKGVERSION)%g' \
+- -e 's%@REPORT_BUGS_TO@%$(REPORT_BUGS_TO)%g' < $< > $@.new
++ -e 's%@TZDIR@%$(zonedir)%g' < $< > $@.new
+ chmod 555 $@.new
+ mv -f $@.new $@
diff --git a/toolchain/glibc/patches/tz.patch b/toolchain/glibc/patches/tz.patch
deleted file mode 100644
index 990458aa4..000000000
--- a/toolchain/glibc/patches/tz.patch
+++ /dev/null
@@ -1,135 +0,0 @@
---- glibc-2.12.1/timezone/Makefile 2010-07-27 13:34:39.000000000 +0200
-+++ glibc-2.12.1.orig/timezone/Makefile 2011-01-10 15:20:02.576150764 +0100
-@@ -69,13 +69,10 @@
- $(addprefix $(inst_zonedir)/, \
- $(posixrules-file)))
-
--ifeq ($(cross-compiling),no)
--# Don't try to install the zoneinfo files since we can't run zic.
- install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
- $(zonenames:%=posix/%) \
- $(zonenames:%=right/%)) \
- $(installed-localtime-file) $(installed-posixrules-file)
--endif
-
- ifeq ($(have-ksh),yes)
- install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
-@@ -106,18 +103,35 @@
- echo '$$(addprefix $$(inst_zonedir)/,$$($*-zones)): \' ;\
- echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/,$$($$t-zones)))' ;\
- fi ;\
-- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/right/,$$($*-zones)): \' ;\
-- echo '$< $$(objpfx)zic leapseconds yearistype' ;\
-- echo ' $$(tzcompile)' ;\
-- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/posix/,$$($*-zones)): \' ;\
-- echo '$< $$(objpfx)zic /dev/null yearistype' ;\
-- echo ' $$(tzcompile)' ;\
-- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/,$$($*-zones)): \' ;\
-- echo '$< $$(objpfx)zic $$(leapseconds) yearistype' ;\
-- echo ' $$(tzcompile)' ;\
-+ echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/right/,$$($*-zones)): \' ;) > $@.new
-+
-+ifeq (no,$(cross-compiling))
-+ (echo '$< $$(objpfx)zic leapseconds yearistype' ;) >> $@.new
-+else
-+ (echo '$< $$(objpfx)cross-zic leapseconds yearistype' ;) >> $@.new
-+endif
-+
-+ (echo ' $$(tzcompile)' ;\
-+ echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/posix/,$$($*-zones)): \' ;) >> $@.new
-+
-+ifeq (no,$(cross-compiling))
-+ (echo '$< $$(objpfx)zic /dev/null yearistype' ;) >> $@.new
-+else
-+ (echo '$< $$(objpfx)cross-zic /dev/null yearistype' ;) >> $@.new
-+endif
-+
-+ (echo ' $$(tzcompile)' ;\
-+ echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/,$$($*-zones)): \' ;) >> $@.new
-+
-+ifeq (no,$(cross-compiling))
-+ (echo '$< $$(objpfx)zic $$(leapseconds) yearistype' ;) >> $@.new
-+else
-+ (echo '$< $$(objpfx)cross-zic $$(leapseconds) yearistype' ;) >> $@.new
-+endif
-+
-+ (echo ' $$(tzcompile)' ;\
- echo 'endif' ;\
-- echo 'zonenames := $$(zonenames) $$($*-zones)' ;\
-- ) > $@.new
-+ echo 'zonenames := $$(zonenames) $$($*-zones)' ;) >> $@.new
- mv $@.new $@
-
- .PHONY: echo-zonenames
-@@ -128,7 +142,11 @@
- # We have to use `-d $(inst_zonedir)' to explictly tell zic where to
- # place the output files although $(zonedir) is compiled in. But the
- # user might have set $(install_root) on the command line of `make install'.
-+ifeq (no,$(cross-compiling))
- zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
-+else
-+zic-cmd = $(objpfx)cross-zic -d $(inst_zonedir)
-+endif
- tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
- -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
-
-@@ -158,8 +176,17 @@
- $(zic-cmd) -p $(posixrules)
- endif
-
-+zic-objs = zic.o ialloc.o scheck.o
-+
-+$(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
-+
-+$(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
-+ gcc $< -c $(OUTPUT_OPTION) \
-+ $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) \
-+ $(CPPFLAGS-$*) -DCROSS_ZIC $(compile-mkdep-flags)
-
--$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
-+$(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
-+ gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
-
- tz-cflags = -DTZDIR='"$(zonedir)"' \
- -DTZDEFAULT='"$(localtime-file)"' \
-@@ -176,10 +203,17 @@
- # Don't add leapseconds here since test-tz made checks that work only without
- # leapseconds.
- testdata = $(objpfx)testdata
-+ifeq (no,$(cross-compiling))
- define build-testdata
- GCONV_PATH=${common-objpfx}iconvdata LANGUAGE=C LC_ALL=C \
- $(built-program-cmd) -d $(testdata) -y ./yearistype $<
- endef
-+else
-+define build-testdata
-+LANGUAGE=C LC_ALL=C \
-+ $(objpfx)cross-zic -d $(testdata) -y ./yearistype $<
-+endef
-+endif
-
- $(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
- $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
-@@ -192,7 +226,11 @@
- tst-timezone-ENV = TZDIR=$(testdata)
-
- # Note this must come second in the deps list for $(built-program-cmd) to work.
-+ifeq (no,$(cross-compiling))
- zic-deps = $(objpfx)zic $(leapseconds) yearistype
-+else
-+zic-deps = $(objpfx)cross-zic $(objpfx)zic $(leapseconds) yearistype
-+endif
-
- $(testdata)/America/New_York: northamerica $(zic-deps)
- $(build-testdata)
-@@ -214,7 +252,9 @@
-
- $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
- sed -e 's%@KSH@%$(KSH)%g' \
-- -e 's%@TZDIR@%$(zonedir)%g' < $< > $@.new
-+ -e 's%@TZDIR@%$(zonedir)%g' \
-+ -e 's%@PKGVERSION@%$(PKGVERSION)%g' \
-+ -e 's%@REPORT_BUGS_TO@%$(REPORT_BUGS_TO)%g' < $< > $@.new
- chmod 555 $@.new
- mv -f $@.new $@
-