public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Linking error: "*Output file* uses VFP register arguments, *library *does not"(cross compiler for ARM, Cortex-M3)
@ 2014-01-28 16:56 knauf
  0 siblings, 0 replies; only message in thread
From: knauf @ 2014-01-28 16:56 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-28 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-28 16:56 Linking error: "*Output file* uses VFP register arguments, *library *does not"(cross compiler for ARM, Cortex-M3) knauf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).