Gcc4.3 and Soft-float

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Gcc4.3 and Soft-float

3,709 Views
comio
Contributor I
I'm trying to use gcc-4.3 crosscompiler with coldfire 547x cpus but I'm not able to compile the soft float support (instead the hard float). There is not the "--with-float=soft" option into the configure and I'm not undestanding how create a cross compiler with the soft floating point emulation library (into libgcc.a).

Has anyone able to create a toolchain with the complete fp emulation library?

Thanks a lot,

luigi
Labels (1)
0 Kudos
8 Replies

994 Views
ChrisJohns
Contributor I
Hi Luigi,

Just build the compiler for the m68k target. The soft-float is a command line option. You need something like:

 m68k-elf-gcc -mcpu=5475 -msoft-float

Regards
Chris
0 Kudos

994 Views
comio
Contributor I
It seems to be a bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36559

Anyway, I successfully compiled (patching OpenWRT Kamikaze trunk) a complete building environment for Coldfire547x (et simila) and GCC4.3, binutils 2.8.

If anyone is interested i suggest to read the OpenWRT mailing list archive of this month and privately contact me.

ciao

luigi
0 Kudos

994 Views
ChrisJohns
Contributor I
Hi Luigi,

Your patch seems correct, not that I have tested it. I am currently playing with the RTEMS set up to get all the libs to build correctly. I have been adding FPU support to the context switcher in RTEMS.

What version binutils are you using ?

Regards
Chris
0 Kudos

994 Views
comio
Contributor I
I'm using the following setup:

 - OpenWRT 7.09 (trunk) with my patches
 - GCC4.3.1
 - Binutils 2.18
 - uClibc-0.9.29
 - Kernel 2.6.24

ciao

luigi


0 Kudos

994 Views
ChrisJohns
Contributor I
Interesting. My build for RTEMS is failing on a 51qe processor. Does your compiler support -mcpu=51qe ?

Regards
Chris
0 Kudos

994 Views
comio
Contributor I
I'm working on 547x cpus and I just compiled the gcc4.3.1 for m68k (with both supports for cf and old m68k cpus).

This is the target-help:

