반응형
Notice
Recent Posts
Recent Comments
Link
Brise
cmake x86->arm cross compile script 본문
반응형
# this one is important
set(CMAKE_SYSTEM_NAME Linux)
# specify the cross compiler
set(CMAKE_C_COMPILER /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++)
# Name of archiving tool for static libraries
set(CMAKE_AR "/usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-ar" CACHE PATH "ARM Linux ar Program")
# where is the target environment (compiler and third-party)
set(CMAKE_FIND_ROOT_PATH <third-party library install path> /usr/local/angstrom/arm /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi)
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Instruction
# ccmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-linux-arm.cmake ../src
# make
# make install
# build example
# mkdir bldexamples
# cd bldexamples
# ccmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-linux-arm.cmake ../examples
# make
# make install
반응형
'Linux' 카테고리의 다른 글
임베디드 리눅스 GPIO 제어 방법 (0) | 2023.05.08 |
---|---|
vim 사용법 간단정리 (0) | 2023.04.13 |
Ubuntu 22.04에서 build-essential 설치 문제 해결하기 (0) | 2023.01.14 |
커널 구조 및 추적 교육 자료 (0) | 2022.06.21 |
Ubuntu 20.04 LTS에서 VS code 설치하기 (0) | 2020.10.24 |
Linux build- (Beagle Bone Black) (0) | 2020.10.19 |
콘솔모드 한글 입력 방법 (0) | 2020.03.13 |