commit:     2dd49b494e19472aac612afea0d1540274684419
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 30 19:56:59 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Sep 30 20:05:44 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dd49b49

mozcoreconf-v6.eclass: don't set ldflags lld doesn't support

Closes: https://bugs.gentoo.org/667224
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 eclass/mozcoreconf-v6.eclass | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass
index 571f195b8e4..862d632cd99 100644
--- a/eclass/mozcoreconf-v6.eclass
+++ b/eclass/mozcoreconf-v6.eclass
@@ -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
 

Reply via email to