Skip to contentSkip to conversation

...uses hardware FP, whereas u-boot uses software FP...

U-Boot-Users Steven Scholz 2 participants 10 messages Mar 2, 2005 – Mar 5, 2005

lore
Share & tools
lore
#0 lore raw

Hi there,

I just tried

CROSS_COMPILE=arm-softfloat-linux-gnu- ./MAKEALL ARM9

on the CVS HEAD but got

arm-softfloat-linux-gnu-ld: ERROR:
/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2-linux-2.4.27/lib/gcc-lib/arm-softfloat-linux-gnu/3.3.3/libgcc.a(_divsi3.oS) uses hardware FP, whereas u-boot uses software FP
arm-softfloat-linux-gnu-ld: failed to merge target specific data of file /opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2-linux-2.4.27/lib/gcc-lib/arm-softfloat-linux-gnu/3.3.3/libgcc.a(_divsi3.oS)
make: *** [u-boot] Fehler 1

for at91rm9200dk and cmc_pu2.

Removing " -msoft-float" from /cpu/at91rm9200/config.mk solves this problem.

But why?

My toolchain gcc-3.3.3-glibc-2.3.2-linux-2.4.27 was built with crosstool using

export TARGET=arm-softfloat-linux-gnu
export TARGET_CFLAGS="-O"
export GCC_EXTRA_CONFIG="--with-float=soft"
export GLIBC_EXTRA_CONFIG="--without-fp"
export BINUTILS_DIR=binutils-2.15
export GCC_DIR=gcc-3.3.3
export GLIBC_DIR=glibc-2.3.2
export LINUX_DIR=linux-2.4.27

so I am pretty sure that I am using softfloat by default. But then why is it a problem if I pass -msoft-float to the compiler?

Thanks!

Signature · 1 line
Steven
#1 lore raw
Quoted 8 lines · In message <[email protected]> you wrote:

CROSS_COMPILE=arm-softfloat-linux-gnu- ./MAKEALL ARM9

on the CVS HEAD but got

arm-softfloat-linux-gnu-ld: ERROR:
/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2-linux-2.4.27/lib/gcc-lib/arm-softfloat-linux-gnu/3.3.3/libgcc.a(_divsi3.oS) uses hardware FP, whereas u-boot uses software FP

This message is clear, isn't it? Your compiler libraries are built using hardware FP, whereas u-boot uses software FP

Quoted 1 line

Removing " -msoft-float" from /cpu/at91rm9200/config.mk solves this problem.

Not really.

Quoted 1 line

My toolchain gcc-3.3.3-glibc-2.3.2-linux-2.4.27 was built with crosstool using

Maybe you should ask this on a crosstools related mailing list (probably linux-arm-toolchain).

Quoted 2 lines

so I am pretty sure that I am using softfloat by default. But then why is it a problem if I pass -msoft-float to the compiler?

Maybe you are using softfloat, but your compiler libraries aren't.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When you die, the first thing you lose is your life. The  next  thing
is the illusions.                       - Terry Pratchett, _Pyramids_
#2 lore raw

Dear Wolfgang,

Quoted 10 lines
Quoted 3 lines

arm-softfloat-linux-gnu-ld: ERROR:
/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2-linux-2.4.27/lib/gcc-lib/arm-softfloat-linux-gnu/3.3.3/libgcc.a(_divsi3.oS) uses hardware FP, whereas u-boot uses software FP

This message is clear, isn't it? Your compiler libraries are built using hardware FP, whereas u-boot uses software FP
...

Quoted 1 line

My toolchain gcc-3.3.3-glibc-2.3.2-linux-2.4.27 was built with crosstool using

Maybe you are using softfloat, but your compiler libraries aren't.

So your suggesting that my glibc is built with softfloat support but not the gcc itself?

IIUC then U-Boot does not need glibc?

Signature · 1 line
Steven
#3 lore raw

Dear Steven,

Quoted 3 lines · in message <[email protected]> you wrote:
Quoted 3 lines
Quoted 3 lines

/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2-linux-2.4.27/lib/gcc-lib/arm-softfloat-linux-gnu/3.3.3/libgcc.a(_divsi3.oS) uses hardware FP, whereas u-boot uses software FP

Please read this message again, and carefully.

Quoted 7 lines
Quoted 2 lines

This message is clear, isn't it? Your compiler libraries are built using hardware FP, whereas u-boot uses software FP

So your suggesting that my glibc is built with softfloat support but not the gcc itself?

IIUC then U-Boot does not need glibc?

I never mentioned glibc. Nor is it mentioned in the error message. The library in question is "libgcc.a", where the compiler itself (GCC) provides utility functions (like here divsi3 to perferm a signed division operation).

