All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Steve B <sbattazzo@gmail.com>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] Building with hard float: cannot open shared object file libpthread_rt.so.1
Date: Tue, 17 Mar 2015 21:02:38 +0100	[thread overview]
Message-ID: <20150317200238.GG16113@hermes.click-hack.org> (raw)
In-Reply-To: <CAEMXjGx6R0HtdJwU5_5AoDN=KV1T9nn5ug-ZwctJzd9B43NYSw@mail.gmail.com>

On Tue, Mar 17, 2015 at 12:57:43PM -0700, Steve B wrote:
> On Tue, Mar 17, 2015 at 12:24 PM, Lennart Sorensen <
> lsorense@csclub.uwaterloo.ca> wrote:
> 
> > On Tue, Mar 17, 2015 at 11:33:58AM -0700, Steve B wrote:
> > > Thanks! This actually doesn't work at compile time for some reason. The
> > ld
> > > step complains that the output binary uses VFP register arguments while
> > my
> > > main.o file does not... does anybody have any hints on this?
> > >
> > > If I do mfloat-abi=hard I can compile and run but my math operation still
> > > takes too long, which is counter-intuitive to me...
> >
> > Your entire system (all libs you use, etc) and your program all have to
> > be compiled with the same ABI.  So either you use gnueabi or gnueabihf.
> > You don't get to mix and match.
> >
> > So if you use debian or ubuntu armhf, then your system is gnueabihf,
> > and if you use armel, then your system is gnueabi (which uses softfloat
> > for argument passing).
> >
> > Of course if you use a multiarch system you could have libs built and
> > installed for both methods at the same time and each program would load
> > the libraries that matched its ABI.  That's probably too complicated to
> > deal with in general though.
> >
> > But if your libc and such are built with gnueabi, then you can not build
> > a single program with gnueabihf unless it requires no libraries from
> > the system at all (so a staticly linked binary could still run as long
> > as the kernel is built to run both ABIs).
> >
> > ARM has unfortunately gone through a number of ABIs over the years that
> > are not entirely compatible (especially when it comes to floating point
> > where they are pretty much entirely incompatible).
> >
> > --
> > Len Sorensen
> >
> 
> Thanks guys,
> Originally some other engineers on my project specified that we use
> Angstrom Linux which seems to only work with gnueabi.
> I noticed that the pow() function was causing problems so I looked at the
> disassembly of the libm.so with that toolchain and it looks suspiciously
> like soft floating point routines.
> 
> So I'm trying to run my simple test program on a Debian distribution which
> is built with gnueabihf. Seems like the issue is that if I use the
> -mhard-float option, I can't run with Xenomai, even if I built the Xenomai
> libraries with -mhard-float enabled.
> If I don't add in -mhard-float when I compile the program, the pow()
> function still takes much too long... if I enable -mhard-float and take
> away the Xenomai libs, then the pow() function executes in a reasonable
> amount of time.
> I guess there still may be something wrong in making sure everything is
> built the same.
> 
> Hopefully that makes more sense?

With a hard float toolchain, you normally do not need to pass
-mhard-float, it should always generate hard float code. Are you
sure you do not have some other flags on the compiler command line?

FWIW, xenomai has been tested for years on omap3, omap4, and now
at91sama5d3 with hard float toolchains.

-- 
					    Gilles.


  reply	other threads:[~2015-03-17 20:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 16:19 [Xenomai] Building with hard float: cannot open shared object file libpthread_rt.so.1 Steve B
2015-03-17 18:06 ` Gilles Chanteperdrix
2015-03-17 18:33   ` Steve B
2015-03-17 18:38     ` Gilles Chanteperdrix
     [not found]       ` <CAEMXjGzZn3JWCsxAkC+dFL0tLWk_FZpsNzB=YkSHYzCS2QEKmA@mail.gmail.com>
2015-03-17 19:18         ` Gilles Chanteperdrix
2015-03-17 19:24     ` Lennart Sorensen
2015-03-17 19:57       ` Steve B
2015-03-17 20:02         ` Gilles Chanteperdrix [this message]
2015-03-17 21:34         ` Lennart Sorensen
2015-03-19  0:42           ` Steve B
2015-03-19 14:07             ` Lennart Sorensen
2015-03-19 14:40               ` Gilles Chanteperdrix
2015-03-19 15:59                 ` Lennart Sorensen
2015-03-19 16:04                   ` Gilles Chanteperdrix
2015-03-19 16:43                     ` Lennart Sorensen
2015-03-19 16:48                       ` Gilles Chanteperdrix
2015-03-19 17:26                         ` Lennart Sorensen
2015-03-19 20:06                           ` Gilles Chanteperdrix
2015-03-19 20:32                             ` Lennart Sorensen
2015-03-19 16:49                       ` Steve B
2015-03-19 16:54                         ` Gilles Chanteperdrix
2015-03-19 18:00                           ` Steve B
2015-03-19 18:05                             ` Lennart Sorensen
2015-03-19 19:00                               ` Lennart Sorensen
2015-03-19 19:12                                 ` Steve B
2015-03-19 19:24                                   ` Lennart Sorensen
2015-03-19 20:33                                     ` Lennart Sorensen
2015-03-20 13:58                                       ` Lennart Sorensen
2015-03-19 20:03                             ` Gilles Chanteperdrix
2015-03-19 21:22                               ` Gilles Chanteperdrix
2015-03-19 21:29                                 ` Gilles Chanteperdrix
2015-03-19 17:48                         ` Lennart Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150317200238.GG16113@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=sbattazzo@gmail.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.