From dd73d6c2168020b24504e186d8ea65647ecb05dd Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 16 May 2016 20:40:45 -0400 Subject: [PATCH] libgcc: Support building using clang --- packages/libgcc/build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/libgcc/build.sh b/packages/libgcc/build.sh index 712ae9751..f7292cc77 100644 --- a/packages/libgcc/build.sh +++ b/packages/libgcc/build.sh @@ -5,5 +5,12 @@ TERMUX_PKG_KEEP_STATIC_LIBRARIES="true" termux_step_extract_into_massagedir () { mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/ - cp $TERMUX_STANDALONE_TOOLCHAIN/lib/gcc/$TERMUX_HOST_PLATFORM/4.9/libgcc.a $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/ + + + if [ "$TERMUX_CLANG" = "" ]; then + LIBGCC_PATH=lib/gcc/$TERMUX_HOST_PLATFORM/4.9/libgcc.a + else + LIBGCC_PATH=lib/gcc/$TERMUX_HOST_PLATFORM/4.9.x/libgcc.a + fi + cp $TERMUX_STANDALONE_TOOLCHAIN/$LIBGCC_PATH $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/ }