bootstrap/config.py: link ld to ld.gold when available
authorJoe Guo <joeg@catalyst.net.nz>
Wed, 20 Mar 2019 22:04:24 +0000 (11:04 +1300)
committerStefan Metzmacher <metze@samba.org>
Thu, 18 Apr 2019 12:09:33 +0000 (12:09 +0000)
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
bootstrap/config.py

index d78ee02ec30769e5bb5d7bb637b2bff571ecce19..e4c42c7b8e78e76a643e3ea17bb7df68d70f5e0b 100644 (file)
@@ -275,6 +275,9 @@ ADD *.sh /tmp/
 # need root permission, do it before USER samba
 RUN /tmp/bootstrap.sh && /tmp/locale.sh
 
+# if ld.gold exists, force link it to ld
+RUN set -x; LD=$(which ld); LD_GOLD=$(which ld.gold); test -x $LD_GOLD && ln -sf $LD_GOLD $LD && test -x $LD && echo "$LD is now $LD_GOLD"
+
 # make test can not work with root, so we have to create a new user
 RUN useradd -m -s /bin/bash samba && \
     mkdir -p /etc/sudoers.d && \