How to determine hard float vs. soft float

1,248 views
Skip to first unread message

Tim Cole

unread,
Sep 3, 2014, 2:33:48 AM9/3/14
to beagl...@googlegroups.com
Greetings all
As I understand it, the Debian distribution installed on the most recent BBBs  is configured for hard float. If I were to install another flavor of Linux, or even an updated version of Debian, how would I determine if it's been configured to use hard float or soft float? Is there any way other than compiling with one option or the other and trying to make sense of the errors?

ghazan...@gmail.com

unread,
Sep 3, 2014, 8:46:47 PM9/3/14
to beagl...@googlegroups.com


If the architecture is armhf that's hardfloat and requires a minimum of armv5. armel is softfloat and can run on arm7tdmi (armv4).

Find any local binary like /bin/ls and do an ld on it. It links to an ld library with armel or armhf in the name.

You'll find armel libraries in there too along with armhf ld libraries, but MOST of the binaries will be armhf. For armel platforms you'll only see armel (or the even older arm)

-Ghazan Haider

William Hermans

unread,
Sep 4, 2014, 3:46:27 PM9/4/14
to beagl...@googlegroups.com
Find any local binary like /bin/ls and do an ld on it. It links to an ld library with armel or armhf in the name.

You would want to use ldd, probably not ld.

Usage: ldd /bin/ls  /* going by above example */

root@arm:~# ldd /bin/ls
        libselinux.so.1 => /lib/arm-linux-gnueabihf/libselinux.so.1 (0xb6fa0000)
        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6f91000)
        libacl.so.1 => /lib/arm-linux-gnueabihf/libacl.so.1 (0xb6f83000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6f5f000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e7a000)
        /lib/ld-linux-armhf.so.3 (0xb6fc2000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6e6f000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6e53000)
        libattr.so.1 => /lib/arm-linux-gnueabihf/libattr.so.1 (0xb6e47000)



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
Sep 4, 2014, 3:58:08 PM9/4/14
to beagl...@googlegroups.com
Heh, another way I just figured out ( never noticed it before ) is to just do . .

$ ls /lib/

there is a arm-linux-gnueabihf directory and a ld-linux-armhf.so.3 file. Both of these should make it painfully obvious.

Tim Cole

unread,
Sep 4, 2014, 5:49:59 PM9/4/14
to beagl...@googlegroups.com
I have no idea why, but I've got both an arm-linux-gnueabihf directory and an arm-linux-gnueabi (i.e no "hf') directory. From what you've said, I'd guess I've installed something I shouldn't have installed. Presumably, if I check immediately after installing a new OS, I wouldn't have the problem.

Much obliged, folks.

William Hermans

unread,
Sep 4, 2014, 5:53:12 PM9/4/14
to beagl...@googlegroups.com
Tim, yeah I do not know about that but using ldd as described above will pretty much tell you what your systems tools expect at any rate.


Robert Nelson

unread,
Sep 4, 2014, 5:53:47 PM9/4/14
to Beagle Board
On Thu, Sep 4, 2014 at 4:49 PM, Tim Cole <tim...@rogers.com> wrote:
> I have no idea why, but I've got both an arm-linux-gnueabihf directory and
> an arm-linux-gnueabi (i.e no "hf') directory. From what you've said, I'd
> guess I've installed something I shouldn't have installed. Presumably, if I
> check immediately after installing a new OS, I wouldn't have the problem.

That's multiarch.

I eventually removed that in the default wheezy images, it didn't
support enough out of the box, and only caused more issues.. (Jessie
and later has better multi-arch support)

Regards,

--
Robert Nelson
http://www.rcn-ee.com/
Reply all
Reply to author
Forward
0 new messages