Skip to content

Commit e67f403

Browse files
authored
Linux: avoid using gold as the linker (#282)
1 parent be1369a commit e67f403

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

platforms/linux-arm64v8/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN \
4040
ln -s /usr/bin/gcc10-as /usr/bin/as && \
4141
ln -s /usr/bin/gcc10-ar /usr/bin/ar && \
4242
ln -s /usr/bin/gcc10-nm /usr/bin/nm && \
43-
ln -s /usr/bin/gcc10-ld /usr/bin/ld && \
43+
ln -s /usr/bin/gcc10-ld.bfd /usr/bin/ld && \
4444
ln -s /usr/bin/gcc10-strip /usr/bin/strip && \
4545
ln -s /usr/bin/gcc10-ranlib /usr/bin/ranlib && \
4646
ln -s /usr/bin/gcc10-readelf /usr/bin/readelf && \
@@ -58,8 +58,8 @@ RUN \
5858
ENV \
5959
PKG_CONFIG="pkg-config --static" \
6060
PLATFORM="linux-arm64v8" \
61-
FLAGS="-march=armv8-a" \
62-
RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none" \
61+
FLAGS="-march=armv8-a -fuse-ld=bfd" \
62+
RUSTFLAGS="-Clink-arg=-fuse-ld=bfd -Zlocation-detail=none -Zfmt-debug=none" \
6363
MESON="--cross-file=/root/meson.ini"
6464

6565
COPY Toolchain.cmake /root/

platforms/linux-x64/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN \
4040
ln -s /usr/bin/gcc10-g++ /usr/bin/c++ && \
4141
ln -s /usr/bin/gcc10-ar /usr/bin/ar && \
4242
ln -s /usr/bin/gcc10-nm /usr/bin/nm && \
43-
ln -s /usr/bin/gcc10-ld /usr/bin/ld && \
43+
ln -s /usr/bin/gcc10-ld.bfd /usr/bin/ld && \
4444
ln -s /usr/bin/gcc10-strip /usr/bin/strip && \
4545
ln -s /usr/bin/gcc10-ranlib /usr/bin/ranlib && \
4646
ln -s /usr/bin/gcc10-readelf /usr/bin/readelf && \
@@ -56,7 +56,8 @@ RUN \
5656
ENV \
5757
PKG_CONFIG="pkg-config --static" \
5858
PLATFORM="linux-x64" \
59-
FLAGS="-march=nehalem" \
59+
FLAGS="-march=nehalem -fuse-ld=bfd" \
60+
RUSTFLAGS="-Clink-arg=-fuse-ld=bfd" \
6061
MESON="--cross-file=/root/meson.ini"
6162

6263
COPY Toolchain.cmake /root/

0 commit comments

Comments
 (0)