gcc-3.3.2 for Netwinder

Daniel Kegel dank@kegel.com
Wed Jul 28 19:35:00 GMT 2004

Craig A. Vanderborgh wrote:
>>>The netwinder is using "NWFPE", the kernel floating point emulator, to
>>>do the floating point stuff.
>>>When I cross-compile (on x86linux to arm) I can get the correct code
>>>generated if I specify -mhard-float.  ...
>>>So my problem is really that the crosstool build does not seem to be
>>>able to build glibc with "hard float" so that the linked binary (built
>>>using the cross-compiler) is compatible with the NWFPE libc.so on the
>>Did you try adding -mhard-float to TARGET_CFLAGS in arm.dat before
>>building crosstool? ...
> I am using crosstool-0.27, and my current ".dat" file looks like this:

Please try crosstool-0.28-rc30.  It has arm fixes.

> KERNELCONFIG=$PWD/arm.config
> TARGET=arm-elf-linux
> TARGET_CFLAGS="-march=armv4 -O"
> GCC_EXTRA_CONFIG="--with-float=hard"

I had problems in the distant past with gcc defaults in GCC_EXTRA_CONFIG
not applying for the glibc or stdlibc++ built by crosstool, so it might be worth
also setting
TARGET_CFLAGS="-march=armv4 -O -mhard-float"
in that file.

> The problem I am having is that evidently the netwinder requires the
> "hard-float" configuration of gcc, but I cannot compile glibc without
> the "--without-fp" option, and thus it is not possible to link
> executables with the cross toolchain.
> I should point out that I CAN build working floating point programs as
> long as I build just the object using the crosstool-built GCC specifying
> -mhard-float on the command line and then link it on the netwinder.
> Right now, I am trying the approach of commenting out the missing
> instructions (e.g. sfmea) in the glibc sources.  This might work and I
> will keep you posted.  But is there a better approach??  Is there some
> legit configuration settings I can use to build the unadulterated glibc
> sources for the netwinder?

Hrm, I dunno.  I wonder if there are any interesting patches in
Have you looked in glibc cvs to see if the missing instructions are used?
Why are the instructions missing?
Do we need to configure binutils differently?
- Dan

Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

More information about the crossgcc mailing list