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] |
with regards senthil kumar
Looks like it's the same problem I got with gcc-3.3.2 and binutils-031031 : - the default option for gcc is soft-float - however, this default option isn't passed down to the assembler this result in having an object file containing no hard-float instruction but being tagged as hard-FP. So the link-hack should work fine. However, I solved the problem for my own target by patching the default option in gcc and patching the option in the multilib process.
Here is the patch that leads to a full working multilib :
diff -urpN gcc-3.3.2/gcc/config/arm/elf.h gcc-3.3.2.patch/gcc/config/arm/elf.h --- gcc-3.3.2/gcc/config/arm/elf.h 2002-11-21 22:29:24.000000000 +0100 +++ gcc-3.3.2.patch/gcc/config/arm/elf.h 2003-12-27 11:54:50.000000000 +0100 @@ -111,7 +111,7 @@ Boston, MA 02111-1307, USA. */
#ifndef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ - { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } + { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" } #endif
diff -urpN gcc-3.3.2/gcc/config/arm/t-arm-elf gcc-3.3.2.patch/gcc/config/arm/t-arm-elf --- gcc-3.3.2/gcc/config/arm/t-arm-elf 2002-05-08 17:01:13.000000000 +0200 +++ gcc-3.3.2.patch/gcc/config/arm/t-arm-elf 2003-12-27 11:55:26.000000000 +0100 @@ -25,23 +25,23 @@ MULTILIB_OPTIONS = marm/mthumb MULTILIB_DIRNAMES = arm thumb MULTILIB_EXCEPTIONS =
-# MULTILIB_OPTIONS += mlittle-endian/mbig-endian -# MULTILIB_DIRNAMES += le be -# MULTILIB_EXCEPTIONS = -# MULTILIB_MATCHES = mbig-endian=mbe mlittle-endian=mle -# -# MULTILIB_OPTIONS += mhard-float/msoft-float -# MULTILIB_DIRNAMES += fpu soft -# MULTILIB_EXCEPTIONS += *mthumb/*mhard-float* -# +MULTILIB_OPTIONS += mlittle-endian/mbig-endian +MULTILIB_DIRNAMES += le be +MULTILIB_EXCEPTIONS = +MULTILIB_MATCHES = mbig-endian=mbe mlittle-endian=mle + +MULTILIB_OPTIONS += mhard-float/msoft-float +MULTILIB_DIRNAMES += fpu soft +MULTILIB_EXCEPTIONS += *mthumb/*mhard-float* + # MULTILIB_OPTIONS += mapcs-32/mapcs-26 # MULTILIB_DIRNAMES += 32bit 26bit # MULTILIB_EXCEPTIONS += *mthumb/*mapcs-26* -# -# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork -# MULTILIB_DIRNAMES += normal interwork -# MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork* -# + +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork +MULTILIB_DIRNAMES += normal interwork +MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork* + # MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore # MULTILIB_DIRNAMES += elf under #
This has the default to lead to longer multilib generation process. But now all combination of soft/hard FP, Thumb/ARM, little/big Endian and interworking are usable. But I have to specify the exact location of the libc and libgcc at the link stage :
LIBS= -L /usr/local/arm-elf/arm-elf/lib/thumb/soft/interwork -lc \ -L /usr/local/arm-elf/lib/gcc-lib/arm-elf/3.3.2/thumb/soft/interwork -lgcc
Robert Schwebel <robert@schwebel.de> Pour : senthil <senthilnow@netscape.net> cc : robert@schwebel.de, crossgcc@sources.redhat.com, (ccc : Arnaud Envoyé par : ZANETTI/DSEC/SAGEM) crossgcc-owner@sources Objet : Re: Soft-float compiler for ARM .redhat.com 28/01/2004 07:47 Remis le : 28/01/2004 07:46
On Wed, Jan 28, 2004 at 01:31:13PM -0500, senthil wrote:
Hi, you will have to use something like this, arm-linux-gcc -static -L./ -msoft-float -Xlinker --no-warn-mismatch hello.c, you can also use -lfloat option if needed (use netwinder libfloat or nico's libfloat)
--no-warn-mismatch will allow you to continue linking
but sometimes I have noticed gcc putting hard-float instructions aswell
as definitions from softfloat (I used nicolas pitre's soft-float glibc
replacement ) if the arguments were passed in
a different order, but this one works fine for me. I am using gcc3.2.1.
This looks like a hack to me; I don't really want to change anything in the compiler call as it works quite fine with gcc-2.95.3 and just ommitting the warning smells like a hack - the real problem seems to be that libgcc only has (or at least claims to have) hard fp support compiled in.
Robert -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hornemannstraße 12, 31137 Hildesheim, Germany Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.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
------ 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] |