[freebsd] Кросс компилиция для arm

Nick Kostirya nikolay.kostirya at i11.co
Thu Sep 5 20:49:17 EEST 2019


Привет.
Подскажите, пожалуйста, как на FreeBSD 11.2 amd64 скомпилировать бинарник для FreeBSD-11.2-RELEASE-arm-armv6-BANANAPI.img.xz ?

Пробую при помощи clang так:
mdconfig -a -t vnode -u 0 -f FreeBSD-11.2-RELEASE-arm-armv6-BANANAPI.img
mount /dev/md0s2a  /mnt/
cc -target armv6-freebsd-eabi 1.c --sysroot /mnt -v

И получаю следующую ошибку:

FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
Target: armv6--freebsd-eabi
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/cc" -cc1 -triple armv6kz--freebsd-eabi -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name 1.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu arm1176jzf-s -target-feature +soft-float -target-feature +soft-float-abi -target-feature -neon -target-feature -crypto -target-feature +strict-align -target-abi aapcs -msoft-float -mfloat-abi soft -fallow-half-arguments-and-returns -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib/clang/6.0.0 -isysroot /mnt -fdebug-compilation-dir /home/nick/FreeBSD/arm -ferror-limit 19 -fmessage-length 144 -fno-signed-char -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/1-bc2ddd.o -x c 1.c
clang -cc1 version 6.0.0 based upon LLVM 6.0.0 default target x86_64-unknown-freebsd11.2
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/6.0.0/include
 /mnt/usr/include
End of search list.
 "/usr/bin/ld" --sysroot=/mnt --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --enable-new-dtags -o a.out /mnt/usr/lib/crt1.o /mnt/usr/lib/crti.o /mnt/usr/lib/crtbegin.o -L/mnt/usr/lib /tmp/1-bc2ddd.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /mnt/usr/lib/crtend.o /mnt/usr/lib/crtn.o
/mnt/usr/lib/crt1.o: file not recognized: File format not recognized
cc: error: linker command failed with exit code 1 (use -v to see invocation)




More information about the freebsd mailing list