+ local wrapped plusplus CLANG_TARGET=$TERMUX_HOST_PLATFORM
+ if [ $TERMUX_ARCH = arm ]; then CLANG_TARGET=${CLANG_TARGET/arm-/armv7a-}; fi
+ for wrapped in ${TERMUX_HOST_PLATFORM}-clang clang; do
+ for plusplus in "" "++"; do
+ local FILE_TO_REPLACE=$_TERMUX_TOOLCHAIN_TMPDIR/bin/${wrapped}${plusplus}
+ if [ ! -f $FILE_TO_REPLACE ]; then
+ termux_error_exit "No toolchain file to override: $FILE_TO_REPLACE"
+ fi
+ cp $TERMUX_SCRIPTDIR/scripts/clang-pie-wrapper $FILE_TO_REPLACE
+ sed -i "s/COMPILER/clang38$plusplus/" $FILE_TO_REPLACE
+ sed -i "s/CLANG_TARGET/$CLANG_TARGET/" $FILE_TO_REPLACE
+ done
+ done
+