* [Buildroot] [PATCH] Fix musl-based builds on ARMhf platforms.
@ 2015-09-27 13:48 Vicente Bergas
2015-09-28 20:50 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Vicente Bergas @ 2015-09-27 13:48 UTC (permalink / raw)
To: buildroot
When ARCH is arm and the hard-floating-point option is on executables
expect to find the dynamic linker at /lib/ld-musl-armhf.so.1 and not
/lib/ld-musl-arm.so.1
There are two ways of fixing this:
1) Changing the actual location of the dynamic linker.
2) Changing the expected location of the dynamic linker.
This patch uses option 1.
I don't know how to do option 2 and also don't know which option is better.
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
---
toolchain/toolchain-external/toolchain-external.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 61a5dba..79afdaa 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -524,6 +524,8 @@ endef
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
ifeq ($(BR2_i386),y)
MUSL_ARCH = i386
+else ifeq ($(BR2_ARM_EABIHF),y)
+MUSL_ARCH = armhf
else
MUSL_ARCH = $(ARCH)
endif
--
2.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] Fix musl-based builds on ARMhf platforms.
2015-09-27 13:48 [Buildroot] [PATCH] Fix musl-based builds on ARMhf platforms Vicente Bergas
@ 2015-09-28 20:50 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-09-28 20:50 UTC (permalink / raw)
To: buildroot
Dear Vicente Bergas,
On Sun, 27 Sep 2015 14:48:22 +0100, Vicente Bergas wrote:
> When ARCH is arm and the hard-floating-point option is on executables
> expect to find the dynamic linker at /lib/ld-musl-armhf.so.1 and not
> /lib/ld-musl-arm.so.1
> There are two ways of fixing this:
> 1) Changing the actual location of the dynamic linker.
> 2) Changing the expected location of the dynamic linker.
> This patch uses option 1.
> I don't know how to do option 2 and also don't know which option is better.
>
> Signed-off-by: Vicente Bergas <vicencb@gmail.com>
> ---
> toolchain/toolchain-external/toolchain-external.mk | 2 ++
> 1 file changed, 2 insertions(+)
I've slightly tweaked the commit log and applied. In fact your
explanation about "two ways of fixing this" is not completely correct:
the dynamic linker in musl is part of the C library itself. So all what
Buildroot is doing is create a symbolic link with the name of the
dynamic linker encoded into the executables, which points to the musl C
library. So all what your patch is doing is adjusting the logic that
calculates the name of this symbolic link.
Thanks for this contribution!
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:[~2015-09-28 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-27 13:48 [Buildroot] [PATCH] Fix musl-based builds on ARMhf platforms Vicente Bergas
2015-09-28 20:50 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox