* [PATCH] kernel-arch: Always use ld.bfd to link the kernel
@ 2013-04-23 16:47 Phil Blundell
2014-03-28 17:28 ` Denys Dmytriyenko
0 siblings, 1 reply; 4+ messages in thread
From: Phil Blundell @ 2013-04-23 16:47 UTC (permalink / raw)
To: oe-core
The kernel's penchant for custom linker scripts means that it doesn't
generally get on very well with gold. Make sure we are using the BFD
linker here no matter what the distro default is set to.
Signed-off-by: Phil Blundell <philb@gnu.org>
---
meta/classes/kernel-arch.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/kernel-arch.bbclass
b/meta/classes/kernel-arch.bbclass
index b3b71ba..4a140eb 100644
--- a/meta/classes/kernel-arch.bbclass
+++ b/meta/classes/kernel-arch.bbclass
@@ -53,6 +53,6 @@ TARGET_AR_KERNEL_ARCH ?= ""
HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH}"
-KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld ${HOST_LD_KERNEL_ARCH}"
+KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kernel-arch: Always use ld.bfd to link the kernel
2013-04-23 16:47 [PATCH] kernel-arch: Always use ld.bfd to link the kernel Phil Blundell
@ 2014-03-28 17:28 ` Denys Dmytriyenko
2014-04-01 5:41 ` Khem Raj
2014-04-01 12:19 ` Phil Blundell
0 siblings, 2 replies; 4+ messages in thread
From: Denys Dmytriyenko @ 2014-03-28 17:28 UTC (permalink / raw)
To: Phil Blundell; +Cc: oe-core
On Tue, Apr 23, 2013 at 05:47:29PM +0100, Phil Blundell wrote:
> The kernel's penchant for custom linker scripts means that it doesn't
> generally get on very well with gold. Make sure we are using the BFD
> linker here no matter what the distro default is set to.
>
> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
> meta/classes/kernel-arch.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel-arch.bbclass
> b/meta/classes/kernel-arch.bbclass
> index b3b71ba..4a140eb 100644
> --- a/meta/classes/kernel-arch.bbclass
> +++ b/meta/classes/kernel-arch.bbclass
> @@ -53,6 +53,6 @@ TARGET_AR_KERNEL_ARCH ?= ""
> HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
>
> KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH}"
> -KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld ${HOST_LD_KERNEL_ARCH}"
> +KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
> KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
I know this is almost a year-old change.
The question I have is - what should one do when using an external toolchain
that doesn't have ld.bfd provided? I know these days with gold vs. BFD linker,
it's common to have ld.bfd, but there could be exceptions...
Should this assignment be conditional, so it's easier to override from
local.conf or distro?
--
Denys
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kernel-arch: Always use ld.bfd to link the kernel
2014-03-28 17:28 ` Denys Dmytriyenko
@ 2014-04-01 5:41 ` Khem Raj
2014-04-01 12:19 ` Phil Blundell
1 sibling, 0 replies; 4+ messages in thread
From: Khem Raj @ 2014-04-01 5:41 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: oe-core
On Fri, Mar 28, 2014 at 10:28 AM, Denys Dmytriyenko <denis@denix.org> wrote:
>> -KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld ${HOST_LD_KERNEL_ARCH}"
>> +KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
>> KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
>
> I know this is almost a year-old change.
>
> The question I have is - what should one do when using an external toolchain
> that doesn't have ld.bfd provided? I know these days with gold vs. BFD linker,
> it's common to have ld.bfd, but there could be exceptions...
>
> Should this assignment be conditional, so it's easier to override from
> local.conf or distro?
Can external toolchain create ld.bfd symlink ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kernel-arch: Always use ld.bfd to link the kernel
2014-03-28 17:28 ` Denys Dmytriyenko
2014-04-01 5:41 ` Khem Raj
@ 2014-04-01 12:19 ` Phil Blundell
1 sibling, 0 replies; 4+ messages in thread
From: Phil Blundell @ 2014-04-01 12:19 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: oe-core
On Fri, 2014-03-28 at 13:28 -0400, Denys Dmytriyenko wrote:
> > KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH}"
> > -KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld ${HOST_LD_KERNEL_ARCH}"
> > +KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
> > KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
>
> I know this is almost a year-old change.
>
> The question I have is - what should one do when using an external toolchain
> that doesn't have ld.bfd provided? I know these days with gold vs. BFD linker,
> it's common to have ld.bfd, but there could be exceptions...
>
> Should this assignment be conditional, so it's easier to override from
> local.conf or distro?
Making those assignments all be conditional doesn't sound like a totally
unreasonable plan to me. (I think it would be a bad idea to make
KERNEL_LD alone be conditional; if we change one then we should change
all four.)
Alternatively I guess you could take the view that the external
toolchain packaging ought to be providing an ld.bfd symlink if there
isn't already one. There are other places in oe-core which mention
ld.bfd (one of them is gcc-cross-initial, which probably wouldn't be an
issue for external toolchains, but another is u-boot which might be) and
fixing the problem in the external toolchain would avoid the need to
find and fix every place that refers to ld.bfd. So I think this would
be my preference.
p.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-01 12:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23 16:47 [PATCH] kernel-arch: Always use ld.bfd to link the kernel Phil Blundell
2014-03-28 17:28 ` Denys Dmytriyenko
2014-04-01 5:41 ` Khem Raj
2014-04-01 12:19 ` Phil Blundell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox