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]

Re: GCC with Cortex-M4 hard float link error "X uses VFP register arguments, Y does not"


Hi Matt,

On 22.08.2012 17:37, Matthew Gretton-Dann wrote:

>> I'm guessing it's trying to link newlib stuff in from the libcrt* which
>> might not be compiled with hard float, can that be correct? Then why
>> would gcc's multilib show the correct strings? Could somebody please
>> explain to me what I'm doing wrong?
> 
> A couple of questions which may help diagnose the issue:
> 
> 1) How have you configured GCC? (What does gcc -v show?)

Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/home/joe/bin/arm/libexec/gcc/arm-none-eabi/4.7.1/lto-wrapper
Target: arm-none-eabi
Configured with: ../configure --prefix=/home/joe/bin/arm/
--enable-interwork --enable-multilib --with-newlib
--with-headers=/tmp/newlib-1.19.0/newlib/libc/include
--target=arm-none-eabi --disable-nls --disable-shared --disable-threads
--with-gnu-ld --with-gnu-as --disable-libssp --disable-libmudflap
--disable-libgomp --with-dwarf2 -v --disable-werror --with-cpu=cortex-m3
--with-cpu=cortex-m4 --with-tune=cortex-m3 --with-tune=cortex-m4
--with-mode=thumb --enable-target-optspace --with-float=hard
--with-float=soft --enable-languages=c,c++
Thread model: single
gcc version 4.7.1 (GCC)


> 2) What does the following command say is the directory in use?
> 
>   arm-none-eabi-gcc -Wall -O2 -g -mcpu=cortex-m4 -mfloat-abi=hard -mthumb \
>       -std=c99 -c -o foo.o foo.c -print-multi-directory

This shows surprisingly little (only the CWD):
.

Also, if it is helpful, I've configured newlib like this:

./configure --target=arm-none-eabi --prefix='/home/joe/bin/arm/'
--disable-interwork --enable-thumb --enable-multilib --disable-libssp
--disable-nls --disable-newlib-supplied-syscalls

Best regards,
Joe



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