[Buildroot] [PATCH] kmod: disable --gc-sections ld option when building for xtensa
Max Filippov
jcmvbkbc at gmail.com
Tue Mar 4 20:23:05 UTC 2014
Hi Thomas,
On Tue, Mar 4, 2014 at 11:22 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> On Tue, 4 Mar 2014 23:10:16 +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
>>
>> Signed-off-by: Max Filippov <jcmvbkbc at gmail.com>
>> ---
>> package/kmod/900-disable-gc-sections.patch.xtensa | 12 ++++++++++++
[...]
> I believe there is a much simpler solution. Don't
> use any patch at all, and add:
>
> # --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
>
> to package/kmod/kmod.mk.
>
> Can you test that it works for you, and submit the corresponding patch?
thank you for the review and for the suggested solution, it works for me
and I like it, though it doesn't look obvious. I'll submit v2.
--
Thanks.
-- Max
More information about the buildroot
mailing list