commit:     7b05d4a0ac1d854afa97048fa1fe166d0e123d61
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 24 04:58:55 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 24 04:58:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b05d4a0

sys-libs/compiler-rt: forward port nostartfiles fix

Bug: https://bugs.gentoo.org/862540
Bug: https://bugs.gentoo.org/862798
See: 8bb13b19b42601b8b57c5b1c2d64d1b0a04fede5
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild   | 1 +
 sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild | 6 ++++--
 sys-libs/compiler-rt/compiler-rt-15.0.0_rc2.ebuild  | 6 ++++--
 sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild | 6 ++++--
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild 
b/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild
index c006ccddc481..7493e7480ff1 100644
--- a/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-14.0.6-r1.ebuild
@@ -91,6 +91,7 @@ src_configure() {
                        # Avoiding -nostartfiles earlier on for bug #862540,
                        # and set available entry symbol for bug #862798.
                        nolib_flags+=( -nostartfiles -emain )
+
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                fi

diff --git a/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild 
b/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild
index 5063f18091f9..a7b7ace68705 100644
--- a/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild
@@ -88,8 +88,10 @@ src_configure() {
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
-                       # Avoiding -nostartfiles earlier on for bug #862540
-                       nolib_flags+=( -nostartfiles )
+                       # Avoiding -nostartfiles earlier on for bug #862540,
+                       # and set available entry symbol for bug #862798.
+                       nolib_flags+=( -nostartfiles -emain )
+
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                fi

diff --git a/sys-libs/compiler-rt/compiler-rt-15.0.0_rc2.ebuild 
b/sys-libs/compiler-rt/compiler-rt-15.0.0_rc2.ebuild
index d41092a0cf32..c01ed38975d1 100644
--- a/sys-libs/compiler-rt/compiler-rt-15.0.0_rc2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-15.0.0_rc2.ebuild
@@ -88,8 +88,10 @@ src_configure() {
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
-                       # Avoiding -nostartfiles earlier on for bug #862540
-                       nolib_flags+=( -nostartfiles )
+                       # Avoiding -nostartfiles earlier on for bug #862540,
+                       # and set available entry symbol for bug #862798.
+                       nolib_flags+=( -nostartfiles -emain )
+
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                fi

diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild 
b/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild
index 5063f18091f9..a7b7ace68705 100644
--- a/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild
@@ -88,8 +88,10 @@ src_configure() {
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
-                       # Avoiding -nostartfiles earlier on for bug #862540
-                       nolib_flags+=( -nostartfiles )
+                       # Avoiding -nostartfiles earlier on for bug #862540,
+                       # and set available entry symbol for bug #862798.
+                       nolib_flags+=( -nostartfiles -emain )
+
                        local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
                        ewarn "${CC} seems to lack runtime, trying with 
${nolib_flags[*]}"
                fi

Reply via email to