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] |
Thank you very much. Your message is very helpful. I'll try it.Hi, regarding to your problem with the arm-elf with soft-float, the following forwarded message should help:
------- Forwarded message follows ------- To: Doug Evans <dje@sebabeach.org> Copies to: gcc-bugs@gcc.gnu.org, binutils@sources.redhat.com Subject: Re: arm-elf snafu? can't mix default-soft-float, explicit -msoft-float From: Nick Clifton <nickc@redhat.com> Date sent: Wed, 23 Jul 2003 19:31:37 +0100
[ Double-click this line for list subscription options ]
Hi Doug,
Simple testcase:
bash$ rm foo1.c foo2.c ; touch foo1.c foo2.c
bash$ arm-elf-gcc -c foo1.c
bash$ arm-elf-objdump -p foo1.o
foo1.o: file format elf32-littlearm
private flags = 0: [APCS-32] [FPA float format]
bash$ arm-elf-gcc -c foo2.c -msoft-float
foo1.o: file format elf32-littlearm
private flags = 200: [APCS-32] [FPA float format] [software FP]
bash$ arm-elf-gcc -nostdlib foo1.o foo2.o
[links successfully]
bash$ arm-elf-gcc -nostdlib foo2.o foo1.o
/samantha/gnu-pure/rel/lib/gcc-lib/arm-elf/3.4/../../../../arm-elf/bin/l
d: ERROR: foo1.o uses hardware FP, whereas a.out uses software FP
This line in gcc/config/arm/elf.h
#ifndef SUBTARGET_ASM_FLOAT_SPEC
#define SUBTARGET_ASM_FLOAT_SPEC "\
%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
#endif
I think that this is the problem. If you apply the patch below for example, then arm-elf targets will always pass -mfpu=softfpa to GAS, unless -mhard-float is specfied, whereas the arm-linux toolchain will always pass an explicit -mfpu=fpa unless -msoft-float is specified.
What do you think ?
Cheers Nick
gcc/ChangeLog 2003-07-23 Nick Clifton <nickc@redhat.com>
* config/arm/elf.h (SUBTARGET_ASM_FLOAT_SPEC): Pass -mfpu=softfpa to GAS by default. * config/arm/linux-elf.h (SUBTARGET_ASM_FLOAT_SPEC): Define. Pass -mfpu=fpa to GAS by default.
Index: gcc/config/arm/elf.h ===================================================== ============ == RCS file: /cvs/gcc/gcc/gcc/config/arm/elf.h,v retrieving revision 1.44 diff -c -3 -p -r1.44 elf.h *** gcc/config/arm/elf.h 19 Jun 2003 21:47:06 -0000 1.44 --- gcc/config/arm/elf.h 23 Jul 2003 18:32:24 -0000 *************** *** 46,52 ****
#ifndef SUBTARGET_ASM_FLOAT_SPEC #define SUBTARGET_ASM_FLOAT_SPEC "\ ! %{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}" #endif
#ifndef ASM_SPEC --- 46,52 ----
#ifndef SUBTARGET_ASM_FLOAT_SPEC #define SUBTARGET_ASM_FLOAT_SPEC "\ ! %{mapcs-float:-mfloat} %{!mhard-float:-mfpu=softfpa} ! %{mhard-float:-mfpu=fpa}" #endif
#ifndef ASM_SPEC
Index: gcc/config/arm/linux-elf.h ===================================================== ============ == RCS file: /cvs/gcc/gcc/gcc/config/arm/linux-elf.h,v retrieving revision 1.40 diff -c -3 -p -r1.40 linux-elf.h *** gcc/config/arm/linux-elf.h 14 Jun 2003 17:11:57 -0000 1.40 --- gcc/config/arm/linux-elf.h 23 Jul 2003 18:32:24 -0000 *************** *** 40,45 **** --- 40,49 ---- #define MULTILIB_DEFAULTS \ { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+ #undef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC "\
+ %{mapcs-float:-mfloat} %{!msoft-float:-mfpu=fpa}
+ %{msoft-float:-mfpu=softfpa}"
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
/* The GNU C++ standard library requires that these macros be defined. */
------- End of forwarded message -------
I did something similar with my arm-elf tools some weeks ago and it definitely helped, the assembler needs to know the '-mfpu=softfpa' also in the default case, not only when '-msoft-float' was explicitly given!
Cheers, Kai
Best regards, Dai Yuwen
------ 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] |