All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] kmod: disable --gc-sections ld option when building for xtensa
@ 2014-03-04 20:30 Max Filippov
  2014-03-04 22:19 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2014-03-04 20:30 UTC (permalink / raw)
  To: buildroot

This is a workaround for the following ld issue exhibited by --gc-sections
option, until a proper fix for binutils is ready:

ld: BFD (GNU Binutils) 2.22 internal error, aborting at elf32-xtensa.c line 3374 in elf_xtensa_finish_dynamic_sections

Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Changes v1->v2:
- instead of patching configure specify that -Wl,--gc-sections is not
  supported by ld at configure time

 package/kmod/kmod.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index f79a492..46c8ea9 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -32,6 +32,11 @@ KMOD_DEPENDENCIES += xz
 KMOD_CONF_OPT += --with-xz
 endif
 
+# --gc-sections triggers a bug in the current Xtensa binutils
+ifeq ($(BR2_xtensa),y)
+KMOD_CONF_ENV += cc_cv_LDFLAGS__Wl___gc_sections=no
+endif
+
 ifeq ($(BR2_PACKAGE_KMOD_TOOLS),y)
 
 # add license info for kmod tools
-- 
1.8.1.4

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

* [Buildroot] [PATCH v2] kmod: disable --gc-sections ld option when building for xtensa
  2014-03-04 20:30 [Buildroot] [PATCH v2] kmod: disable --gc-sections ld option when building for xtensa Max Filippov
@ 2014-03-04 22:19 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2014-03-04 22:19 UTC (permalink / raw)
  To: buildroot

Dear Max Filippov,

On Wed,  5 Mar 2014 00:30:31 +0400, Max Filippov wrote:
> This is a workaround for the following ld issue exhibited by --gc-sections
> option, until a proper fix for binutils is ready:
> 
> ld: BFD (GNU Binutils) 2.22 internal error, aborting at elf32-xtensa.c line 3374 in elf_xtensa_finish_dynamic_sections
> 
> Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> Changes v1->v2:
> - instead of patching configure specify that -Wl,--gc-sections is not
>   supported by ld at configure time

Applied, thanks.

I have added in the commit log a link to the autobuilder result which
this commit is fixing, for reference.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-03-04 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 20:30 [Buildroot] [PATCH v2] kmod: disable --gc-sections ld option when building for xtensa Max Filippov
2014-03-04 22:19 ` 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.