|
Message-Id: <20170316052207.32412-1-raj.khem@gmail.com> Date: Wed, 15 Mar 2017 22:22:06 -0700 From: Khem Raj <raj.khem@...il.com> To: musl@...ts.openwall.com Cc: Khem Raj <raj.khem@...il.com> Subject: [PATCH 1/2] configure: Use -print-libgcc-file-name to detect compiler runtime 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@...il.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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.