From 62394fcca76f4c6b433884a3d48a84ae7b775600 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 9 Jul 2017 10:16:54 +0200 Subject: [PATCH] sys-libs/compiler-rt: Simplify -- use common nolib flag var --- sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild | 10 +++++----- sys-libs/compiler-rt/compiler-rt-9999.ebuild | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild b/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild index 00141f900ff2..98d9f66212bc 100644 --- a/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild @@ -48,17 +48,17 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build + local nolib_flags=( -nodefaultlibs -lc ) if use clang; then local -x CC=${CHOST}-clang local -x CXX=${CHOST}-clang++ # ensure we can use clang before installing compiler-rt - local -x LDFLAGS="${LDFLAGS} -nodefaultlibs -lc" + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" strip-unsupported-flags elif ! test_compiler; then - local extra_flags=( -nodefaultlibs -lc ) - if test_compiler "${extra_flags[@]}"; then - local -x LDFLAGS="${LDFLAGS} ${extra_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${extra_flags[*]}" + if test_compiler "${nolib_flags[@]}"; then + 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-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild index 4758eab553af..ffd1e9eddb3f 100644 --- a/sys-libs/compiler-rt/compiler-rt-9999.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild @@ -49,17 +49,17 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build + local nolib_flags=( -nodefaultlibs -lc ) if use clang; then local -x CC=${CHOST}-clang local -x CXX=${CHOST}-clang++ # ensure we can use clang before installing compiler-rt - local -x LDFLAGS="${LDFLAGS} -nodefaultlibs -lc" + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" strip-unsupported-flags elif ! test_compiler; then - local extra_flags=( -nodefaultlibs -lc ) - if test_compiler "${extra_flags[@]}"; then - local -x LDFLAGS="${LDFLAGS} ${extra_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${extra_flags[*]}" + if test_compiler "${nolib_flags[@]}"; then + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" + ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" fi fi -- 2.26.2