This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14895] New: soft float flags missings from libgcc.a (and others)
- From: "droopycom at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Apr 2004 19:55:18 -0000
- Subject: [Bug target/14895] New: soft float flags missings from libgcc.a (and others)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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