Skip to content

Commit 15d9b33

Browse files
strfrymati865
authored andcommitted
Make the musl dynamic loader known to the system, so it can execute target binaries
1 parent 1624dc0 commit 15d9b33

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/ci/docker/scripts/musl-toolchain.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ exit 1
2828
}
2929

3030
TARGET=$1
31+
#ARCH=$1
32+
#TARGET=linux-musl-$ARCH
33+
ARCH=x86_64
34+
3135
OUTPUT=/usr/local
3236
shift
3337

@@ -39,6 +43,13 @@ hide_output make install TARGET=$TARGET OUTPUT=$OUTPUT
3943

4044
cd ..
4145

46+
# Make musl binaries executable
47+
48+
ln -s $OUTPUT/$TARGET/lib/ld-musl-$ARCH.so.1 /lib
49+
ln -s $OUTPUT/$TARGET/lib/libc.so /lib
50+
echo $OUTPUT/$TARGET/lib >> /etc/ld-musl-$ARCH.path
51+
52+
4253
export CC=$TARGET-gcc
4354
export CXX=$TARGET-g++
4455

0 commit comments

Comments
 (0)