Code:
comio@cartesio:/mnt/devel/openwrt/OpenWRT.git/staging_dir/toolchain-m68k_gcc4.3.1/bin$ ./m68k-linux-gcc --target-help The following options are target specific:  -m5200                      Generate code for a 520X  -m5206e                     Generate code for a 5206e  -m528x                      Generate code for a 528x  -m5307                      Generate code for a 5307  -m5407                      Generate code for a 5407  -m68000                     Generate code for a 68000  -m68010                     Generate code for a 68010  -m68020                     Generate code for a 68020  -m68020-40                  Generate code for a 68040, without any new                              instructions  -m68020-60                  Generate code for a 68060, without any new                              instructions  -m68030                     Generate code for a 68030  -m68040                     Generate code for a 68040  -m68060                     Generate code for a 68060  -m68302                     Generate code for a 68302  -m68332                     Generate code for a 68332  -m68851                     Generate code for a 68851  -m68881                     Generate code that uses 68881 floating-point                              instructions  -malign-int                 Align variables on a 32-bit boundary  -march=                     Specify the name of the target architecture  -mbitfield                  Use the bit-field instructions  -mc68000                    Generate code for a 68000  -mc68020                    Generate code for a 68020  -mcfv4e                     Generate code for a ColdFire v4e  -mcpu32                     Generate code for a cpu32  -mcpu=                      Specify the target CPU  -mdiv                       Use hardware division instructions on ColdFire  -mfidoa                     Generate code for a Fido A  -mglibc                     Use GNU libc instead of uClibc  -mhard-float                Generate code which uses hardware floating point                              instructions  -mid-shared-library         Enable ID based shared library  -mieee-fp                   Use IEEE math for fp comparisons  -mnobitfield                Do not use the bit-field instructions  -mnortd                     Use normal calling convention  -mnoshort                   Consider type 'int' to be 32 bits wide  -mpcrel                     Generate pc-relative code  -mrtd                       Use different calling convention using 'rtd'  -msep-data                  Enable separate data segment  -mshared-library-id=        ID of shared library to build  -mshort                     Consider type 'int' to be 16 bits wide  -msoft-float                Generate code with library calls for floating                              point  -mstrict-align              Do not use unaligned memory references  -mtune=                     Tune for the specified target CPU or architecture  -muclibc                    Use uClibc instead of GNU libc-march=<arch>  set architecture-mcpu=<cpu>  set cpu [default 68020]-m[no-]68851            enable/disable m68k architecture extension-m[no-]68881            enable/disable m68k architecture extension-m[no-]68882            enable/disable m68k architecture extension-m[no-]float            enable/disable architecture extension-m[no-]div              enable/disable ColdFire architecture extension-m[no-]usp              enable/disable ColdFire architecture extension-m[no-]mac              enable/disable ColdFire architecture extension-m[no-]emac             enable/disable ColdFire architecture extension-l   use 1 word for refs to undefined symbols [default 2]-pic, -k  generate position independent code-S   turn jbsr into jsr--pcrel                 never turn PC-relative branches into absolute jumps--register-prefix-optional   recognize register names without prefix character--bitwise-or  do not treat `|' as a comment character--base-size-default-16 base reg without size is 16 bits--base-size-default-32 base reg without size is 32 bits (default)--disp-size-default-16 displacement with unknown size is 16 bits--disp-size-default-32 displacement with unknown size is 32 bits (default)Architecture variants are: 68000 | 68010 | 68020 | 68030 | 68040 | 68060 | cpu32 | fidoa | isaa | isaaplus | isab | isac | cfv4 | cfv4eProcessor variants are: 68000 | 68ec000 | 68hc000 | 68hc001 | 68008 | 68302 | 68306 | 68307 | 68322 | 68356 | 68010 | 68020 | 68k | 68ec020 | 68030 | 68ec030 | 68040 | 68ec040 | 68060 | 68ec060 | cpu32 | 68330 | 68331 | 68332 | 68333 | 68334 | 68336 | 68340 | 68341 | 68349 | 68360 | 5200 | 5202 | 5204 | 5206 | 5206e | 5207 | 5208 | 5210a | 5211a | 5211 | 5212 | 5213 | 5214 | 5216 | 521x | 52221 | 52223 | 52230 | 52233 | 52234 | 52235 | 5224 | 5225 | 5232 | 5233 | 5234 | 5235 | 523x | 5249 | 5250 | 5253 | 5270 | 5271 | 5272 | 5274 | 5275 | 5280 | 5281 | 5282 | 528x | 5307 | 5327 | 5328 | 5329 | 532x | 5372 | 5373 | 537x | 5407 | 54450 | 54451 | 54452 | 54453 | 54454 | 54455 | 5470 | 5471 | 5472 | 5473 | 5474 | 5475 | 547x | 5480 | 5481 | 5482 | 5483 | 5484 | 5485 | 548x | fidoa | fidoLinker options==============Use "-Wl,OPTION" to pass "OPTION" to the linker.m68kelf:   --build-id[=STYLE] Generate build ID note  -Bgroup  Selects group name lookup rules for DSO  --disable-new-dtags Disable new dynamic tags  --enable-new-dtags Enable new dynamic tags  --eh-frame-hdr Create .eh_frame_hdr section  --hash-style=STYLE Set hash style to sysv, gnu or both  -z combreloc  Merge dynamic relocs into one section and sort  -z defs  Report unresolved symbols in object files.  -z execstack  Mark executable as requiring executable stack  -z initfirst  Mark DSO to be initialized first at runtime  -z interpose  Mark object to interpose all DSOs but executable  -z lazy  Mark object lazy runtime binding (default)  -z loadfltr  Mark object requiring immediate process  -z muldefs  Allow multiple definitions  -z nocombreloc Don't merge dynamic relocs into one section  -z nocopyreloc Don't create copy relocs  -z nodefaultlib Mark object not to use default search paths  -z nodelete  Mark DSO non-deletable at runtime  -z nodlopen  Mark DSO not available to dlopen  -z nodump  Mark DSO not available to dldump  -z noexecstack Mark executable as not requiring executable stack  -z now  Mark object non-lazy runtime binding  -z origin  Mark object requiring immediate $ORIGIN processing     at runtime  -z max-page-size=SIZE Set maximum page size to SIZE  -z common-page-size=SIZE   Set common page size to SIZE  -z KEYWORD  Ignored for Solaris compatibility

 is your cpu mappable on one of these?

ciao

luigi

0 Kudos

994 Views
ChrisJohns
Contributor I
Thanks for that. The --target-help option is nice.  I think I have something wrong with my t-rtems file which I will need to look into. I am also on 4.3.1. and maybe this is something.

Regards
Chris
0 Kudos

994 Views
comio
Contributor I
Anyway, I noticed that 51eq cpu is supported only by gcc4.3-svn. Are you applied any patches to add this target?

ciao

luigi
0 Kudos