commit:     638399ec07dc0f2fa71abfa5ea14779fb579d6b5
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun May 11 10:48:28 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun May 11 10:50:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=638399ec

profiles, riscv 32bit: enable --no-keep-memory by default in LDFLAGS

gcc-15 builds run out of memory while relaxing relocations, maybe this helps...

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 profiles/arch/riscv/rv32imac/ilp32/make.defaults  | 2 ++
 profiles/arch/riscv/rv32imac/ilp32d/make.defaults | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/profiles/arch/riscv/rv32imac/ilp32/make.defaults 
b/profiles/arch/riscv/rv32imac/ilp32/make.defaults
index 4e7eed0bff7b..35a8afe6179b 100644
--- a/profiles/arch/riscv/rv32imac/ilp32/make.defaults
+++ b/profiles/arch/riscv/rv32imac/ilp32/make.defaults
@@ -16,6 +16,8 @@ CXXFLAGS="${CFLAGS}"
 FFLAGS="${CFLAGS}"
 FCFLAGS="${CFLAGS}"
 
+LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs 
-Wl,--no-keep-memory"
+
 ## Mike Gilbert <[email protected]> (2021-12-17)
 ## Prevent automagic use of 64-bit time_t.
 ## https://bugs.gentoo.org/828001

diff --git a/profiles/arch/riscv/rv32imac/ilp32d/make.defaults 
b/profiles/arch/riscv/rv32imac/ilp32d/make.defaults
index 2464269fd8e4..54469cc40903 100644
--- a/profiles/arch/riscv/rv32imac/ilp32d/make.defaults
+++ b/profiles/arch/riscv/rv32imac/ilp32d/make.defaults
@@ -16,6 +16,8 @@ CXXFLAGS="${CFLAGS}"
 FFLAGS="${CFLAGS}"
 FCFLAGS="${CFLAGS}"
 
+LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs 
-Wl,--no-keep-memory"
+
 ## Mike Gilbert <[email protected]> (2021-12-17)
 ## Prevent automagic use of 64-bit time_t.
 ## https://bugs.gentoo.org/828001

Reply via email to