Debian
交叉編譯軟體模組
我正在嘗試使用 GNU ARM 工具鏈編譯dropbear 。我已經閱讀了本指南並成功建構了所有必需的工具。
它們位於一個目錄中:
/home/tester/Misc/gnuarm/install $ ls arm-none-eabi bin include lib libexec share $ ls bin/ arm-none-eabi-addr2line arm-none-eabi-c++filt arm-none-eabi-gcc arm-none-eabi-gcc-ranlib arm-none-eabi-ld.bfd arm-none-eabi-ranlib arm-none-eabi-strip arm-none-eabi-ar arm-none-eabi-cpp arm-none-eabi-gcc-4.8.2 arm-none-eabi-gcov arm-none-eabi-nm arm-none-eabi-readelf arm-none-eabi-as arm-none-eabi-elfedit arm-none-eabi-gcc-ar arm-none-eabi-gprof arm-none-eabi-objcopy arm-none-eabi-size arm-none-eabi-c++ arm-none-eabi-g++ arm-none-eabi-gcc-nm arm-none-eabi-ld arm-none-eabi-objdump arm-none-eabi-strings $ ls lib/ gcc libiberty.a
如何配置 dropbear 以在建構時使用 GNU ARM 工具?
我相信您需要做的就是:
- 將編譯器二進製文件添加到您的路徑。
export PATH="/home/tester/Misc/gnuarm/install/bin:$PATH"
configure
使用正確的交叉編譯選項在 Dropbear 源目錄中 執行。./configure --host=arm-none-eabi
- 按照
INSTALL
指南繼續編譯。**注意:**如果您確實有任何
--build
因缺少選項而導致的問題,您可以添加它。只需執行gcc -dumpmachine
以返回目前建構機器的平台,然後將其作為參數提供給configure
.例如,如果
gcc -dumpmachine
返回x86_64-linux-gnu
執行./configure --build=x86_64-linux-gnu --host=arm-none-eabi