Skip to content

Commit

Permalink
try adding gcc suffix support 7
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Oct 10, 2023
1 parent 3f994a0 commit d1bf9ef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1045,10 +1045,11 @@ build_single_target() {
fi
fi

_BINCORE_PREFIX="${_BINUTILS_PREFIX}"
_BINCORE_SUFFIX="${_BINUTILS_SUFFIX}"

if [ "${_CC}" = 'gcc' ] && [ -n "${_BINUTILS_SUFFIX}" ]; then
_BINUTILS_PREFIX="${_BINUTILS_PREFIX}gcc-"
_BINCORE_PREFIX="${_BINCORE_PREFIX}gcc-"
_BINUTILS_SUFFIX=''
fi

Expand Down Expand Up @@ -1112,9 +1113,9 @@ build_single_target() {
# or clang-cl). Workaround: create an alias for it:
ln -s -f "/usr/bin/clang${_CCSUFFIX}" "$(pwd)/clang"
fi
export AR="${_BINUTILS_PREFIX}ar${_BINCORE_SUFFIX}"
export NM="${_BINUTILS_PREFIX}nm${_BINCORE_SUFFIX}"
export RANLIB="${_BINUTILS_PREFIX}ranlib${_BINCORE_SUFFIX}"
export AR="${_BINCORE_PREFIX}ar${_BINCORE_SUFFIX}"
export NM="${_BINCORE_PREFIX}nm${_BINCORE_SUFFIX}"
export RANLIB="${_BINCORE_PREFIX}ranlib${_BINCORE_SUFFIX}"

# ar wrapper to normalize created libs
if [ "${CW_DEV_CROSSMAKE_REPRO:-}" = '1' ]; then
Expand Down

0 comments on commit d1bf9ef

Please sign in to comment.