Conditionally provide cc in musl-toolchain.sh
This commit is contained in:
parent
f74debbe7d
commit
0caa251da2
@ -23,7 +23,7 @@ COPY scripts/musl-toolchain.sh /build/
|
||||
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
|
||||
RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
|
||||
CXXFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
|
||||
bash musl-toolchain.sh x86_64 && rm -rf build
|
||||
REPLACE_CC=1 bash musl-toolchain.sh x86_64 && rm -rf build
|
||||
|
||||
COPY scripts/sccache.sh /scripts/
|
||||
RUN sh /scripts/sccache.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++
|
||||
|
Loading…
Reference in New Issue
Block a user