mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 904979 - Force use gold, if possible, when the default linker is BFD ld, for local builds. r=ted
This commit is contained in:
parent
4c2f5c8547
commit
d7e0172e8c
@ -115,6 +115,30 @@ if test -z "$GNU_CC"; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$GNU_CC" -a -n "$DEVELOPER_OPTIONS"; then
|
||||||
|
dnl if the default linker is BFD ld, check if gold is available and try to use it
|
||||||
|
dnl for local builds only.
|
||||||
|
if $CC -Wl,--version 2>&1 | grep -q "GNU ld"; then
|
||||||
|
GOLD=$($CC -print-prog-name=ld.gold)
|
||||||
|
case "$GOLD" in
|
||||||
|
/*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
GOLD=$(which $GOLD)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test -n "$GOLD"; then
|
||||||
|
mkdir -p $_objdir/build/unix/gold
|
||||||
|
ln -s "$GOLD" $_objdir/build/unix/gold/ld
|
||||||
|
if $CC -B $_objdir/build/unix/gold -Wl,--version 2>&1 | grep -q "GNU gold"; then
|
||||||
|
LDFLAGS="$LDFLAGS -B $_objdir/build/unix/gold"
|
||||||
|
else
|
||||||
|
rm -rf $_objdir/build/unix/gold
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$GNU_CC"; then
|
if test "$GNU_CC"; then
|
||||||
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
|
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
|
||||||
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-exceptions"
|
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-exceptions"
|
||||||
|
@ -115,6 +115,30 @@ if test -z "$GNU_CC"; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$GNU_CC" -a -n "$DEVELOPER_OPTIONS"; then
|
||||||
|
dnl if the default linker is BFD ld, check if gold is available and try to use it
|
||||||
|
dnl for local builds only.
|
||||||
|
if $CC -Wl,--version 2>&1 | grep -q "GNU ld"; then
|
||||||
|
GOLD=$($CC -print-prog-name=ld.gold)
|
||||||
|
case "$GOLD" in
|
||||||
|
/*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
GOLD=$(which $GOLD)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test -n "$GOLD"; then
|
||||||
|
mkdir -p $_objdir/build/unix/gold
|
||||||
|
ln -s "$GOLD" $_objdir/build/unix/gold/ld
|
||||||
|
if $CC -B $_objdir/build/unix/gold -Wl,--version 2>&1 | grep -q "GNU gold"; then
|
||||||
|
LDFLAGS="$LDFLAGS -B $_objdir/build/unix/gold"
|
||||||
|
else
|
||||||
|
rm -rf $_objdir/build/unix/gold
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$GNU_CC"; then
|
if test "$GNU_CC"; then
|
||||||
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
|
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
|
||||||
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-exceptions"
|
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-exceptions"
|
||||||
|
Loading…
Reference in New Issue
Block a user