C/ c++ Cyanogenmod如何使用不同版本的工具链编译内核
C/C++ Cyanogenmod How to compile kernel using different version of toolchain?
我正在尝试编译Cyanogenmod 13的内核。我得到错误
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
我在这里读到的。我需要用4.7编译我的内核。我如何在cyanogenmod构建期间选择工具链的版本??
我认为您需要设置gcc版本4.7并使用CC变量将其设置为编译器。例如:make target CC=/bin/gcc4.7
更多信息在这里和这里
感谢@nopasara和他的宝贵意见。
所以我做了一些进一步的研究,发现内核兼容arm-eabi tool chain
而不是arm-linux-androideabi
工具链。下面是我使用的命令
export PATH=$PATH:~/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-eabi-4.7/bin/ && export ARCH=arm && export SUBARCH=arm && export CROSS_COMPILE=arm-linux-eabi- && make msm8226_defconfig O=~/android/system/out/target/product/E6790/obj/KERNEL_OBJ
和
make O=~/android/system/out/target/product/E6790/obj/KERNEL_OBJ zImage -j4
要使用Cyanogenmod,请将以下行添加到BoardConfig.mk
TARGET_KERNEL_CROSS_COMPILE_PREFIX := arm-eabi-
或者使用
export TARGET_LEGACY_GCC_VERSION=4.7
或者编辑~/android/system/build/core/combo/TARGET_linux-arm。Mk和set version
$(combo_2nd_arch_prefix)TARGET_LEGACY_GCC_VERSION := 4.7
相关文章:
- 为cl.exe(Visual Studio代码)指定命令行C++版本
- 导入库可以跨dll版本工作吗
- 在调用FreeLibrary后,释放动态链接到具有相同版本的CRT堆的DLL的内存
- 在clang++预处理器中确定gcc工具链版本
- 选择特定版本的 Visual Studio 命令行工具包,并根据特定版本的C++运行时环境编译文件
- AWS 开发工具包 C++ 代码不适用于发布版本
- .vcxproj 和 .vcxproj.filters 中的工具版本之间的差异
- 包括通过CMAKE工具链正确版本的STL标题
- 我已安装的GCC版本是我已安装的RedHat开发人员工具集的背后
- 如何将较新的perf工具前端与旧perf版本的记录一起使用
- 如何在没有 nvcc 的情况下在编译时获取 CUDA 工具包版本?
- 在没有第三方工具/项目的情况下,在 MFC C++发布版本中查找内存泄漏
- MFC:如何在旧版 MFC 版本 6 中保存工具栏的位置
- 如何设置默认的Windows工具包(SDK)版本
- C/ c++ Cyanogenmod如何使用不同版本的工具链编译内核
- 增强构建显示默认工具集和版本
- 用于比较给定两个源代码文件的同一c++函数的两个版本的工具
- 将Xcode 3和Xcode 4工具链转化为可并行使用的版本包
- Xcode 4中的命令行工具构建版本,在构建可执行文件中包含图像存在问题
- 用于确定c++代码使用的Win32 api版本的工具