From 5a65c76bc3d72ea9f275a3c474d5e308cf367a82 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 6 Jan 2011 23:18:06 +0100 Subject: remove obsolete SUB_INSTALL stuff. --- package/glibc/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'package/glibc') diff --git a/package/glibc/Makefile b/package/glibc/Makefile index 8b4584373..f3e757d95 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -20,12 +20,8 @@ CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual -SUB_INSTALLS-y:= -SUB_INSTALLS-m:= -SUB_INSTALLS-${ADK_PACKAGE_GLIBC_DEV}+= glibc-dev-install - # compile nothing, glibc is already build in toolchain directory -do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} +do-install: ${INSTALL_DIR} $(IDIR_GLIBC)/lib $(IDIR_GLIBC)/etc test -z $(ADK_RUNTIME_TIMEZONE) || \ $(CP) /usr/share/zoneinfo/$(ADK_RUNTIME_TIMEZONE) \ -- cgit v1.2.3 From 7e58edfad5318ab12b990099e220be91b47366c0 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 7 Jan 2011 18:21:39 +0100 Subject: glibc: install some glibc-shipped config files - /etc/gai.conf - /etc/nscd.conf - /etc/nsswitch.conf Signed-off-by: Phil Sutter --- package/glibc/Makefile | 4 ++++ toolchain/glibc/Makefile | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'package/glibc') diff --git a/package/glibc/Makefile b/package/glibc/Makefile index 8b4584373..cae293428 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -30,6 +30,10 @@ do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} test -z $(ADK_RUNTIME_TIMEZONE) || \ $(CP) /usr/share/zoneinfo/$(ADK_RUNTIME_TIMEZONE) \ $(IDIR_GLIBC)/etc/localtime + ${CP} ${STAGING_DIR}/etc/gai.conf ${IDIR_GLIBC}/etc/ + ${CP} ${STAGING_DIR}/etc/nscd.conf ${IDIR_GLIBC}/etc/ + ${CP} ${STAGING_DIR}/etc/nsswitch.conf ${IDIR_GLIBC}/etc/ + #$(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_GLIBC)/lib/ $(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/lib/ -for file in libc libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \ $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/lib/; \ diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index 4d39e2b27..9480500d5 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -67,6 +67,10 @@ $(WRKBUILD)/.compiled: $(WRKBUILD)/.installed: ${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL) \ install_root=$(STAGING_TARGET_DIR) install + mkdir -p ${STAGING_TARGET_DIR}/etc + ${INSTALL_DATA} ${WRKBUILD}/posix/gai.conf ${STAGING_TARGET_DIR}/etc/ + ${INSTALL_DATA} ${WRKBUILD}/nscd/nscd.conf ${STAGING_TARGET_DIR}/etc/ + ${INSTALL_DATA} ${WRKBUILD}/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc/ touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h touch $(WRKBUILD)/.installed -- cgit v1.2.3 From 16d94117a716fc361d3db9a2a17cf4c45eab837d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Jan 2011 10:49:04 +0100 Subject: s/STAGING_DIR/STAGING_TARGET_DIR/ --- package/glibc/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'package/glibc') diff --git a/package/glibc/Makefile b/package/glibc/Makefile index cae293428..3dee91994 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -30,10 +30,9 @@ do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} test -z $(ADK_RUNTIME_TIMEZONE) || \ $(CP) /usr/share/zoneinfo/$(ADK_RUNTIME_TIMEZONE) \ $(IDIR_GLIBC)/etc/localtime - ${CP} ${STAGING_DIR}/etc/gai.conf ${IDIR_GLIBC}/etc/ - ${CP} ${STAGING_DIR}/etc/nscd.conf ${IDIR_GLIBC}/etc/ - ${CP} ${STAGING_DIR}/etc/nsswitch.conf ${IDIR_GLIBC}/etc/ - #$(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_GLIBC)/lib/ + ${CP} ${STAGING_TARGET_DIR}/etc/gai.conf ${IDIR_GLIBC}/etc/ + ${CP} ${STAGING_TARGET_DIR}/etc/nscd.conf ${IDIR_GLIBC}/etc/ + ${CP} ${STAGING_TARGET_DIR}/etc/nsswitch.conf ${IDIR_GLIBC}/etc/ $(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/lib/ -for file in libc libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \ $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/lib/; \ -- cgit v1.2.3 From 903a9849d50273c9d63e3be4ca85b1ea847cdf0d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Jan 2011 22:47:51 +0100 Subject: fix timezone configuration for glibc based systems --- TODO | 1 - package/glibc/Makefile | 19 +++++- toolchain/glibc/Makefile | 2 +- toolchain/glibc/patches/tz.patch | 135 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 5 deletions(-) create mode 100644 toolchain/glibc/patches/tz.patch (limited to 'package/glibc') diff --git a/TODO b/TODO index 56959ebbe..552758a73 100644 --- a/TODO +++ b/TODO @@ -6,7 +6,6 @@ - LTO GCC evaluation - finish qemu package - fix autoreconf usage in opensc -- fix timezone stuff in glibc - add back aufs2 patches for kernel - openssl ocf support check - locales support diff --git a/package/glibc/Makefile b/package/glibc/Makefile index f509e3f3c..9d890c18b 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -23,9 +23,22 @@ INSTALL_STYLE:= manual # compile nothing, glibc is already build in toolchain directory do-install: ${INSTALL_DIR} $(IDIR_GLIBC)/lib $(IDIR_GLIBC)/etc - test -z $(ADK_RUNTIME_TIMEZONE) || \ - $(CP) /usr/share/zoneinfo/$(ADK_RUNTIME_TIMEZONE) \ - $(IDIR_GLIBC)/etc/localtime + cd ${STAGING_TARGET_DIR} && for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \ + test -s usr/share/zoneinfo/"$$f" || continue; \ + echo usr/share/zoneinfo/"$$f" | \ + ${TOOLS_DIR}/cpio -pdu ${IDIR_GLIBC}/; \ + done + tz=; cd ${IDIR_GLIBC}/usr/share/zoneinfo || exit 1; \ + for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \ + test -s "$$f" || continue; \ + tz=$$f; \ + done; if test x"$$tz" = x""; then \ + echo >&2 Error during timezone installation; \ + exit 1; \ + else \ + ln -sf "../usr/share/zoneinfo/$$tz" \ + ${IDIR_GLIBC}/etc/localtime; \ + fi ${CP} ${STAGING_TARGET_DIR}/etc/gai.conf ${IDIR_GLIBC}/etc/ ${CP} ${STAGING_TARGET_DIR}/etc/nscd.conf ${IDIR_GLIBC}/etc/ ${CP} ${STAGING_TARGET_DIR}/etc/nsswitch.conf ${IDIR_GLIBC}/etc/ diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index 5d8a252c4..d492b9837 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -17,6 +17,7 @@ ifeq ($(ADK_TARGET_NO_FPU),y) GLIBC_CONFOPTS+= --without-fp endif +GLIBC_MAKEOPTS+= cross-compiling=yes ifeq (${ADK_MAKE_PARALLEL},y) GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j${ADK_MAKE_JOBS}" endif @@ -41,7 +42,6 @@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure (cd $(GLIBC_BUILD_DIR_INITIAL); \ ${GLIBC_ENV} \ $(MAKE) ${GLIBC_MAKEOPTS} \ - cross-compiling=yes \ install-headers \ ); touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h diff --git a/toolchain/glibc/patches/tz.patch b/toolchain/glibc/patches/tz.patch new file mode 100644 index 000000000..990458aa4 --- /dev/null +++ b/toolchain/glibc/patches/tz.patch @@ -0,0 +1,135 @@ +--- 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 $@ + -- cgit v1.2.3