Linking error: "*Output file* uses VFP register arguments, *library *does not"(cross compiler for ARM, Cortex-M3)

knauf kaizer.rtk@gmail.com
Tue Jan 28 16:56:00 GMT 2014


Hello,

I have build myself a gcc cross compiler with all the necessary tools
(naturally with 'binutils' and 'newlib') . During the linking process I have
"*Output file* uses VFP register arguments, *library *does not" type error.
During my searches for a solution I've noticed that this kind of error
happened to everyone trying to use the hard FPU unit for computations. But
this is not my case. I'm trying to create a code for the Cortex-M3 MCU,
without any use of hard FPU unit. During compilation and linking process I
was constantly passing '-mcpu=cortex-m3', '-mthumb' and '-mfloat-abi=soft'
without any success. From a discussion  here
<http://gcc.1065356.n5.nabble.com/GCC-with-Cortex-M4-hard-float-link-error-quot-X-uses-VFP-register-arguments-Y-does-not-quot-td862997.html>  
it seems that this is a multilib issue. Using appropriate compiling options
I found that by default there are two libraries: "thumb" and  "fpu". So this
should be the case - gcc constantly uses "fpu" library despite my every
effort to stop its use. Am I right? And if I'm right, what should I do? What
kind of options should I pass to the compiler/linker? Bellow is the list of
compiling and linking options:

CFLAGS= -Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wstrict-prototypes -Wundef -Wshadow -g \
-fno-common -mcpu=cortex-m3 -mthumb -mfloat-abi=soft \
-MD
LDFLAGS=--static -lc -lnosys -T tut.ld -nostartfiles -Wl,--gc-sections \
-lm -mcpu=cortex-m3 -mthumb -mfloat-abi=soft \
-Wl,-Map=tut.map



--
View this message in context: http://gcc.1065356.n5.nabble.com/Linking-error-Output-file-uses-VFP-register-arguments-library-does-not-cross-compiler-for-ARM-Cortex-tp1006486.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list