* [Buildroot] [PATCH] kmod: workaround for microblaze ld bug
@ 2017-02-18 21:40 Waldemar Brodkorb
2017-02-19 21:27 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2017-02-18 21:40 UTC (permalink / raw)
To: buildroot
Add a workaround for a microblaze specific ld bug to avoid
segfault.
Fixes:
http://autobuild.buildroot.net/results/aef1b915ffd3e5678af8682727c22c5618edfd89
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
package/kmod/kmod.mk | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index 7492b92..2524bcd 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -15,6 +15,16 @@ HOST_KMOD_DEPENDENCIES = host-pkgconf
KMOD_LICENSE = LGPLv2.1+ (library)
KMOD_LICENSE_FILES = libkmod/COPYING
+# --gc-sections triggers binutils ld segfault
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21180
+ifeq ($(BR2_microblaze),y)
+define KMOD_PRECONFIGURE
+ sed -i 's:-Wl,--gc-sections::g' $(@D)/configure
+endef
+
+KMOD_PRE_CONFIGURE_HOOKS += KMOD_PRECONFIGURE
+endif
+
# static linking not supported, see
# https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=b7016153ec8
KMOD_CONF_OPTS = --disable-static --enable-shared
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] kmod: workaround for microblaze ld bug
2017-02-18 21:40 [Buildroot] [PATCH] kmod: workaround for microblaze ld bug Waldemar Brodkorb
@ 2017-02-19 21:27 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2017-02-19 21:27 UTC (permalink / raw)
To: buildroot
>>>>> "Waldemar" == Waldemar Brodkorb <wbx@openadk.org> writes:
> Add a workaround for a microblaze specific ld bug to avoid
> segfault.
> Fixes:
> http://autobuild.buildroot.net/results/aef1b915ffd3e5678af8682727c22c5618edfd89
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
> package/kmod/kmod.mk | 10 ++++++++++
> 1 file changed, 10 insertions(+)
> diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
> index 7492b92..2524bcd 100644
> --- a/package/kmod/kmod.mk
> +++ b/package/kmod/kmod.mk
> @@ -15,6 +15,16 @@ HOST_KMOD_DEPENDENCIES = host-pkgconf
> KMOD_LICENSE = LGPLv2.1+ (library)
> KMOD_LICENSE_FILES = libkmod/COPYING
> +# --gc-sections triggers binutils ld segfault
> +# https://sourceware.org/bugzilla/show_bug.cgi?id=21180
> +ifeq ($(BR2_microblaze),y)
> +define KMOD_PRECONFIGURE
> + sed -i 's:-Wl,--gc-sections::g' $(@D)/configure
Patching the generated configure script is quite icky. We can just tell
the configure script that --gc-sections aren't supported, so I've
changed it to do:
KMOD_CONF_ENV += cc_cv_LDFLAGS__Wl___gc_sections=false
And committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-19 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-18 21:40 [Buildroot] [PATCH] kmod: workaround for microblaze ld bug Waldemar Brodkorb
2017-02-19 21:27 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox