commit:     e80c1f78bdf2b94ae0fd6b639fd9f3b72ab77905
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu May 12 01:05:41 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu May 12 01:05:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e80c1f78

toolchain.eclass: prune more unused libtool archives #573302

 eclass/toolchain.eclass | 40 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 08813a9..9dd1604 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1745,13 +1745,49 @@ toolchain_src_install() {
        if ! is_crosscompile ; then
                insinto "${DATAPATH}"
                newins "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la 
fixlafiles.awk || die
-               find "${D}/${LIBPATH}" -name libstdc++.la -type f -delete
-               find "${D}/${LIBPATH}" -name 'lib*san.la' -type f -delete 
#487550 #546700
                exeinto "${DATAPATH}"
                doexe "${GCC_FILESDIR}"/fix_libtool_files.sh || die
                doexe "${GCC_FILESDIR}"/c{89,99} || die
        fi
 
+       # libstdc++.la: Delete as it doesn't add anything useful: g++ itself
+       # handles linkage correctly in the dynamic & static case.  It also just
+       # causes us pain: any C++ progs/libs linking with libtool will gain a
+       # reference to the full libstdc++.la file which is gcc version specific.
+       # libstdc++fs.la: It doesn't link against anything useful.
+       # libsupc++.la: This has no dependencies.
+       # libcc1.la: There is no static library, only dynamic.
+       # libcc1plugin.la: Same as above, and it's loaded via dlopen.
+       # libgomp.la: gcc itself handles linkage (libgomp.spec).
+       # libgomp-plugin-*.la: Same as above, and it's an internal plugin only
+       # loaded via dlopen.
+       # libgfortran.la: gfortran itself handles linkage correctly in the
+       # dynamic & static case (libgfortran.spec). #573302
+       # libgfortranbegin.la: Same as above, and it's an internal lib.
+       # libmpx.la: gcc itself handles linkage correctly (libmpx.spec).
+       # libmpxwrappers.la: See above.
+       # libitm.la: gcc itself handles linkage correctly (libitm.spec).
+       # libvtv.la: gcc itself handles linkage correctly.
+       # lib*san.la: Sanitizer linkage is handled internally by gcc, and they
+       # do not support static linking. #487550 #546700
+       find "${D}/${LIBPATH}" \
+               '(' \
+                       -name libstdc++.la -o \
+                       -name libstdc++fs.la -o \
+                       -name libsupc++.la -o \
+                       -name libcc1.la -o \
+                       -name libcc1plugin.la -o \
+                       -name 'libgomp.la' -o \
+                       -name 'libgomp-plugin-*.la' -o \
+                       -name libgfortran.la -o \
+                       -name libgfortranbegin.la -o \
+                       -name libmpx.la -o \
+                       -name libmpxwrappers.la -o \
+                       -name libitm.la -o \
+                       -name libvtv.la -o \
+                       -name 'lib*san.la' \
+               ')' -type f -delete
+
        # Use gid of 0 because some stupid ports don't have
        # the group 'root' set to gid 0.  Send to /dev/null
        # for people who are testing as non-root.

Reply via email to