Skip to content

Commit

Permalink
Bug 906225 - Add a --enable/disable-gold configure flag. r=gps
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Sep 26, 2013
1 parent 8d04453 commit eb232ac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion build/autoconf/compiler-opts.m4
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,17 @@ if test -z "$GNU_CC"; then
esac
fi
if test "$GNU_CC" -a -n "$DEVELOPER_OPTIONS"; then
if test -n "$DEVELOPER_OPTIONS"; then
MOZ_FORCE_GOLD=1
fi
MOZ_ARG_ENABLE_BOOL(gold,
[ --enable-gold Enable GNU Gold Linker when it is not already the default],
MOZ_FORCE_GOLD=1,
MOZ_FORCE_GOLD=
)
if test "$GNU_CC" -a -n "$MOZ_FORCE_GOLD"; 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
Expand All @@ -208,6 +218,7 @@ if test "$GNU_CC" -a -n "$DEVELOPER_OPTIONS"; then
esac
if test -n "$GOLD"; then
mkdir -p $_objdir/build/unix/gold
rm -f $_objdir/build/unix/gold/ld
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"
Expand Down
13 changes: 12 additions & 1 deletion js/src/build/autoconf/compiler-opts.m4
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,17 @@ if test -z "$GNU_CC"; then
esac
fi
if test "$GNU_CC" -a -n "$DEVELOPER_OPTIONS"; then
if test -n "$DEVELOPER_OPTIONS"; then
MOZ_FORCE_GOLD=1
fi
MOZ_ARG_ENABLE_BOOL(gold,
[ --enable-gold Enable GNU Gold Linker when it is not already the default],
MOZ_FORCE_GOLD=1,
MOZ_FORCE_GOLD=
)
if test "$GNU_CC" -a -n "$MOZ_FORCE_GOLD"; 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
Expand All @@ -208,6 +218,7 @@ if test "$GNU_CC" -a -n "$DEVELOPER_OPTIONS"; then
esac
if test -n "$GOLD"; then
mkdir -p $_objdir/build/unix/gold
rm -f $_objdir/build/unix/gold/ld
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"
Expand Down

0 comments on commit eb232ac

Please sign in to comment.