mozcoreconf-v6.eclass: don't set ldflags lld doesn't support
authorThomas Deutschmann <whissi@gentoo.org>
Sun, 30 Sep 2018 19:56:59 +0000 (21:56 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Sun, 30 Sep 2018 20:05:44 +0000 (22:05 +0200)
Closes: https://bugs.gentoo.org/667224
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
eclass/mozcoreconf-v6.eclass

index 571f195b8e46a104fcc37709c85fc68f40e3c383..862d632cd99d7b7a3bd20307b6e086566c395fb6 100644 (file)
@@ -204,7 +204,14 @@ mozconfig_init() {
        case "${ARCH}" in
        arm)
                # Reduce the memory requirements for linking
-               append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+               if use clang ; then
+                       # Nothing to do
+                       :;
+               elif tc-ld-is-gold ; then
+                       append-ldflags -Wl,--no-keep-memory
+               else
+                       append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+               fi
                ;;
        alpha)
                # Historically we have needed to add -fPIC manually for 64-bit.
@@ -219,7 +226,14 @@ mozconfig_init() {
        ppc64)
                append-flags -fPIC -mminimal-toc
                # Reduce the memory requirements for linking
-               append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+               if use clang ; then
+                       # Nothing to do
+                       :;
+               elif tc-ld-is-gold ; then
+                       append-ldflags -Wl,--no-keep-memory
+               else
+                       append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
+               fi
                ;;
        esac