All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] glibc: correct paths in FILES
@ 2009-06-04 11:22 Phil Blundell
  2009-06-04 14:41 ` Michael Smith
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Blundell @ 2009-06-04 11:22 UTC (permalink / raw)
  To: openembedded-devel

It turns out that glibc-package contains a bunch of hard-coded
references to /lib.  This patch replaces them with the appropriate
${base_libdir}.  Also, the globs in ${libc_baselibs} were a bit too
permissive and would accept, for example, "libc.a" which isn't something
that we want in the main library package.

p.

--

diff --git a/recipes/glibc/glibc-package.bbclass b/recipes/glibc/glibc-package.bbclass
index 78738c2..793401f 100644
--- a/recipes/glibc/glibc-package.bbclass
+++ b/recipes/glibc/glibc-package.bbclass
@@ -32,12 +32,12 @@ USE_LDCONFIG ?= "1"
 PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
 PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*"
 
-libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*"
+libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc*.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
 
 FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${datadir}/zoneinfo ${@base_conditional('USE_LDCONFIG', '1', '/sbin/ldconfig', '', d)}"
 FILES_ldd = "${bindir}/ldd"
-FILES_libsegfault = "/lib/libSegFault*"
-FILES_glibc-extra-nss = "/lib/libnss*"
+FILES_libsegfault = "${base_libdir}/libSegFault*"
+FILES_glibc-extra-nss = "${base_libdir}/libnss*"
 FILES_sln = "/sbin/sln"
 FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
 FILES_nscd = "${sbindir}/nscd*"
@@ -46,8 +46,8 @@ FILES_glibc-gconv = "${libdir}/gconv/*"
 FILES_${PN}-dbg += " ${libdir}/gconv/.debug ${libexecdir}/*/.debug"
 FILES_catchsegv = "${bindir}/catchsegv"
 RDEPENDS_catchsegv = "libsegfault"
-FILES_glibc-pcprofile = "/lib/libpcprofile.so"
-FILES_glibc-thread-db = "/lib/libthread_db*"
+FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so"
+FILES_glibc-thread-db = "${base_libdir}/libthread_db*"
 FILES_localedef = "${bindir}/localedef"
 RPROVIDES_glibc-dev += "libc-dev"
 
@@ -145,7 +145,7 @@ do_prep_locale_tree() {
 	for i in $treedir/${datadir}/i18n/charmaps/*gz; do 
 		gunzip $i
 	done
-	ls ${D}/lib/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
+	ls ${D}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
 	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
 		cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
 	fi





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] glibc: correct paths in FILES
  2009-06-04 11:22 [patch] glibc: correct paths in FILES Phil Blundell
@ 2009-06-04 14:41 ` Michael Smith
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Smith @ 2009-06-04 14:41 UTC (permalink / raw)
  To: openembedded-devel

Phil Blundell wrote:
> It turns out that glibc-package contains a bunch of hard-coded
> references to /lib.  This patch replaces them with the appropriate
> ${base_libdir}.  Also, the globs in ${libc_baselibs} were a bit too
> permissive and would accept, for example, "libc.a" which isn't something
> that we want in the main library package.

Build and board tested with glibc 2.6.1. Getting rid of the .a files 
saved 3.9 MB out of my root image on x86.

I guess eglibc would need the same, but I haven't tried it.

Acked-By: Michael Smith <msmith@cbnco.com>

Mike



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-04 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-04 11:22 [patch] glibc: correct paths in FILES Phil Blundell
2009-06-04 14:41 ` Michael Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.