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] |
> For some reason when I build a gcc cross for strongarm-elf using a cygwin > host I don't get the soft floating point libraries. I don't get any errors > while building, and the croos compiler works fine, just no soft-float > libraries. > > Multilib appears to be working as I get be (-mbig-endian) and fpu > (-mhard-float) directories populated with libraries. I thought the default > library might be soft-float/little-endian but when I compile a c or c++ app > and then try and link it I get an error telling me that the library was > compiled for hardware FP. > > Can anyone help me - I've read everything and tried everything I can but > just can't seem to get the expected results. I hope the following > information will help. > Because of the way the compiler passes directives to the assembler and the way that the linker checks for flags we have the situation where code compiled with a compiler whose default configuration is to produce soft-float code is marked as incompatible with code that is compiled with the -msoft-float flag. This is really a bug in gcc... (but fixing it would leave a nasty backwards-compatibility problem for binary linking). You need to check the way your compiler is configured. Compile the following to assembly and check the output: double f() { return 1.0; } If the compiler puts the result into f0, then your configuration is using hard-float. If it puts the result in r0,r1 then you have a soft-float compiler by default. For the second scenario, the best thing to do is to always use the compiler *without* the soft-float flag and just accept it. For the former case things are a bit more complex if you aren't getting those soft-float multilibs that you want (if you are, then you can just use -msoft-float all the time, including during linking and things should just work). My understanding from a quick glance at the sources is that the strongarm-elf configuration does default to soft-float, so there is no need ever to specify -msoft-float on the command line; I think that would be your best approach. R. ------ 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] |