* [PATCH] binutils: allow distro to select gold as default linker
@ 2011-06-27 15:51 Phil Blundell
2011-06-27 16:17 ` Kamble, Nitin A
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Phil Blundell @ 2011-06-27 15:51 UTC (permalink / raw)
To: oe-core
But ensure that gcc-cross-intermediate always uses ld.bfd since
(e)glibc won't build with gold.
Signed-off-by: Phil Blundell <philb@gnu.org>
---
meta/recipes-devtools/binutils/binutils-cross.inc | 3 ++-
.../gcc/gcc-cross-intermediate.inc | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
index 4b90972..5a41970 100644
--- a/meta/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -5,7 +5,8 @@ EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
--program-prefix=${TARGET_PREFIX} \
--disable-install-libbfd \
--disable-werror \
- --enable-poison-system-directories"
+ --enable-poison-system-directories \
+ ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)}"
do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
index 92c3ce2..05b5dbc 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
@@ -7,6 +7,10 @@ CROSS_TARGET_SYS_DIR_append = ".${PN}"
# This is intended to be a -very- basic config
# sysroot is needed in case we use libc-initial
+#
+# Glibc won't compile with gold, and building glibc is the whole point of
+# this recipe. So we select ld.bfd explicitly here if gold is the distro's
+# preferred linker.
EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
--enable-shared \
--disable-multilib \
@@ -17,7 +21,8 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
--with-sysroot=${STAGING_DIR_TCBOOTSTRAP} \
--with-build-sysroot=${STAGING_DIR_TCBOOTSTRAP} \
${EXTRA_OECONF_INTERMEDIATE} \
- ${@get_gcc_fpu_setting(bb, d)}"
+ ${@get_gcc_fpu_setting(bb, d)} \
+ ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)}"
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}"
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}"
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] binutils: allow distro to select gold as default linker
2011-06-27 15:51 [PATCH] binutils: allow distro to select gold as default linker Phil Blundell
@ 2011-06-27 16:17 ` Kamble, Nitin A
2011-06-30 10:08 ` Phil Blundell
2011-06-30 22:28 ` Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Kamble, Nitin A @ 2011-06-27 16:17 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Good to see that gold is enabled only if distro config requests it. I have some need which will need disabling gold.
Thanks,
Nitin
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Phil Blundell
> Sent: Monday, June 27, 2011 8:51 AM
> To: oe-core
> Subject: [OE-core] [PATCH] binutils: allow distro to select gold as
> default linker
>
> But ensure that gcc-cross-intermediate always uses ld.bfd since
> (e)glibc won't build with gold.
>
> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
> meta/recipes-devtools/binutils/binutils-cross.inc | 3 ++-
> .../gcc/gcc-cross-intermediate.inc | 7 ++++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc
> b/meta/recipes-devtools/binutils/binutils-cross.inc
> index 4b90972..5a41970 100644
> --- a/meta/recipes-devtools/binutils/binutils-cross.inc
> +++ b/meta/recipes-devtools/binutils/binutils-cross.inc
> @@ -5,7 +5,8 @@ EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
> --program-prefix=${TARGET_PREFIX} \
> --disable-install-libbfd \
> --disable-werror \
> - --enable-poison-system-directories"
> + --enable-poison-system-directories \
> + ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--
> enable-gold=default', '', d)}"
>
> do_install () {
> oe_runmake 'DESTDIR=${D}' install
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> index 92c3ce2..05b5dbc 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> @@ -7,6 +7,10 @@ CROSS_TARGET_SYS_DIR_append = ".${PN}"
>
> # This is intended to be a -very- basic config
> # sysroot is needed in case we use libc-initial
> +#
> +# Glibc won't compile with gold, and building glibc is the whole point
> of
> +# this recipe. So we select ld.bfd explicitly here if gold is the
> distro's
> +# preferred linker.
> EXTRA_OECONF = "--with-local-
> prefix=${STAGING_DIR_TARGET}${target_prefix} \
> --enable-shared \
> --disable-multilib \
> @@ -17,7 +21,8 @@ EXTRA_OECONF = "--with-local-
> prefix=${STAGING_DIR_TARGET}${target_prefix} \
> --with-sysroot=${STAGING_DIR_TCBOOTSTRAP} \
> --with-build-sysroot=${STAGING_DIR_TCBOOTSTRAP} \
> ${EXTRA_OECONF_INTERMEDIATE} \
> - ${@get_gcc_fpu_setting(bb, d)}"
> + ${@get_gcc_fpu_setting(bb, d)} \
> + ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-
> ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)}"
>
> do_populate_sysroot[sstate-inputdirs] =
> "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}
> ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}"
> do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}
> ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}"
> --
> 1.7.2.5
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] binutils: allow distro to select gold as default linker
2011-06-27 15:51 [PATCH] binutils: allow distro to select gold as default linker Phil Blundell
2011-06-27 16:17 ` Kamble, Nitin A
@ 2011-06-30 10:08 ` Phil Blundell
2011-06-30 22:28 ` Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Phil Blundell @ 2011-06-30 10:08 UTC (permalink / raw)
To: oe-core
Ping?
p.
On Mon, 2011-06-27 at 16:51 +0100, Phil Blundell wrote:
> But ensure that gcc-cross-intermediate always uses ld.bfd since
> (e)glibc won't build with gold.
>
> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
> meta/recipes-devtools/binutils/binutils-cross.inc | 3 ++-
> .../gcc/gcc-cross-intermediate.inc | 7 ++++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
> index 4b90972..5a41970 100644
> --- a/meta/recipes-devtools/binutils/binutils-cross.inc
> +++ b/meta/recipes-devtools/binutils/binutils-cross.inc
> @@ -5,7 +5,8 @@ EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
> --program-prefix=${TARGET_PREFIX} \
> --disable-install-libbfd \
> --disable-werror \
> - --enable-poison-system-directories"
> + --enable-poison-system-directories \
> + ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)}"
>
> do_install () {
> oe_runmake 'DESTDIR=${D}' install
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> index 92c3ce2..05b5dbc 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
> @@ -7,6 +7,10 @@ CROSS_TARGET_SYS_DIR_append = ".${PN}"
>
> # This is intended to be a -very- basic config
> # sysroot is needed in case we use libc-initial
> +#
> +# Glibc won't compile with gold, and building glibc is the whole point of
> +# this recipe. So we select ld.bfd explicitly here if gold is the distro's
> +# preferred linker.
> EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
> --enable-shared \
> --disable-multilib \
> @@ -17,7 +21,8 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
> --with-sysroot=${STAGING_DIR_TCBOOTSTRAP} \
> --with-build-sysroot=${STAGING_DIR_TCBOOTSTRAP} \
> ${EXTRA_OECONF_INTERMEDIATE} \
> - ${@get_gcc_fpu_setting(bb, d)}"
> + ${@get_gcc_fpu_setting(bb, d)} \
> + ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)}"
>
> do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}"
> do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] binutils: allow distro to select gold as default linker
2011-06-27 15:51 [PATCH] binutils: allow distro to select gold as default linker Phil Blundell
2011-06-27 16:17 ` Kamble, Nitin A
2011-06-30 10:08 ` Phil Blundell
@ 2011-06-30 22:28 ` Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-06-30 22:28 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Mon, 2011-06-27 at 16:51 +0100, Phil Blundell wrote:
> But ensure that gcc-cross-intermediate always uses ld.bfd since
> (e)glibc won't build with gold.
>
> Signed-off-by: Phil Blundell <philb@gnu.org>
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-30 22:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-27 15:51 [PATCH] binutils: allow distro to select gold as default linker Phil Blundell
2011-06-27 16:17 ` Kamble, Nitin A
2011-06-30 10:08 ` Phil Blundell
2011-06-30 22:28 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.