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.3 and softfloat?


On Fri, 3 Dec 2004, Steven Scholz wrote:

I am using gcc-3.3.3-glibc-2.3.2-linux-2.6.8 from crosstool-0.28-rc37 for ARM9.

export KERNELCONFIG=`pwd`/arm.config
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.6.8
export GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.2

Do I have to pass -msoft-float when compiling applications with floating point operations? Or is this flag on by default?

This configuration should default to always use soft float. You can verify this by checking the preprocessor macros. My cross gcc (which _is_not_ configured for soft-float) gives this output:

  $ touch x.c
  $ arm_v4le-gcc -E -dM -msoft-float x.c  | grep -i fp
  #define _SOFT_FLOAT 1
  $ arm_v4le-gcc -E -dM x.c  | grep -i fp
  $

You compiler should always throw _SOFT_FLOAT. To be 100% certain
you should take a look at the assembly using objdump.

How do I know if floating point operations are realy handle by the softfloat functions and not by the kernel emulator?

Again, you can always search for float instructions in the disassembled code (don't forget the libraries!). Maybe there is some kind of exception counter in /proc, have you looked for that?


Regards,
Marius

--
Marius Groeger <mgroeger@sysgo.com>
SYSGO AG                      Embedded and Real-Time Software
Voice: +49 6136 9948 0                  FAX: +49 6136 9948 10
www.sysgo.com | www.elinos.com | www.osek.de | www.imerva.com


------ 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]