gcc-3.3.2 for Netwinder
Craig A. Vanderborgh
Wed Jul 28 17:20:00 GMT 2004
On Wed, 2004-07-28 at 11:27, Dan Kegel wrote:
> Craig A. Vanderborgh wrote:
> > I have done a lot more digging and have found out what is going on, at
> > least to some degree.
> > 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. But the trouble is, I don't seem
> > to be able to get the glibc part of the toolchain to compile with this
> > setting - I see this:
> > /tmp/ccfcpvcD.s: Assembler messages:
> > /tmp/ccfcpvcD.s:11: Error: selected processor does not support `rfs
> > /tmp/ccfcpvcD.s:20: Error: selected processor does not support `wfs
> > 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
> > netwinder.
> Did you try adding -mhard-float to TARGET_CFLAGS in arm.dat before
> building crosstool?
> Also, for completeness, can you tell us the exact version of
> crosstool you're using, and the exact commands you use to
> build crosstool and a tiny test app demonstrating the problem?
I am using crosstool-0.27, and my current ".dat" file looks like this:
and I am invoking all.sh like this:
# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
# mkdir -p /opt/crosstool
# Build the toolchain. Takes a couple hours and a couple gigabytes.
eval `cat arm-hardfloat.dat gcc-3.3.2-glibc-2.3.2.dat` sh all.sh
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?
> Maybe I should add demo-arm-hardfloat/arm-hardfloat.dat with the
> setting to crosstool, so others will have an easier time of this?
> - Dan
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to firstname.lastname@example.org
More information about the crossgcc