Browse Source

fix timezone configuration for eglibc/glibc based systems

Waldemar Brodkorb 14 years ago
parent
commit
ef99335285
3 changed files with 6 additions and 20 deletions
  1. 3 2
      package/eglibc/Makefile
  2. 3 2
      package/glibc/Makefile
  3. 0 16
      toolchain/eglibc/patches/eglibc-cross.patch

+ 3 - 2
package/eglibc/Makefile

@@ -52,8 +52,9 @@ EGLIBC_ENV:=		PATH='${TARGET_PATH}' \
 do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
 	${INSTALL_DIR} $(IDIR_EGLIBC)/lib $(IDIR_EGLIBC)/etc \
 		$(IDIR_EGLIBC)/usr/lib
-	# install /etc/localtime from host system (FIXME)
-	${CP} /etc/localtime $(IDIR_EGLIBC)/etc
+	test -z $(ADK_RUNTIME_TIMEZONE) || \
+	   $(CP) /usr/share/zoneinfo/$(ADK_RUNTIME_TIMEZONE) \
+		$(IDIR_EGLIBC)/etc/localtime
 	$(CP) $(STAGING_DIR)/lib/ld* $(IDIR_EGLIBC)/lib/
 	$(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_EGLIBC)/lib/
 	-for file in libc libcrypt libdl libm libnsl libresolv librt libutil libnss_compat libnss_dns libnss_files; do \

+ 3 - 2
package/glibc/Makefile

@@ -41,8 +41,9 @@ 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}
 	${INSTALL_DIR} $(IDIR_GLIBC)/lib $(IDIR_GLIBC)/etc
-	# install /etc/localtime from host system (FIXME)
-	${CP} /etc/localtime $(IDIR_GLIBC)/etc
+	test -z $(ADK_RUNTIME_TIMEZONE) || \
+	   $(CP) /usr/share/zoneinfo/$(ADK_RUNTIME_TIMEZONE) \
+		$(IDIR_EGLIBC)/etc/localtime
 	$(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_GLIBC)/lib/
 	$(CP) $(STAGING_DIR)/lib/ld*.so* $(IDIR_GLIBC)/lib/
 	-for file in libc libcrypt libdl libm libnsl libresolv librt libutil libnss_compat libnss_dns libnss_files; do \

+ 0 - 16
toolchain/eglibc/patches/eglibc-cross.patch

@@ -62,22 +62,6 @@ diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rp
 diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/Makefile
 --- eglibc-2.11.1.orig/libc/timezone/Makefile	2010-02-24 08:09:02.000000000 +0100
 +++ eglibc-2.11.1/libc/timezone/Makefile	2010-03-22 18:50:04.134408513 +0100
-@@ -69,10 +69,11 @@
- 					 $(addprefix $(inst_zonedir)/, \
- 						     $(posixrules-file)))
- 
--install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
--					      $(zonenames:%=posix/%) \
--					      $(zonenames:%=right/%)) \
--		 $(installed-localtime-file) $(installed-posixrules-file)
-+install-others =
-+#install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
-+#					      $(zonenames:%=posix/%) \
-+#					      $(zonenames:%=right/%)) \
-+#		 $(installed-localtime-file) $(installed-posixrules-file)
- 
- ifeq ($(have-ksh),yes)
- install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
 @@ -181,8 +182,9 @@
  $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))