Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22268

sorry, unimplemented: Thumb-1 ‘hard-float’ VFP ABI - arm-linux-gnueabihf-gcc - targeting armv6

$
0
0

Example code (people seem to require it no matter what the question is):

#include <stdio.h>int main() {    printf("Hello, World!\n");    return 0;}

The actual problem I have is I am trying to cross compile for armv6 (Raspberry PI Zero V1) from Ubuntu x86 64bit (WSL). The project I am trying to compile is Node.js, but I can reproduce the error with the simple file above.

To set the architecture I have tried both -march=armv6+fp (my CPU does have a HW floating point compute) and also the more specific -mcpu=arm1176jzf-s. I am forcing these for compilation because otherwise the arm-linux-gnueabihf-gcc defaults to target armv7, which won't work on my raspberry.

This is my test script for compiling. test.c refers to the code above.

OUT_PATH=./test.oC_FILE_PATH=./test.c# I don't know what this is, I got it from verbose output of my failing buildRAW_FILE_PATH=./test.rawarm-linux-gnueabihf-gcc -march=armv6+fp -o $OUT_PATH $C_FILE_PATH  -pthread -Wall -Wextra -Wno-unused-parameter -Wa,--noexecstack -Wall -O3 -pthread -Wall -O3 -Wno-missing-field-initializers -Wno-old-style-declaration -O3 -fno-omit-frame-pointer  -MMD -MF $RAW_FILE_PATH -c

This is my full output:

ME@COMPUTER:/mnt/e/test-armv6-compile$ ./compile.shIn file included from /usr/arm-linux-gnueabihf/include/stdio.h:976,                 from ./test.c:1:/usr/arm-linux-gnueabihf/include/bits/stdio.h: In function ‘getchar’:/usr/arm-linux-gnueabihf/include/bits/stdio.h:48:1: sorry, unimplemented: Thumb-1 ‘hard-float’ VFP ABI   48 | {      | ^

Output of arm-linux-gnueabihf-gcc -v:

ME@COMPUTER:/mnt/e/test-armv6-compile$ arm-linux-gnueabihf-gcc -vUsing built-in specs.COLLECT_GCC=arm-linux-gnueabihf-gccCOLLECT_LTO_WRAPPER=/usr/libexec/gcc-cross/arm-linux-gnueabihf/13/lto-wrapperTarget: arm-linux-gnueabihfConfigured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a+fp --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include --with-build-config=bootstrap-lto-lean --enable-link-serialization=2Thread model: posixSupported LTO compression algorithms: zlib zstdgcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04)

I find it odd that the HW floating point was not supported by the compiler at all, since I have used gcc to target android ARMs with no issue. What is my mistake? How can I compile the sample above to run on ARMv6?


Viewing all articles
Browse latest Browse all 22268

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>