ARM Linking Arguments
Joel Sherrill
joel@rtems.org
Tue Mar 26 23:21:12 GMT 2024
Hi
I am trying to compile some test code for an odd ARM with single precision.
I think I have successfully compiled a toolchain with libraries with only
32 bit float. But I think there need to be some arguments on the link that
gcc may not be passing through.
The CPU flags are "c -mcpu=cortex-m7 -mthumb -mlittle-endian
-mfloat-abi=hard -mfpu=fpv5-sp-d16 -march=armv7e-m+fpv5"
Based on the output, I think ld has a different idea of what the executable
"main" should be from what the input objects are.
Any thoughts on what would be a way to correct this?
/home/joel/test-gcc/install-arm-eabi//bin/arm-rtems6-gcc -mcpu=cortex-m7
-mthumb -mlittle-endian -mfloat-abi=hard -mfpu=fpv5-sp-d16
-march=armv7e-m+fpv5 -c -o main.o main.c
/home/joel/test-gcc/install-arm-eabi//bin/arm-rtems6-gcc -mcpu=cortex-m7
-mthumb -mlittle-endian -mfloat-abi=hard -mfpu=fpv5-sp-d16
-march=armv7e-m+fpv5 -c -o crunch_f32.o crunch_f32.c
/home/joel/test-gcc/install-arm-eabi//bin/arm-rtems6-gcc -mcpu=cortex-m7
-mthumb -mlittle-endian -mfloat-abi=hard -mfpu=fpv5-sp-d16
-march=armv7e-m+fpv5 -c -o crunch_f64.o crunch_f64.c
/home/joel/test-gcc/install-arm-eabi//bin/arm-rtems6-gcc -mcpu=cortex-m7
-mthumb -mlittle-endian -mfloat-abi=hard -mfpu=fpv5-sp-d16
-march=armv7e-m+fpv5 -o main main.o crunch_f32.o crunch_f64.o
/home/joel/test-gcc/install-arm-eabi/lib/gcc/arm-rtems6/12.3.1/../../../../arm-rtems6/bin/ld:
error: main.o uses VFP register arguments, main does not
/home/joel/test-gcc/install-arm-eabi/lib/gcc/arm-rtems6/12.3.1/../../../../arm-rtems6/bin/ld:
failed to merge target specific data of file main.o
Thanks.
--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20240326/ab16d13d/attachment-0001.htm>
More information about the Binutils
mailing list