Skip to contentSkip to conversation

binutils: Allow gold to build even when not the default

PATCH In review Richard Purdie 2 participants 4 messages Apr 7, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binutils: Allow gold to build even when not the default

It can be useful to have gold available for testing even when its not the default, therefore build gold by default in all configurations.

meta/recipes-devtools/binutils/binutils.inc +1 -1
index afb582a..3c65efc 100644
@@ -73,7 +73,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
 
 LDGOLD_class-native = ""
 LDGOLD_class-crosssdk = ""
-LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '', d)}"
+LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default', d)}"
 
 # This is necessary due to a bug in the binutils Makefiles
 # EXTRA_OEMAKE = "configure-build-libiberty all"
#1 lore raw
Quoted 17 lines · Richard Purdie

It can be useful to have gold available for testing even when its not the default, therefore build gold by default in all configurations.

meta/recipes-devtools/binutils/binutils.inc +0 -0
index afb582a..3c65efc 100644
@@ -73,7 +73,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
 

LDGOLD_class-native = ""
LDGOLD_class-crosssdk = ""

meta/recipes-devtools/binutils/binutils.inc

Quoted 2 lines
meta/recipes-devtools/binutils/binutils.inc +1 -1
-LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '', d)}"
+LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default', d)}”

may be enable-gold could be done unconditionally ? and then —enable-gold|ld=default controlled with ld-is-gold ? ld-is-gold anyway meant that default linker is gold, it did not mean to just build gold, so we are not changing semantics

Quoted 4 lines

# This is necessary due to a bug in the binutils Makefiles # EXTRA_OEMAKE = "configure-build-libiberty all"

#2 lore raw
Quoted 13 lines · Khem Raj
Quoted 13 lines · Richard Purdie

It can be useful to have gold available for testing even when its not the default, therefore build gold by default in all configurations.

meta/recipes-devtools/binutils/binutils.inc +0 -0
index afb582a..3c65efc 100644
@@ -73,7 +73,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
 
Quoted 9 lines

meta/recipes-devtools/binutils/binutils.inc

Quoted 5 lines

LDGOLD_class-native = ""
LDGOLD_class-crosssdk = ""

meta/recipes-devtools/binutils/binutils.inc +1 -1
-LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '', d)}"
+LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default', d)}”

may be enable-gold could be done unconditionally ? and then —enable-gold|ld=default controlled with ld-is-gold ? ld-is-gold anyway meant that default linker is gold, it did not mean
to just build gold, so we are not changing semantics

The above effectively does mean we're always building gold, it just controls whether ld is gold or not as before?

Cheers,

Richard

#3 lore raw
Quoted 27 lines · Richard Purdie
Quoted 13 lines · Khem Raj
Quoted 13 lines · Richard Purdie

It can be useful to have gold available for testing even when its not the default, therefore build gold by default in all configurations.

meta/recipes-devtools/binutils/binutils.inc +0 -0
index afb582a..3c65efc 100644
@@ -73,7 +73,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
 
Quoted 9 lines

meta/recipes-devtools/binutils/binutils.inc

Quoted 5 lines

LDGOLD_class-native = ""
LDGOLD_class-crosssdk = ""

meta/recipes-devtools/binutils/binutils.inc +1 -1
-LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '', d)}"
+LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default', d)}”

may be enable-gold could be done unconditionally ? and then —enable-gold|ld=default controlled with ld-is-gold ? ld-is-gold anyway meant that default linker is gold, it did not mean
to just build gold, so we are not changing semantics

Quoted 3 lines

The above effectively does mean we're always building gold, it just controls whether ld is gold or not as before?

yes but only for cross toolchain. I was suggesting was to incorporate —enable-gold generally for all binutils variants while keeping ld.bfd as default.

Quoted 3 lines

Cheers,

Richard