diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-12-28 00:11:33 +0100 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-12-28 00:11:33 +0100 |
commit | a0d9851dd0db2ad3ffc3c46ababb621c1ead6e6f (patch) | |
tree | 84c7057efd8404d2c31e49e7239e6070757ffd99 /scripts/build/binutils/binutils.sh | |
parent | aac53cf32c9dfbc460297ff8c9459d28cfdff5d7 (diff) | |
download | crosstool-ng-a0d9851dd0db2ad3ffc3c46ababb621c1ead6e6f.tar.gz crosstool-ng-a0d9851dd0db2ad3ffc3c46ababb621c1ead6e6f.tar.bz2 crosstool-ng-a0d9851dd0db2ad3ffc3c46ababb621c1ead6e6f.zip |
binutils/binutils: add option to enable gold
gold is a new, optimised, multi-threaded linker with support
for plugins.
Add support for gold starting with binutils 2.21. Although 2.20
also had gold, the configure flags have changed, and supporting
2.20 would be a mess in the code.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/build/binutils/binutils.sh')
-rw-r--r-- | scripts/build/binutils/binutils.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 9f55c4d0..39fa61cd 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -26,6 +26,26 @@ do_binutils() { CT_DoStep INFO "Installing binutils" CT_DoLog EXTRA "Configuring binutils" + + if [ "${CT_BINUTILS_HAS_GOLD}" = "y" ]; then + case "${CT_BINUTILS_LINKERS_LIST}" in + ld) + extra_config+=( --enable-ld=yes --enable-gold=no ) + ;; + gold) + extra_config+=( --enable-ld=no --enable-gold=yes ) + ;; + ld,gold) + extra_config+=( --enable-ld=default --enable-gold=yes ) + ;; + gold,ld) + extra_config+=( --enable-ld=yes --enable-gold=default ) + ;; + esac + fi + + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ CT_DoExecLog CFG \ "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \ |