diff options
author | 2011-02-13 12:10:12 +0000 | |
---|---|---|
committer | 2011-02-13 12:10:12 +0000 | |
commit | 5cf276db564a41425716dee29e1c622f837fc269 (patch) | |
tree | 3ea8bf51cbccd50ad8135bdcbaa7da4a295a5ea8 | |
parent | Version Bump (diff) | |
download | gentoo-2-5cf276db564a41425716dee29e1c622f837fc269.tar.gz gentoo-2-5cf276db564a41425716dee29e1c622f837fc269.tar.bz2 gentoo-2-5cf276db564a41425716dee29e1c622f837fc269.zip |
Rewrite gdb module installation and make it actually work. (bug #348128).
-rw-r--r-- | eclass/toolchain.eclass | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 09f8d4a5e139..ffe836912b93 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.449 2011/01/18 07:00:50 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.450 2011/02/13 12:10:12 dirtyepic Exp $ # # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> @@ -1927,12 +1927,15 @@ gcc-compiler_src_install() { chown -R root:0 "${D}"${LIBPATH} # Move pretty-printers to gdb datadir to shut ldconfig up - gdbdir=/usr/share/gdb/auto-load - for module in $(find "${D}" -iname "*-gdb.py" -print); do - insinto ${gdbdir}/$(dirname "${module/${D}/}" | \ - sed -e "s:/lib/:/$(get_libdir)/:g") - doins "${module}" - rm "${module}" + gdbdir=/usr/share/gdb/auto-load${LIBPATH/\/lib\//\/$(get_libdir)\/} + for i in "${D}"${LIBPATH}{,/32}/*-gdb.py; do + if [[ -e ${i} ]]; then + basedir="$(dirname ${i/${D}${LIBPATH}/})" + sed -i -e "s:^\(libdir = \).*:\1'${LIBPATH}${basedir}':" "${i}" #348128 + insinto "${gdbdir}${basedir}" + doins "${i}" + rm "${i}" + fi done # Don't scan .gox files for executable stacks - false positives |