public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/14895] New: soft float flags missings from libgcc.a (and others)
@ 2004-04-08 19:55 droopycom at yahoo dot com
  2004-04-08 23:25 ` [Bug target/14895] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: droopycom at yahoo dot com @ 2004-04-08 19:55 UTC (permalink / raw)
  To: gcc-bugs

Hi,

I experienced this trying to compile a uClinux arm kernel with arm-elf-gcc 
3.3.3. The kernel link will complain that libgcc.a uses hard float while linux 
kernel uses soft-floats. arm-elf-objdump -p shows that the linux object files 
have the SOFTFLOAT flag while libgcc doesnt. Linux CFLAGS include "-msoft-
float", but I believe libgcc was compiled without this flag but the default is 
soft float anyway. The problem is that gas doesnt receive the correct flags 
when called.
The following simple patch to gcc solved my particular issue:

### soft float patch
--- gcc-3.3-branch/gcc/config/arm/elf.h	2004-03-30 12:43:45.000000000 -0800
+++ gcc-3.3.3-fg/gcc/config/arm/elf.h	2004-04-07 21:42:05.000000000 -0700
@@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA.  */
 
 #ifndef SUBTARGET_ASM_FLOAT_SPEC
 #define SUBTARGET_ASM_FLOAT_SPEC "\
-%{mapcs-float:-mfloat} %{msoft-float:-mno-fpu}"
+%{mapcs-float:-mfloat} %{!mhard-float:-mfpu=softfpa} %{mhard-float:-mfpu=fpa}" 
 #endif
 
 #ifndef ASM_SPEC
##### End patch

However I found a more complete patch and analysis of the problem by Nick 
Clifton in the archives:
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00593.html

Apparently, theres no bug filed for this, nor the patch made it into the 3.3 
branch.

I also believe that one work around would be to remove the -msoft-float from 
the linux CFLAGS, although I patched my gcc first so I didnt really test.

Thanks

-- F.G.

-- 
           Summary: soft float flags missings from libgcc.a (and others)
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: droopycom at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: arm-elf


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-06-18 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-08 19:55 [Bug target/14895] New: soft float flags missings from libgcc.a (and others) droopycom at yahoo dot com
2004-04-08 23:25 ` [Bug target/14895] " pinskia at gcc dot gnu dot org
2004-04-18  2:24 ` droopycom at yahoo dot com
2004-04-18  3:21 ` pinskia at gcc dot gnu dot org
2004-06-18 21:28 ` droopycom at yahoo dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).