kmod: disable --gc-sections ld option when building for xtensa
PATCH v2 1/1 kmod: disable --gc-sections ld option when building for xtensa
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
---
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(+)
package/kmod/kmod.mk +5 -0
@@ -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
Signature · 1 line
1.8.1.4
Thomas Petazzoni
AppliedPATCH v2 1/1 kmod: disable --gc-sections ld option when building for xtensa
Dear Max Filippov,
Quoted 11 lines · Max Filippov
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.cline 3374 inelf_xtensa_finish_dynamic_sectionsSuggested-by Thomas Petazzoni <[email protected]>Signed-off-by Max Filippov <[email protected]>---
Changesv1->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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com