Skip to content

Commit

Permalink
use existing musl-gcc if available
Browse files Browse the repository at this point in the history
  • Loading branch information
miki725 committed Sep 15, 2023
1 parent 72acfa2 commit 0fc4325
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions files/bin/buildlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ function ensure_musl {
if [[ ${OS} = "macosx" ]] ; then
return
fi
if [[ ! -f ${MUSL_GCC} ]] ; then
# if musl-gcc is already installed, use it
existing_musl=$(which musl-gcc 2> /dev/null)
if [[ -n "${existing_musl}" ]]; then
mkdir -p $(dirname ${MUSL_GCC})
ln -s ${existing_musl} ${MUSL_GCC}
echo $(color GREEN Linking existing musl-gcc: ) ${existing_musl} $(color GREEN "->" ) ${MUSL_GCC}
fi
fi
if [[ ! -f ${MUSL_GCC} ]] ; then
get_src musl git://git.musl-libc.org/musl
colorln CYAN Building musl
Expand Down

0 comments on commit 0fc4325

Please sign in to comment.