Skip to content

Commit 50ad283

Browse files
authored
Build binary for Ostro Linux platform with Travis CI. (#30)
1 parent 6db82d5 commit 50ad283

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ before_script:
3333
- cp ./source/main/testkit-stub ../dest/arm/
3434
- rm -rf *
3535

36+
# build for ostro
37+
- ../tools/install_ostro_sdk.sh
38+
- cmake -D CMAKE_TOOLCHAIN_FILE=../ostro_toolchain.cmake ..
39+
- make
40+
- cp ./source/main/testkit-stub ../dest/ostro/
41+
- rm -rf *
42+
3643
# build for Win32 with MinGW
3744
- ../tools/prepare_pthread.sh
3845
- cmake -D win32=ON -D GNU_HOST=i686-w64-mingw32 -D CMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake ..

dest/ostro/ostro_dest

Whitespace-only changes.

ostro_toolchain.cmake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# this one is important
2+
SET(CMAKE_SYSTEM_NAME Linux)
3+
4+
# specify the cross compiler
5+
SET(CMAKE_C_COMPILER "/usr/local/ostroxt-x86_64/sysroots/x86_64-ostroxtsdk-linux/usr/bin/x86_64-ostro-linux/x86_64-ostro-linux-clang")
6+
SET(CMAKE_CXX_COMPILER "/usr/local/ostroxt-x86_64/sysroots/x86_64-ostroxtsdk-linux/usr/bin/x86_64-ostro-linux/x86_64-ostro-linux-clang++")
7+
8+
# where is the target environment
9+
SET(CMAKE_FIND_ROOT_PATH /usr/local/ostroxt-x86_64/sysroots/corei7-64-ostro-linux)
10+
11+
# search for programs in the build host directories
12+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
13+
# for libraries and headers in the target directories
14+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
15+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
16+
17+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian -lpthread")
18+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian -lpthread")

tools/install_ostro_sdk.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
wget https://download.ostroproject.org/releases/ostro-os-xt/milestone/v1.0.0/sdk/intel-corei7-64/ostroxt-x86_64-corei7-64-toolchain-1.0+snapshot.sh
4+
5+
chmod a+x ostroxt-x86_64-corei7-64-toolchain-1.0+snapshot.sh
6+
7+
./ostroxt-x86_64-corei7-64-toolchain-1.0+snapshot.sh -y >/dev/null 2>&1

0 commit comments

Comments
 (0)