This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Specifying VPF instructions for ARM?


I'm using GCC to cross compile code for ARM but am running into trouble with floating point formats. The ARM architecture seems to have two kinds of instructions for floating point emulation, VFP and FPA, and these cannot be mixed within an executable. Some versions of GCC seem to produce one kind and some produce the other. This proves to be a problem when attempting to link libraries and executable object files created with different GCC installations.

I have studied the description of ARM specific GCC options in the texinfo page and searched both google and the gcc-help list archives. Nothing I've found seems to indicate how to ask GCC to use a particular floating point format. Have I missed something? Is there an option one can pass to configure when building the cross compiler that will choose one format or the other? Any suggestions would be appreciated.

I use the same CFLAGS for compiling object files for the library and the executable, but different GCC versions. The errors occur at link time and look like this:

xscale-elf-gcc -O3 -Wall -Wpointer-arith -Wwrite-strings \
-Wstrict-prototypes -Wmissing-prototypes -Werror \
-mapcs-32 -msoft-float -mlittle-endian -mcpu=strongarm \
-nostdinc -fno-builtin \
-I/path/to/headers -I. -o program.o -c ./program.c
xscale-elf-gcc -O3 -Wall -Wpointer-arith -Wwrite-strings \
-Wstrict-prototypes -Wmissing-prototypes -Werror \
-mapcs-32 -msoft-float -mlittle-endian -mcpu=strongarm \
-nostdinc -fno-builtin \
-I/path/to/headers -I. -o utilities.o -c ./utilities.c
xscale-elf-ld -warn-common -nostdlib -Ttext 0x800000 -Tdata 0x900000 \
-o program.elf program.o utilities.o \
/path/to/libs/libsomething.a
xscale-elf-ld: ERROR: /path/to/libs/libsomething.a(one.o) uses VFP instructions, whereas program.elf does not
File format not recognized: failed to merge target specific data of file /path/to/libs/libsomething.a(one.o)
xscale-elf-ld: ERROR: /path/to/libs/libsomething.a(two.o) uses VFP instructions, whereas program.elf does not
File format not recognized: failed to merge target specific data of file /path/to/libs/libsomething.a(two.o)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]