Skip to contentSkip to conversation

New: musl buildroot-toolchain and BR2_MIPS_SOFT_FLOAT break

Buildroot bugzilla at busybox.net 1 participant 5 messages Oct 26, 2014 – Mar 10, 2016

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=7562

Summary: musl buildroot-toolchain and BR2_MIPS_SOFT_FLOAT break
Product: buildroot
Version: 2014.08
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: alex+buildroot at digriz.org.uk
CC: buildroot at uclibc.org
Estimated Hours: 0.0

I use the following settings:

BR2_mipsel=y
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_MIPS_SOFT_FLOAT=y

Even trying to run busybox fails as ld-musl-mipsel.so.1 does not exist. Some digging around I found that ld-musl-mipsel-sf.so.1 does, I am guessing 'sf' stands for "soft float".

To workaround the problem, I slipped into my post-build.sh script the following:
----
ln -f -s /lib/libc.so "$1/lib/ld-musl-mipsel.so.1"
----

That gets things working again. Not should how this should actually be fixed, otherwise I would submit a patch.

Let me know if you need anything from me to help get this fixed.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 7562] musl buildroot-toolchain and BR2_MIPS_SOFT_FLOAT break

https://bugs.busybox.net/show_bug.cgi?id=7562

--- Comment #1 from Thomas Petazzoni <[email protected]> 2014-11-07 07:37:03 UTC --- Thanks for the report. That's due to a lack of coherency between the musl installation code (which indeed installs the ld-musl-mipsel-sf symbolic link)
and the gcc patch we have for musl support, which assumes the mips dynamic
linker is always ld-musl-mipsel, regarding of whether it's hard-float or
soft-float.

I'll have a look into this and if applicable report this up to the folks doing the gcc patches for musl.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 7562] musl buildroot-toolchain and BR2_MIPS_SOFT_FLOAT break

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=7562

--- Comment #2 from Thomas Petazzoni <[email protected]> 2014-11-09 10:33:56 UTC --- Issue reported upstream at
https://bitbucket.org/GregorR/musl-cross/issue/4/invalid-mips-soft-float-linker-path.
I am not entirely sure what is the proper condition to add in gcc to determine
if the -sf suffix should be added or not. I'll wait for upstream to give a hint
about this before cooking a patch.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 7562] musl buildroot-toolchain and BR2_MIPS_SOFT_FLOAT break

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=7562

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at buildroot.uclibc |thomas.petazzoni at free-elect
|.org |rons.com

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 7562] musl buildroot-toolchain and BR2_MIPS_SOFT_FLOAT break

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=7562

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Peter Korsgaard <[email protected]> --- Fixed in git by:

commit 348d5edd91abec1fc4cc27965220d54e58217dc3

Author: Thomas Petazzoni <[email protected]>
Date:   Tue Mar 8 22:20:55 2016 +0100

gcc: fix dynamic linker path for mips soft-float

This commit updates the gcc musl patches for gcc 4.7, 4.8 and 4.9 so that the path to the dynamic linker encoded as "program interpreter" in the generated binaries actually matches the symbolic link installed by musl when building for mips soft-float.

Indeed, musl installs a symlink called ld-musl-mipsel-sf.so.1, but gcc currently generates binaries that use /lib/ld-musl-mips.so as program interpreter.

The fix is simply the one from
https://bitbucket.org/GregorR/musl-cross/commits/825219202365, i.e adjust MUSL_DYNAMIC_LINKER in our musl gcc patches.

Thanks to these patches:

$ ./host/usr/bin/mipsel-linux-readelf -a ./target/bin/busybox [...]
[Requesting program interpreter: /lib/ld-musl-mipsel-sf.so.1]
[...]

gcc 5.x doesn't need any fix because the musl patches already use the right value.

Fixes bug #7562.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.