Skip to content

Commit

Permalink
Merge pull request linuxboot#657 from MrChromebox/fix-librem-hotp
Browse files Browse the repository at this point in the history
libremkey-hotp-verification: toolchain adjustments
  • Loading branch information
tlaurion committed Jan 28, 2020
2 parents ceda2d3 + ad2395d commit 4977650
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions modules/libremkey-hotp-verification
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ libremkey-hotp-verification_output := \

libremkey-hotp-verification_configure := \
INSTALL="$(INSTALL)" \
CROSS="$(CROSS)" \
cmake -DCMAKE_TOOLCHAIN_FILE=./Toolchain-heads.cmake -DCMAKE_AR="$(CROSS)ar" .
17 changes: 13 additions & 4 deletions patches/libremkey-hotp-verification.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
--- nitrokey-hotp-verification-a/Toolchain-heads.cmake 2018-05-22 09:55:46.907209235 -0700
+++ nitrokey-hotp-verification-b/Toolchain-heads.cmake 2018-05-22 09:55:26.659371966 -0700
@@ -0,0 +1,18 @@
@@ -0,0 +1,27 @@
+SET(CMAKE_SYSTEM_NAME Linux)
+SET(CMAKE_SYSTEM_VERSION 1)
+
+# Specify the cross compiler
+SET(CMAKE_C_COMPILER $ENV{INSTALL}/bin/musl-gcc)
+SET(CMAKE_CXX_COMPILER $ENV{INSTALL}/bin/musl-gcc)
+SET(CMAKE_C_COMPILER $ENV{CROSS}gcc)
+SET(CMAKE_CXX_COMPILER $ENV{CROSS}gcc)
+
+#sysroot location
+set(MYSYSROOT $ENV{INSTALL})
+
+# compiler/linker flags
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=${MYSYSROOT}" CACHE INTERNAL "" FORCE)
+set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --sysroot=${MYSYSROOT}" CACHE INTERNAL "" FORCE)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=${MYSYSROOT}" CACHE INTERNAL "" FORCE)
+set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} --sysroot=${MYSYSROOT}" CACHE INTERNAL "" FORCE)
+
+# Where is the target environment
+SET(CMAKE_FIND_ROOT_PATH $ENV{INSTALL})
+SET(CMAKE_FIND_ROOT_PATH "${MYSYSROOT}")
+
+# Search for programs only in the build host directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
Expand Down

0 comments on commit 4977650

Please sign in to comment.