aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/eglibc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-09-25 16:01:33 -0700
committerKhem Raj <raj.khem@gmail.com>2010-09-27 15:05:27 -0700
commite84556845a34f8925f079a667f4f9dd101a5379f (patch)
tree2f7330a0b20b48ae62188fd59e612226a6195e54 /recipes/eglibc
parente33feda488545dbec4a71c590fee8f6f3c2a7a0d (diff)
downloadopenembedded-e84556845a34f8925f079a667f4f9dd101a5379f.tar.gz
eglibc-2.12: Configure for 64-bit mips
* Make it to install into /lib and /usr/lib instead of /lib64 and /usr/lib64 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/eglibc')
-rw-r--r--recipes/eglibc/eglibc-initial.inc7
-rw-r--r--recipes/eglibc/eglibc-package.bbclass5
-rw-r--r--recipes/eglibc/eglibc_2.12.bb6
-rw-r--r--recipes/eglibc/files/eglibc-dont-cache-slibdir.patch132
4 files changed, 146 insertions, 4 deletions
diff --git a/recipes/eglibc/eglibc-initial.inc b/recipes/eglibc/eglibc-initial.inc
index eb765df178..2a68fd66da 100644
--- a/recipes/eglibc/eglibc-initial.inc
+++ b/recipes/eglibc/eglibc-initial.inc
@@ -24,9 +24,14 @@ do_compile () {
do_install () {
oe_runmake cross-compiling=yes install_root=${D} \
includedir='${includedir}' prefix='${prefix}' \
+ libdir='${libdir}' slibdir='${base_libdir}' \
+ localedir='${libdir}/locale' \
install-bootstrap-headers=yes install-headers
- oe_runmake csu/subdir_lib
+ oe_runmake includedir='${includedir}' prefix='${prefix}' \
+ libdir='${libdir}' slibdir='${base_libdir}' \
+ localedir='${libdir}/locale' \
+ csu/subdir_lib
# Two headers -- stubs.h and features.h -- aren't installed by install-headers,
# so do them by hand. We can tolerate an empty stubs.h for the moment.
# See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
diff --git a/recipes/eglibc/eglibc-package.bbclass b/recipes/eglibc/eglibc-package.bbclass
index a041f93ef2..972774701a 100644
--- a/recipes/eglibc/eglibc-package.bbclass
+++ b/recipes/eglibc/eglibc-package.bbclass
@@ -88,7 +88,10 @@ do_configure_prepend() {
}
do_install() {
- oe_runmake install_root=${D} install
+ oe_runmake install_root=${D} \
+ libdir='${libdir}' slibdir='${base_libdir}' \
+ localedir='${libdir}/locale' \
+ install
for r in ${rpcsvc}; do
h=`echo $r|sed -e's,\.x$,.h,'`
install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
diff --git a/recipes/eglibc/eglibc_2.12.bb b/recipes/eglibc/eglibc_2.12.bb
index fce0bdd806..aff8aa3166 100644
--- a/recipes/eglibc/eglibc_2.12.bb
+++ b/recipes/eglibc/eglibc_2.12.bb
@@ -4,7 +4,7 @@ DEFAULT_PREFERENCE = "-1"
DEPENDS += "gperf-native"
FILESPATHPKG =. "eglibc-svn:"
PV = "2.12"
-PR = "${INC_PR}.4"
+PR = "${INC_PR}.5"
PR_append = "+svnr${SRCPV}"
SRCREV="11306"
EGLIBC_BRANCH="eglibc-2_12"
@@ -14,6 +14,7 @@ SRC_URI = "svn://svn.eglibc.org/branches;module=${EGLIBC_BRANCH};proto=svn \
file://shorten-build-commands.patch \
file://sh4_set_fpscr_2.12.patch \
file://sh4_local-fpscr_values.patch \
+ file://eglibc-dont-cache-slibdir.patch \
file://etc/ld.so.conf \
file://generate-supported.mk"
S = "${WORKDIR}/${EGLIBC_BRANCH}/libc"
@@ -89,7 +90,8 @@ rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
do_compile () {
# -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
unset LDFLAGS
- base_do_compile
+ oe_runmake libdir='${libdir}' slibdir='${base_libdir}' \
+ localedir='${libdir}/locale'
(
cd ${S}/sunrpc/rpcsvc
for r in ${rpcsvc}; do
diff --git a/recipes/eglibc/files/eglibc-dont-cache-slibdir.patch b/recipes/eglibc/files/eglibc-dont-cache-slibdir.patch
new file mode 100644
index 0000000000..97bc53a037
--- /dev/null
+++ b/recipes/eglibc/files/eglibc-dont-cache-slibdir.patch
@@ -0,0 +1,132 @@
+Source: http://sourceware.org/ml/libc-alpha/2008-03/msg00105.html
+Status: Not applied upstream
+
+After reconfiguring, the value of slibdir changes from ${exec_prefix}/lib32 or
+${exec_prefix}/lib64 to ${exec_prefix}/lib.
+
+This is because the code that sets libdir is only executed if libc_cv_slibdir
+is unset (this is to provide an override mechanism for subtargets). If the
+value of libc_cv_slibdir is read from the config cache the value of libdir is
+never adjusted. Or:
+
+ $ rm config.cache
+ $ ~/src/glibc/configure --host=mips64-unknown-linux-gnu --build=i686-linux --prefix=/usr --cache-file=config.cache &>/dev/null
+ $ grep libdir config.make
+ libdir = ${exec_prefix}/lib32
+ slibdir = /lib32
+ $ ~/src/glibc/configure --host=mips64-unknown-linux-gnu --build=i686-linux --prefix=/usr --cache-file=config.cache &>/dev/null
+ $ grep libdir config.make
+ libdir = ${exec_prefix}/lib
+ slibdir = /lib32
+
+With the current logic, either both libdir and slibdir should be cached or
+neither. This patch renames slibdir so that it is no longer cached.
+
+The patch has been in our tree for a few weeks now and produced no regressions
+with glibc testing (make check).
+
+Please apply if OK.
+
+Adam
+
+ * config.make.in (libc_cv_slibdir): Rename to slibdir.
+ * configure.in: Rename libc_cv_slibdir to slibdir.
+ * sysdeps/unix/sysv/linux/configure.in: Likewise.
+ * ports/sysdeps/unix/sysv/linux/mips/configure.in: Likewise
+ * configure: Regenerate.
+ * sysdeps/unix/sysv/linux/configure: Likewise.
+ * ports/sysdeps/unix/sysv/linux/mips/configure: Likewise.
+
+Index: libc/config.make.in
+===================================================================
+--- libc.orig/config.make.in 2010-08-25 00:26:33.000000000 -0700
++++ libc/config.make.in 2010-09-25 12:31:21.460933356 -0700
+@@ -10,7 +10,7 @@
+ exec_prefix = @exec_prefix@
+ datadir = @datadir@
+ libdir = @libdir@
+-slibdir = @libc_cv_slibdir@
++slibdir = @slibdir@
+ localedir = @libc_cv_localedir@
+ sysconfdir = @libc_cv_sysconfdir@
+ libexecdir = @libexecdir@
+Index: libc/configure.in
+===================================================================
+--- libc.orig/configure.in 2010-08-25 00:26:33.000000000 -0700
++++ libc/configure.in 2010-09-25 12:31:21.484430729 -0700
+@@ -2337,7 +2337,7 @@
+ fi
+ AC_SUBST(old_glibc_headers)
+
+-AC_SUBST(libc_cv_slibdir)
++AC_SUBST(slibdir)
+ AC_SUBST(libc_cv_localedir)
+ AC_SUBST(libc_cv_sysconfdir)
+ AC_SUBST(libc_cv_rootsbindir)
+Index: libc/sysdeps/unix/sysv/linux/configure.in
+===================================================================
+--- libc.orig/sysdeps/unix/sysv/linux/configure.in 2010-08-25 00:25:11.000000000 -0700
++++ libc/sysdeps/unix/sysv/linux/configure.in 2010-09-25 12:31:21.500430612 -0700
+@@ -147,12 +147,12 @@
+ case "$prefix" in
+ /usr | /usr/)
+ # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
+- # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
++ # Allow earlier configure scripts to handle slibdir, libdir,
+ # and libc_cv_localedir.
+- test -n "$libc_cv_slibdir" || \
++ test -n "$slibdir" || \
+ case $machine in
+ sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
+- libc_cv_slibdir="/lib64"
++ slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ # Locale data can be shared between 32bit and 64bit libraries
+@@ -160,7 +160,7 @@
+ fi
+ ;;
+ *)
+- libc_cv_slibdir="/lib"
++ slibdir="/lib"
+ ;;
+ esac
+ # Allow the user to override the path with --sysconfdir
+Index: libc/ports/sysdeps/unix/sysv/linux/mips/configure.in
+===================================================================
+--- libc.orig/ports/sysdeps/unix/sysv/linux/mips/configure.in 2010-08-25 00:24:01.000000000 -0700
++++ libc/ports/sysdeps/unix/sysv/linux/mips/configure.in 2010-09-25 12:31:21.500430612 -0700
+@@ -80,12 +80,12 @@
+ case "$prefix" in
+ /usr | /usr/)
+ # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
+- # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
++ # Allow earlier configure scripts to handle slibdir, libdir,
+ # and libc_cv_localedir.
+- test -n "$libc_cv_slibdir" || \
++ test -n "$slibdir" || \
+ case $machine in
+ mips/mips64/n64/* )
+- libc_cv_slibdir="/lib64"
++ slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ # Locale data can be shared between 32bit and 64bit libraries
+@@ -93,7 +93,7 @@
+ fi
+ ;;
+ mips/mips64/n32/* )
+- libc_cv_slibdir="/lib32"
++ slibdir="/lib32"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib32';
+ # Locale data can be shared between 32bit and 64bit libraries
+@@ -101,7 +101,7 @@
+ fi
+ ;;
+ *)
+- libc_cv_slibdir="/lib"
++ slibdir="/lib"
+ ;;
+ esac
+ esac