All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y
@ 2013-09-04 15:18 Axel Lin
  2013-09-04 16:19 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2013-09-04 15:18 UTC (permalink / raw)
  To: buildroot

It's needed for some uClibc combination, link-flat.so which uses elf2flt
pulls in libgcc according to uclibc/Makerules (used in uclibc/libc/Makefile.in).
Thus pull it in for gcc-initial.

This also ensures elf2flt is ready when BR2_PACKAGE_HOST_ELF2FLT=y before
building other packages.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
This change is based on Gustavo's comment.
Test build for blackfin looks OK.

This patch replaces my previous patch
"dependencies: Add host prerequisite for elf2flt".

 package/gcc/gcc-initial/gcc-initial.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk
index 0eb492f..6b85983 100644
--- a/package/gcc/gcc-initial/gcc-initial.mk
+++ b/package/gcc/gcc-initial/gcc-initial.mk
@@ -10,6 +10,10 @@ GCC_INITIAL_SOURCE  = $(GCC_SOURCE)
 
 HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES)
 
+ifeq ($(BR2_PACKAGE_HOST_ELF2FLT),y)
+HOST_GCC_INITIAL_DEPENDENCIES += host-elf2flt
+endif
+
 HOST_GCC_INITIAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS)
 
 ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y
  2013-09-04 15:18 [Buildroot] [PATCH] gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y Axel Lin
@ 2013-09-04 16:19 ` Thomas Petazzoni
  2013-09-11 12:14   ` Gustavo Zacarias
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2013-09-04 16:19 UTC (permalink / raw)
  To: buildroot

Dear Axel Lin,

On Wed, 04 Sep 2013 23:18:35 +0800, Axel Lin wrote:
> It's needed for some uClibc combination, link-flat.so which uses elf2flt
> pulls in libgcc according to uclibc/Makerules (used in uclibc/libc/Makefile.in).
> Thus pull it in for gcc-initial.
> 
> This also ensures elf2flt is ready when BR2_PACKAGE_HOST_ELF2FLT=y before
> building other packages.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y
  2013-09-04 16:19 ` Thomas Petazzoni
@ 2013-09-11 12:14   ` Gustavo Zacarias
  2013-09-12  1:13     ` Axel Lin
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo Zacarias @ 2013-09-11 12:14 UTC (permalink / raw)
  To: buildroot

On 09/04/2013 01:19 PM, Thomas Petazzoni wrote:

> Dear Axel Lin,
> 
> On Wed, 04 Sep 2013 23:18:35 +0800, Axel Lin wrote:
>> It's needed for some uClibc combination, link-flat.so which uses elf2flt
>> pulls in libgcc according to uclibc/Makerules (used in uclibc/libc/Makefile.in).
>> Thus pull it in for gcc-initial.
>>
>> This also ensures elf2flt is ready when BR2_PACKAGE_HOST_ELF2FLT=y before
>> building other packages.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> 
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Actually pulling in host-elf2flt should depend on BINFMT_FLAT rather
than the package being selected, as per the patch i've just sent.
Regards.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y
  2013-09-11 12:14   ` Gustavo Zacarias
@ 2013-09-12  1:13     ` Axel Lin
  2013-09-12  7:23       ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2013-09-12  1:13 UTC (permalink / raw)
  To: buildroot

2013/9/11 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> On 09/04/2013 01:19 PM, Thomas Petazzoni wrote:
>
>> Dear Axel Lin,
>>
>> On Wed, 04 Sep 2013 23:18:35 +0800, Axel Lin wrote:
>>> It's needed for some uClibc combination, link-flat.so which uses elf2flt
>>> pulls in libgcc according to uclibc/Makerules (used in uclibc/libc/Makefile.in).
>>> Thus pull it in for gcc-initial.
>>>
>>> This also ensures elf2flt is ready when BR2_PACKAGE_HOST_ELF2FLT=y before
>>> building other packages.
>>>
>>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>>
>> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> Actually pulling in host-elf2flt should depend on BINFMT_FLAT rather
> than the package being selected, as per the patch i've just sent.

Either looks ok to me. (I don't see the difference here.)

Probably not directly related to this topic, but I have a question about
the dependency between BR2_BINFMT_FLAT & BR2_PACKAGE_HOST_ELF2FLT.

Why not just make BR2_PACKAGE_HOST_ELF2FLT depend on BR2_BINFMT_FLAT
rather than "depends on BR2_arm || BR2_bfin || BR2_sh || BR2_sparc"?

I'm not familiar with sparc.
But according to current dependency setting, it's not possible to select
BR2_BINFMT_FLAT for sparc but it's possible to select BR2_PACKAGE_HOST_ELF2FLT
for sparc.

Regards,
Axel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y
  2013-09-12  1:13     ` Axel Lin
@ 2013-09-12  7:23       ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2013-09-12  7:23 UTC (permalink / raw)
  To: buildroot

Dear Axel Lin,

On Thu, 12 Sep 2013 09:13:21 +0800, Axel Lin wrote:

> Probably not directly related to this topic, but I have a question
> about the dependency between BR2_BINFMT_FLAT &
> BR2_PACKAGE_HOST_ELF2FLT.
> 
> Why not just make BR2_PACKAGE_HOST_ELF2FLT depend on BR2_BINFMT_FLAT
> rather than "depends on BR2_arm || BR2_bfin || BR2_sh || BR2_sparc"?

As Gustavo pointed out (maybe on IRC ?), BR2_PACKAGE_HOST_ELF2FLT
should simply be removed. There is no need to have a Kconfig option to
host tools when they can simply be built as a dependency of something
else (which is the case here).

The only case for which we add a Kconfig option for host tools is when
this host tool is not built as a dependency of something else, and that
the user may still be interested in building it.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-12  7:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-04 15:18 [Buildroot] [PATCH] gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y Axel Lin
2013-09-04 16:19 ` Thomas Petazzoni
2013-09-11 12:14   ` Gustavo Zacarias
2013-09-12  1:13     ` Axel Lin
2013-09-12  7:23       ` Thomas Petazzoni

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.