From 20405a51723745ce346c7fa308378a29e487356c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Helmke?= Date: Wed, 29 Mar 2023 11:37:30 +0200 Subject: [PATCH] linux-mips-uclibc: add Toolchain.cmake --- linux-mips-uclibc/Toolchain.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 linux-mips-uclibc/Toolchain.cmake diff --git a/linux-mips-uclibc/Toolchain.cmake b/linux-mips-uclibc/Toolchain.cmake new file mode 100644 index 0000000..85c81f0 --- /dev/null +++ b/linux-mips-uclibc/Toolchain.cmake @@ -0,0 +1,20 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR mips) + +set(cross_triple $ENV{CROSS_TRIPLE}) +set(cross_root $ENV{CROSS_ROOT}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-mips)