softfloat <==> hardfloat question...

Hi,

is it possible to run programs which were compiled with a *hardflt*gcc
and those which were compiled with a *softflp*gcc on one system?

And if yes: Is it possible to install both gccs on one system?

thank you very much for any help in advance!
Best regards,
mcc

Hi,

is it possible to run programs which were compiled with a *hardflt*gcc
and those which were compiled with a *softflp*gcc on one system?

Depends... Can you install "both" softfp/hardfp libraries on your system?

And if yes: Is it possible to install both gccs on one system?

Depends on your package manager/distro/etc...

Regards,

Robert Nelson <robertcnelson@gmail.com> writes:

→ is it possible to run programs which were compiled with a hardfltgcc
→ and those which were compiled with a softflpgcc on one system?

soft and hard fp are part of libgcc & glibc and how the kernel setup. It is possible. But if i were you, I would compile two versions of glibc, soft and hard fp, and static link to each library. You also have to make sure that the kernel is also configured to support hardfloat. Static linking allows you not having to manage the library individually.

A preferred way is to enable hardware float in user libraries, and configure the target kernel to support hardfloat/software floats.

Arithmetic operations then will be carried out in the kernel, and will be transparent to the application or libraries. The only real gain of enabling soft-float in user libraries is time (efficiency) b/c if you know for sure the target platform does not have FPU, you do not need to ask the kernel to carry out FP operations which otherwise be done by the application.

→ Is it possible to install both gccs on one system?

Of course, I have 4 different gccs on my system now. They are:

arm gcc toolchain

cygwin gcc

mingw gcc

avr gcc

You want to build your toolchain to a unique path, and usually having a toolchain prefix, ie --

Next, add the unique path to the system search path. This configuration standard allows you to compile software more easily, especially with Automake.

-Toan

So ignoring the new/shiny "neon accelerated arm bits that just hit
linux-arm last week"...

The kernel doesn't care if it's running a softfp/hardfp os, as
floating point operations are not allowed in the kernel...

Regards,

What is wrong with downloading two separate toolchains and using them separately as a normal user?

Not trying to be a wise ass here, but sounds perfectly do-able to me.

Robert Nelson <robertcnelson@gmail.com> writes:

Thanks Måns for confirmation on that.

I didn't look to deep into the patches and if they changed anything,
just knew they were coming..

Regards,