I repeat: Your compiler libraries are built using hardware FP, whereas u-boot uses software FP.

In other words: your toolchain is not configured as you expected.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I like your game but we have to change the rules."
#4 lore raw

Dear Wolfgang,

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

This message is clear, isn't it? Your compiler libraries are built using hardware FP, whereas u-boot uses software FP

Sure it is.

Quoted 10 lines
Quoted 4 lines

So your suggesting that my glibc is built with softfloat support but not the gcc itself?

IIUC then U-Boot does not need glibc?

I never mentioned glibc. Nor is it mentioned in the error message. The library in question is "libgcc.a", where the compiler itself (GCC) provides utility functions (like here divsi3 to perferm a signed division operation).

Quoted 4 lines

I repeat: Your compiler libraries are built using hardware FP, whereas u-boot uses software FP.

In other words: your toolchain is not configured as you expected.

I just wanted to make sure that I understood corretcly.
Since my user applications seems to run fine under linux I assume that my glibc supports softfloat.
U-Boot does not use glibc but libgcc.a. Since the compiler complains while compiling U-Boot, it seems that my libgcc.a does not support softfloat. So the problems lies in how my compiler was built and not how the glibc was built. Did I get this right?

Thanks a million!

--
Steven

#5 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:
Quoted 3 lines

I repeat: Your compiler libraries are built using hardware FP, whereas u-boot uses software FP.

...

Quoted 2 lines

Since my user applications seems to run fine under linux I assume that my glibc supports softfloat.

Maybe, maybe not.

Quoted 1 line

U-Boot does not use glibc but libgcc.a. Since the compiler complains while

No. U-Boot does NOT use libgcc.a.

It is your compiler which requires libgcc.a.

Quoted 3 lines

compiling U-Boot, it seems that my libgcc.a does not support softfloat. So the problems lies in how my compiler was built and not how the glibc was built. Did I get this right?

Right. It has nothing to do with glibc. It's the compiler libraries which use hardware FP, which does not mix with any other code that uses soft-float.

[This is why I have doubts if your Linux stuff really uses soft- float; you'd run in the same problem there, too. But this is a different issue.]

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe does not have laws - it has habits, and  habits  can  be
broken.
#6 lore raw
Quoted 5 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:
Quoted 2 lines

I repeat: Your compiler libraries are built using hardware FP, whereas u-boot uses software FP.

Quoted 7 lines

...

Quoted 2 lines

Since my user applications seems to run fine under linux I assume that my glibc supports softfloat.

Maybe, maybe not.

Any hint how I could make sure and test it?

Quoted 5 lines
Quoted 1 line

U-Boot does not use glibc but libgcc.a. Since the compiler complains while

No. U-Boot does NOT use libgcc.a.

It is your compiler which requires libgcc.a.

Ok. Thanks.

Quoted 11 lines
Quoted 3 lines

compiling U-Boot, it seems that my libgcc.a does not support softfloat. So the problems lies in how my compiler was built and not how the glibc was built. Did I get this right?

Right. It has nothing to do with glibc. It's the compiler libraries which use hardware FP, which does not mix with any other code that uses soft-float.

[This is why I have doubts if your Linux stuff really uses soft- float; you'd run in the same problem there, too. But this is a different issue.]

Ok.

Thanks a million so far. I guess I try my luck on crossgcc at sources.redhat.com then.

--
Steven

#7 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines

Maybe, maybe not.

Any hint how I could make sure and test it?

Disassemble and grep for FP instructions?

Quoted 1 line

Thanks a million so far. I guess I try my luck on crossgcc at sources.redhat.com then.

Or, as mentioned before, on the ARM toolchain mailing list.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What nonsense people talk about happy marriages! A man can  be  happy
with any woman so long as he doesn't love her.         -- Oscar Wilde
#8 lore raw
Quoted 7 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:
Quoted 1 line

Maybe, maybe not.

Any hint how I could make sure and test it?

Quoted 7 lines

Disassemble and grep for FP instructions?

Quoted 1 line

Thanks a million so far. I guess I try my luck on crossgcc at sources.redhat.com then.

Or, as mentioned before, on the ARM toolchain mailing list.

I did not know, there's an ARM specific toolchain mailing list. Do you mind giving me a hint where to find it? Thanks.

Have a nice weekend.

Signature · 1 line
Steven
#9 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines

Or, as mentioned before, on the ARM toolchain mailing list.

I did not know, there's an ARM specific toolchain mailing list. Do you mind giving me a hint where to find it?

linux-arm-toolchain at lists.arm.linux.org.uk

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The glory of creation is in its infinite diversity." "And in the way
our differences combine to create meaning and beauty."
	-- Dr. Miranda Jones and Spock, "Is There in Truth No Beauty?",
	   stardate 5630.8