commit:     c854f9dddefb1a826a82b7e23fcba7162ce9d409
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 29 15:02:36 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun 29 15:04:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c854f9dd

sys-devel/llvm: Pass -Wl,--no-keep-memory to linker on x86

Closes: https://bugs.gentoo.org/730050
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-devel/llvm/llvm-10.0.0.ebuild      | 4 ++++
 sys-devel/llvm/llvm-10.0.1.9999.ebuild | 4 ++++
 sys-devel/llvm/llvm-10.0.1_rc1.ebuild  | 4 ++++
 sys-devel/llvm/llvm-11.0.0.9999.ebuild | 4 ++++
 4 files changed, 16 insertions(+)

diff --git a/sys-devel/llvm/llvm-10.0.0.ebuild 
b/sys-devel/llvm/llvm-10.0.0.ebuild
index c36aefaa55f..ebb7e7f3f61 100644
--- a/sys-devel/llvm/llvm-10.0.0.ebuild
+++ b/sys-devel/llvm/llvm-10.0.0.ebuild
@@ -344,6 +344,10 @@ multilib_src_configure() {
                local CXXFLAGS="${CXXFLAGS} -mno-bmi"
        fi
 
+       # LLVM can have very high memory consumption while linking,
+       # exhausting the limit on 32-bit linker executable
+       use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
        # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
        use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
        cmake-utils_src_configure

diff --git a/sys-devel/llvm/llvm-10.0.1.9999.ebuild 
b/sys-devel/llvm/llvm-10.0.1.9999.ebuild
index 6bf2a545f96..0cbd220d563 100644
--- a/sys-devel/llvm/llvm-10.0.1.9999.ebuild
+++ b/sys-devel/llvm/llvm-10.0.1.9999.ebuild
@@ -432,6 +432,10 @@ multilib_src_configure() {
                local CXXFLAGS="${CXXFLAGS} -mno-bmi"
        fi
 
+       # LLVM can have very high memory consumption while linking,
+       # exhausting the limit on 32-bit linker executable
+       use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
        # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
        use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
        cmake_src_configure

diff --git a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild 
b/sys-devel/llvm/llvm-10.0.1_rc1.ebuild
index 5ac7c6e2a8c..bc805c1b4d3 100644
--- a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild
+++ b/sys-devel/llvm/llvm-10.0.1_rc1.ebuild
@@ -397,6 +397,10 @@ multilib_src_configure() {
                local CXXFLAGS="${CXXFLAGS} -mno-bmi"
        fi
 
+       # LLVM can have very high memory consumption while linking,
+       # exhausting the limit on 32-bit linker executable
+       use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
        # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
        use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
        cmake_src_configure

diff --git a/sys-devel/llvm/llvm-11.0.0.9999.ebuild 
b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
index 877b10f6388..087e2736708 100644
--- a/sys-devel/llvm/llvm-11.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
@@ -428,6 +428,10 @@ multilib_src_configure() {
                local CXXFLAGS="${CXXFLAGS} -mno-bmi"
        fi
 
+       # LLVM can have very high memory consumption while linking,
+       # exhausting the limit on 32-bit linker executable
+       use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
        # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
        use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
        cmake_src_configure

Reply via email to