我設法克雷婭察的ARM926EJ-S
我使用Debian的手臂上QEMU交叉編譯的ARMv5,但它創造V7二進制
arm-linux-gnueabi-gcc-4.4 -static -O -c -mcpu=arm926ej-s hello.c -o hello
[email protected]:/qemu-deb-squeeze/mnt/package# readelf -A hello
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM926EJ-S"
Tag_CPU_arch: v5TEJ
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3-D16
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_ABI_optimization_goals: Prefer Speed
Tag_DIV_use: Not allowed
的目標文件,但在Ubuntu時,我與我們的編譯 - 它創建的可執行文件爲armv7而不是這個
那麼如何編譯正確的CPU?
我試過$臂的Linux gnueabi-GCC-4.4 -static -mcpu = ARM926EJ-S的hello.c -o你好 它創建
Tag_CPU_name: 「7-A」
Tag_CPU_arch:V7
如何在編譯鏈接庫? –
你需要找到合適的工具鏈,這是最簡單的。 – auselen
這實際上是http://stackoverflow.com/questions/12963209/why-does-arm-linux-gnueabi-g-4-4-always-build-a-7-a-binary的副本,由@ auselen。 – unixsmurf