Skip to contentSkip to conversation

gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y

PATCH New Axel Lin 3 participants 5 messages Sep 4, 2013 – Sep 12, 2013

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y

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.

---
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(+)
package/gcc/gcc-initial/gcc-initial.mk +4 -0
index 0eb492f..6b85983 100644
@@ -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)),)
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y

Dear Axel Lin,

Quoted 8 lines · Axel Lin

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.

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y

Quoted 7 lines · Thomas Petazzoni

Dear Axel Lin,

Quoted 4 lines · Axel Lin

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.

Quoted 6 lines
Quoted 4 lines

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

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.

author
#3 lore raw

PATCH 1/1 gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y

2013/9/11 Gustavo Zacarias <[email protected]>:

Quoted 12 lines · Thomas Petazzoni
Quoted 11 lines

Dear Axel Lin,

Quoted 7 lines · Axel Lin

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.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

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

#4 lore raw

PATCH 1/1 gcc-initial: Add host-elf2flt dependency when BR2_PACKAGE_HOST_ELF2FLT=y

Dear Axel Lin,

Quoted 6 lines · Axel Lin

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

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