about summary refs log tree commit diff
path: root/src/ci/docker/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/ci/docker/scripts')
-rw-r--r--src/ci/docker/scripts/musl-toolchain.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ci/docker/scripts/musl-toolchain.sh b/src/ci/docker/scripts/musl-toolchain.sh
index e132615738b..d5988a25671 100644
--- a/src/ci/docker/scripts/musl-toolchain.sh
+++ b/src/ci/docker/scripts/musl-toolchain.sh
@@ -46,12 +46,14 @@ ln -s $OUTPUT/$TARGET/lib/libc.so /lib/ld-musl-$ARCH.so.1
 echo $OUTPUT/$TARGET/lib >> /etc/ld-musl-$ARCH.path
 
 # Now when musl bootstraps itself create proper toolchain symlinks to make build and tests easier
-for exec in cc gcc; do
-    ln -s $TARGET-gcc /usr/local/bin/$exec
-done
-for exec in cpp c++ g++; do
-    ln -s $TARGET-g++ /usr/local/bin/$exec
-done
+if [ "$REPLACE_CC" = "1" ]; then
+    for exec in cc gcc; do
+        ln -s $TARGET-gcc /usr/local/bin/$exec
+    done
+    for exec in cpp c++ g++; do
+        ln -s $TARGET-g++ /usr/local/bin/$exec
+    done
+fi
 
 export CC=$TARGET-gcc
 export CXX=$TARGET-g++