mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH 1/2] configure: Use -print-libgcc-file-name to detect compiler runtime
@ 2017-03-16  5:22 Khem Raj
  2017-03-16  5:22 ` [PATCH 2/2] configure: Remove -lgcc_eh from LIBCC Khem Raj
  2017-03-25 18:11 ` [PATCH 1/2] configure: Use -print-libgcc-file-name to detect compiler runtime Dmitry Golovin
  0 siblings, 2 replies; 3+ messages in thread
From: Khem Raj @ 2017-03-16  5:22 UTC (permalink / raw)
  To: musl; +Cc: Khem Raj

This uses compiler to provide the path to its default runtime
library libgcc/compiler-rt, when using clang we can set

CC="clang --rtlib={compiler-rt|libgcc}" and it will find
the right compiler runtime when autodetecting it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index c2db298c..0c670dd8 100755
--- a/configure
+++ b/configure
@@ -587,6 +587,8 @@ tryldflag LDFLAGS_AUTO -Wl,--exclude-libs=ALL
 tryldflag LDFLAGS_AUTO -Wl,-Bsymbolic-functions
 
 # Find compiler runtime library
+test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \
+                 && tryldflag LIBCC "$try_libcc"
 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
 test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
-- 
2.12.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-25 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16  5:22 [PATCH 1/2] configure: Use -print-libgcc-file-name to detect compiler runtime Khem Raj
2017-03-16  5:22 ` [PATCH 2/2] configure: Remove -lgcc_eh from LIBCC Khem Raj
2017-03-25 18:11 ` [PATCH 1/2] configure: Use -print-libgcc-file-name to detect compiler runtime Dmitry Golovin

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).