1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

bootstrap: If the mold linker is available prefer it over gold

The gold linker will be deprecated soon. However we got a new linker called
mold:

https://github.com/rui314/mold/

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
Andreas Schneider
2022-02-13 12:01:47 +01:00
committed by Andreas Schneider
parent 2b9917d7a3
commit d409c23832
13 changed files with 24 additions and 2 deletions

View File

@@ -354,6 +354,8 @@ 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"
# if ld.mold exists, force link it to ld (prefer mold over gold! ;-)
RUN set -x; LD=$(which ld); LD_MOLD=$(which ld.mold); test -x $LD_MOLD && ln -sf $LD_MOLD $LD && test -x $LD && echo "$LD is now $LD_MOLD"
# make test can not work with root, so we have to create a new user
RUN useradd -m -U -s /bin/bash samba && \