forked from Simple-XX/SimpleKernel
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Zone.N <[email protected]>
- Loading branch information
Showing
9 changed files
with
117 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule optee_client
added at
648677
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,45 @@ | ||
|
||
# This file is a part of Simple-XX/SimpleKernel | ||
# (https://github.com/Simple-XX/SimpleKernel). | ||
# | ||
# | ||
# aarch64-gcc.cmake for Simple-XX/SimpleKernel. | ||
|
||
if (NOT UNIX) | ||
message(FATAL_ERROR "Only support Linux.") | ||
endif () | ||
IF(NOT UNIX) | ||
MESSAGE (FATAL_ERROR "Only support Linux.") | ||
ENDIF() | ||
|
||
IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64") | ||
FIND_PROGRAM (Compiler_gcc g++) | ||
IF(NOT Compiler_gcc) | ||
MESSAGE ( | ||
FATAL_ERROR "g++ not found.\n" | ||
"Run `sudo apt-get install -y gcc g++` to install.") | ||
ELSE() | ||
MESSAGE (STATUS "Found g++ ${Compiler_gcc}") | ||
ENDIF() | ||
|
||
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64") | ||
find_program(Compiler_gcc g++) | ||
if (NOT Compiler_gcc) | ||
message(FATAL_ERROR "g++ not found.\n" | ||
"Run `sudo apt-get install -y gcc g++` to install.") | ||
else () | ||
message(STATUS "Found g++ ${Compiler_gcc}") | ||
endif () | ||
elseif (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64") | ||
find_program(Compiler_gcc aarch64-linux-gnu-g++) | ||
if (NOT Compiler_gcc) | ||
message(FATAL_ERROR "aarch64-linux-gnu-g++ not found.\n" | ||
"Run `sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu` to install.") | ||
else () | ||
message(STATUS "Found aarch64-linux-gnu-g++ ${Compiler_gcc}") | ||
endif () | ||
SET (TOOLCHAIN_PREFIX32 arm-linux-gnueabihf-) | ||
ELSEIF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64") | ||
FIND_PROGRAM (Compiler_gcc aarch64-linux-gnu-g++) | ||
IF(NOT Compiler_gcc) | ||
MESSAGE ( | ||
FATAL_ERROR | ||
"aarch64-linux-gnu-g++ not found.\n" | ||
"Run `sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu` to install." | ||
) | ||
ELSE() | ||
MESSAGE (STATUS "Found aarch64-linux-gnu-g++ ${Compiler_gcc}") | ||
ENDIF() | ||
|
||
set(TOOLCHAIN_PREFIX aarch64-linux-gnu-) | ||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) | ||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) | ||
set(CMAKE_READELF ${TOOLCHAIN_PREFIX}readelf) | ||
set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) | ||
set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) | ||
set(CMAKE_NM ${TOOLCHAIN_PREFIX}nm) | ||
set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) | ||
set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) | ||
else () | ||
message(FATAL_ERROR "NOT support ${CMAKE_HOST_SYSTEM_PROCESSOR}") | ||
endif () | ||
SET (TOOLCHAIN_PREFIX aarch64-linux-gnu-) | ||
SET (CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) | ||
SET (CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) | ||
SET (CMAKE_READELF ${TOOLCHAIN_PREFIX}readelf) | ||
SET (CMAKE_AR ${TOOLCHAIN_PREFIX}ar) | ||
SET (CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) | ||
SET (CMAKE_NM ${TOOLCHAIN_PREFIX}nm) | ||
SET (CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) | ||
SET (CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) | ||
SET (TOOLCHAIN_PREFIX32 arm-linux-gnueabihf-) | ||
ELSE() | ||
MESSAGE (FATAL_ERROR "NOT support ${CMAKE_HOST_SYSTEM_PROCESSOR}") | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters