From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH RFC] binutils: allow distro to select gold as default cross-linker
Date: Wed, 15 Jun 2011 09:26:58 -0700 [thread overview]
Message-ID: <4DF8DD52.70502@gmail.com> (raw)
In-Reply-To: <1308148335.25285.1774.camel@phil-desktop>
On 06/15/2011 07:32 AM, Phil Blundell wrote:
> On Wed, 2011-06-15 at 09:04 +0100, Phil Blundell wrote:
>> One slightly annoying thing is that (e)glibc isn't buildable with gold
>> because the linker scripts don't work. So a little bit of patching is
>> going to be needed to have it use ld.bfd there. There might be some
>> other packages with similar issues but I haven't come across any yet.
>
> I think something like this is probably what's required for that.
>
> From 48eaba1da89086b8edccaa03c27075d78635ab01 Mon Sep 17 00:00:00 2001
> From: Phil Blundell<philb@gnu.org>
> Date: Wed, 15 Jun 2011 15:22:47 +0100
> Subject: [PATCH] gcc-cross-intermediate: use ld.bfd if distro prefers gold
>
>
> Signed-off-by: Phil Blundell<philb@gnu.org>
> ---
> .../gcc/gcc-cross-intermediate.inc | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> 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}"
this might not work second time around when gcc-cross has been staged.
next prev parent reply other threads:[~2011-06-15 16:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 15:30 [PATCH RFC] binutils: allow distro to select gold as default cross-linker Phil Blundell
2011-06-14 15:38 ` Koen Kooi
2011-06-15 2:44 ` Khem Raj
2011-06-15 8:04 ` Phil Blundell
2011-06-15 14:32 ` Phil Blundell
2011-06-15 16:26 ` Khem Raj [this message]
2011-06-15 16:31 ` Phil Blundell
2011-06-15 16:35 ` Khem Raj
2011-06-15 16:42 ` Phil Blundell
2011-06-15 16:47 ` Khem Raj
2011-06-15 16:50 ` Phil Blundell
2011-06-15 2:42 ` Khem Raj
2011-06-15 11:30 ` Phil Blundell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DF8DD52.70502@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.