This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-3.3.2 for Netwinder


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
> r3'
> > /tmp/ccfcpvcD.s:20: Error: selected processor does not support `wfs
> r3'
> > 
> > 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:

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

and I am invoking all.sh like this:

#!/bin/sh
set -ex
export TARBALLS_DIR=~/armlinux
export RESULT_TOP=/usr/local/linux

# 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
--nounpack --notest

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?

Thanks again,
craig

> Maybe I should add demo-arm-hardfloat/arm-hardfloat.dat with the
> -mhard-float
> 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 crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]