From da1b2fc8251c571f43813ecf04522aba75333df2 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 7 Aug 2022 19:52:47 +0200 Subject: sys-libs/compiler-rt: Sync 15+ to 14.0.6-r1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild | 15 +++++++++++---- sys-libs/compiler-rt/compiler-rt-16.0.0.9999.ebuild | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'sys-libs') 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 8af221eaa8ad..9330ad9834cf 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 @@ -70,7 +70,6 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build - local nolib_flags=( -nodefaultlibs -nostartfiles -lc ) if use clang; then # Only do this conditionally to allow overriding with # e.g. CC=clang-13 in case of breakage @@ -78,13 +77,21 @@ src_configure() { local -x CC=${CHOST}-clang local -x CXX=${CHOST}-clang++ fi + strip-unsupported-flags - # ensure we can use clang before installing compiler-rt - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - elif ! test_compiler; then + fi + + if ! test_compiler; then + local nolib_flags=( -nodefaultlibs -lc ) + if test_compiler "${nolib_flags[@]}"; then 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 ) + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" + ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" fi 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 8af221eaa8ad..9330ad9834cf 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 @@ -70,7 +70,6 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build - local nolib_flags=( -nodefaultlibs -nostartfiles -lc ) if use clang; then # Only do this conditionally to allow overriding with # e.g. CC=clang-13 in case of breakage @@ -78,13 +77,21 @@ src_configure() { local -x CC=${CHOST}-clang local -x CXX=${CHOST}-clang++ fi + strip-unsupported-flags - # ensure we can use clang before installing compiler-rt - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - elif ! test_compiler; then + fi + + if ! test_compiler; then + local nolib_flags=( -nodefaultlibs -lc ) + if test_compiler "${nolib_flags[@]}"; then 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 ) + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" + ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" fi fi -- cgit v1.2.3-65-gdbad