[oe] why does glibc_2.9.bb use glibc-ports-2.7?

Graham Gower graham.gower at gmail.com
Wed Aug 12 07:32:03 UTC 2009


This combination of glibc-2.9 with glibc-ports-2.7 fails to build on mipsel.

I assume there is either a problem with the glibc-ports-2.9 on arm, or the
recipe was simply copied from glibc_2.7.bb without noticing that the ports
version was hardcoded.

I'm using the following patch on mipsel without problems. I don't know what
needs to be done for the other architectures, so it shouldn't be committed.

-Graham

PS: eglibc-2.9 and eglibc-2.10 both fail with a nasty error:
/home/grg/oe/tmp/work/mipsel-angstrom-linux/eglibc-2.9-r4.2/build-mipsel-angstrom-linux/libc_pic.os: In function `_mcount':
(.debug_macinfo+0x5bafe18): relocation truncated to fit: R_MIPS_HI16 against `_gp_disp'


diff --git a/recipes/glibc/glibc-2.9/_begin.patch b/recipes/glibc/glibc-2.9/_begin.patch
new file mode 100644
index 0000000..8d36a05
--- /dev/null
+++ b/recipes/glibc/glibc-2.9/_begin.patch
@@ -0,0 +1,28 @@
+From 7c8a67320e26b8c11108bf0a3410d3aef9cf3486 Mon Sep 17 00:00:00 2001
+From: Ulrich Drepper <drepper at redhat.com>
+Date: Sat, 31 Jan 2009 00:21:15 +0000
+Subject: [PATCH] * elf/Makefile (ld.so): Adjust the sed script to insert _begin in to newer linker scripts.
+---
+diff --git a/elf/Makefile b/elf/Makefile
+index 8079fe9..e44ff1d 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -1,4 +1,4 @@
+-# Copyright (C) 1995-2007, 2008 Free Software Foundation, Inc.
++# Copyright (C) 1995-2007, 2008, 2009 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+ # The GNU C Library is free software; you can redistribute it and/or
+@@ -304,7 +304,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
+ 		  $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 |	\
+ 		  LC_ALL=C \
+ 		  sed -e '/^=========/,/^=========/!d;/^=========/d'	\
+-		      -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
++		      -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
+ 		  > $@.lds
+ 	$(LINK.o) -nostdlib -nostartfiles -shared -o $@			\
+ 		  $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now))	\
+-- 
+1.6.3.2
+
+
diff --git a/recipes/glibc/glibc_2.9.bb b/recipes/glibc/glibc_2.9.bb
index 6e323aa..c17d516 100644
--- a/recipes/glibc/glibc_2.9.bb
+++ b/recipes/glibc/glibc_2.9.bb
@@ -43,7 +43,7 @@ RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
 #	   file://arm-ioperm.patch;patch=1;pnum=0 \
 #	   file://ldd.patch;patch=1;pnum=0 \
 SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
-	   ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-2.7.tar.bz2 \
+	   ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-${PV}.tar.bz2 \
 	   ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2 \
            file://arm-memcpy.patch;patch=1 \
            file://arm-longlong.patch;patch=1 \
@@ -53,10 +53,6 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
            file://nptl-crosscompile.patch;patch=1 \
 	   file://glibc-check_pf.patch;patch=1;pnum=0 \
            file://ldd-unbash.patch;patch=1 \
-	   file://glibc-arm-IO-acquire-lock-fix.diff;patch=1 \
-	   file://local-args6.diff;patch=1 \
-	   file://arm-check-pf.patch;patch=1 \
-	   file://arm-lowlevellock-include-tls.patch;patch=1 \
 	   file://generic-bits_select.h \
 	   file://generic-bits_types.h \
 	   file://generic-bits_typesizes.h \
@@ -65,8 +61,15 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
            file://generate-supported.mk \
            file://march-i686.patch;patch=1;pnum=0 \
 	   file://tls_i486.patch;patch=1 \
+	   file://_begin.patch;patch=1 \
            "
 
+# glibc-ports-2.7 arm patches
+#SRC_URI_append_arm = " file://arm-check-pf.patch;patch=1 \
+#	   file://arm-lowlevellock-include-tls.patch;patch=1 \
+#	   file://local-args6.diff;patch=1 \
+#	   file://glibc-arm-IO-acquire-lock-fix.diff;patch=1 \
+#	   "
 
 # Build fails on sh3 and sh4 without additional patches
 SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
@@ -90,7 +93,7 @@ EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
 
 do_munge() {
 	# Integrate ports and libidn into tree
-	mv ${WORKDIR}/glibc-ports-2.7 ${S}/ports
+	mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports
 	mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn
 
 	# Ports isn't really working... Fix it




More information about the Openembedded-devel mailing list