我想使用 GCC Linaro 工具链 7.4.1 版在 Windows 主机上构建一个 ARM 应用程序(只是一个简单的主要功能)。编译正常,我的 .o 文件已创建,但在链接步骤中出现以下错误(在不同的计算机上测试,结果相同)
错误从 locale.o 文件开始...但是 /home/tcwg-builds/.. 目录与我的计算机路径无关...
构建目标:arm_cpp 调用:Cross G++ Linker arm-eabi-g++ -o "arm_cpp" ./src/arm_cpp.o
c:/users/yunus/desktop/linarotoolchain/gcc_linaro_7/bin/../lib/gcc/arm- eabi/7.4.1/../../../../arm-eabi/lib\libstdc++.a(locale.o): 在函数get_locale_cache_mutex':
/home/tcwg-buildslave/workspace/tcwg-make-release_0/snapshots/gcc.git~linaro-7.4-2019.02/libstdc++-v3/src/c++98/locale.cc:36: undefined reference to
__sync_synchronize' c:/users/yunus/desktop/linarotoolchain/gcc_linaro_7/ bin/../lib/gcc/arm-eabi/7.4.1/../../../../arm-eabi/lib\libstdc++.a(locale_init.o):在函数(anonymous namespace)::get_locale_mutex()':
/home/tcwg-buildslave/workspace/tcwg-make-release_0/snapshots/gcc.git~linaro-7.4-2019.02/libstdc++-v3/src/c++98/locale_init.cc:66: undefined reference to
__sync_synchronize'c中: /users/yunus/desktop/linarotoolchain/gcc_linaro_7/bin/../lib/gcc/arm-eabi/7.4.1/../../../../arm-eabi/lib\libstdc++.a( cxx11-ios_failure.o):在函数(anonymous namespace)::__io_category_instance()':
/home/tcwg-buildslave/workspace/tcwg-make-release_0/snapshots/gcc.git~linaro-7.4-2019.02/libstdc++-v3/src/c++11/cxx11-ios_failure.cc:73: undefined reference to
__sync_synchronize' collect2.exe 中:错误:ld 返回 1 退出状态 make:*** [arm_cpp] 错误 1 “make all”以退出代码 2 终止。构建可能不完整。