Skip to content

Commit ebbeedc

Browse files
Add armv7 and aarch64
1 parent f92150a commit ebbeedc

8 files changed

+76
-32
lines changed

.github/workflows/build-assimp.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
cfg:
23-
- { os: ubuntu-20.04, triple: linux-x64-clang7 }
24-
- { os: ubuntu-20.04, triple: linux-x64-gcc7 }
23+
- { os: ubuntu-20.04, triple: linux-x64-clang10 }
24+
- { os: ubuntu-20.04, triple: linux-x64-gcc9 }
25+
- { os: ubuntu-20.04, triple: linux-armv7-gcc9 }
26+
- { os: ubuntu-20.04, triple: linux-aarch64-gcc9 }
2527
- { os: windows-2022, triple: windows-x64-mingw64 }
2628
- { os: windows-2022, triple: windows-x64-msvc }
2729

.github/workflows/build-freeimage.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
cfg:
23-
- { os: ubuntu-20.04, triple: linux-x64-clang7 }
24-
- { os: ubuntu-20.04, triple: linux-x64-gcc7 }
23+
- { os: ubuntu-20.04, triple: linux-x64-clang10 }
24+
- { os: ubuntu-20.04, triple: linux-x64-gcc9 }
25+
- { os: ubuntu-20.04, triple: linux-armv7-gcc9 }
26+
- { os: ubuntu-20.04, triple: linux-aarch64-gcc9 }
2527
- { os: windows-2022, triple: windows-x64-mingw64 }
2628
- { os: windows-2022, triple: windows-x64-msvc }
2729

.github/workflows/build-libcurl.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
cfg:
23-
- { os: ubuntu-20.04, triple: linux-x64-clang7 }
24-
- { os: ubuntu-20.04, triple: linux-x64-gcc7 }
23+
- { os: ubuntu-20.04, triple: linux-x64-clang10 }
24+
- { os: ubuntu-20.04, triple: linux-x64-gcc9 }
25+
- { os: ubuntu-20.04, triple: linux-armv7-gcc9 }
26+
- { os: ubuntu-20.04, triple: linux-aarch64-gcc9 }
2527
- { os: windows-2022, triple: windows-x64-mingw64 }
2628
- { os: windows-2022, triple: windows-x64-msvc }
2729

.github/workflows/build-mbedtls.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
cfg:
23-
- { os: ubuntu-20.04, triple: linux-x64-clang7 }
24-
- { os: ubuntu-20.04, triple: linux-x64-gcc7 }
23+
- { os: ubuntu-20.04, triple: linux-x64-clang10 }
24+
- { os: ubuntu-20.04, triple: linux-x64-gcc9 }
25+
- { os: ubuntu-20.04, triple: linux-armv7-gcc9 }
26+
- { os: ubuntu-20.04, triple: linux-aarch64-gcc9 }
2527
- { os: windows-2022, triple: windows-x64-mingw64 }
2628
- { os: windows-2022, triple: windows-x64-msvc }
2729

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ This repository is the successor to [apothecary](https://github.com/openframewor
44

55
All packages are built and served completely automated with CI, so all you have to do is commit something and wait. The package is automatically built and uploaded into the latest Release.
66

7+
# Overview about architectures
8+
9+
Following architectures are supported:
10+
11+
|Architecture|Description|
12+
|-|-|
13+
|x64|Your typical PC architecture, synonymous to `x86_64` or `amd64`|
14+
|armv7|Typical 32-bit ARM architecture with Hardware-Float, synonymous to `aarch32`. Most RPI's use this, except for RPI Zero, which uses `armv6` and does not support Hardware-Float|
15+
|aarch64|64-bit ARM architecture, synonymous to `armv8`. RPI 4 and onwards support this architecture (with the correct OS).|
16+
17+
Currently, `armv6` is not provided as it is unlikely that anyone would want to run OpenFrameworks on a Raspberry PI Zero, as it has very limited processing power and is unlikely to be enough for an OpenFrameworks application anyways.
18+
719
## Hosted packages
820

921
All prebuilt binary packages can be found at:

scripts/tools.py

+36-24
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,43 @@ class LibraryBuilder:
1313
def __init__(self):
1414
self.triple = os.environ.get('TRIPLE')
1515

16-
# self.toolchain_file = ""
17-
if self.triple == "linux-x64-gcc7":
18-
self.compiler_id = "gcc7"
19-
self.cc_compiler = "gcc-7"
20-
self.cxx_compiler = "g++-7"
21-
self.cc_compiler_package = "gcc-7"
22-
self.cxx_compiler_package = "g++-7"
23-
elif self.triple == "linux-x64-clang7":
24-
self.compiler_id = "clang7"
25-
self.cc_compiler = "clang-7"
26-
self.cxx_compiler = "clang++-7"
27-
self.cc_compiler_package = "clang-7"
28-
self.cxx_compiler_package = "clang++-7"
16+
# All of this is only valid for ubuntu-20.04 and windows-2022
17+
if self.triple == "linux-x64-gcc9":
18+
self.cc_compiler = "gcc"
19+
self.cxx_compiler = "g++"
20+
self.cc_compiler_package = "gcc"
21+
self.cxx_compiler_package = "g++"
22+
self.toolchain_file = ""
23+
elif self.triple == "linux-x64-clang10":
24+
self.cc_compiler = "clang"
25+
self.cxx_compiler = "clang++"
26+
self.cc_compiler_package = "clang"
27+
self.cxx_compiler_package = "clang++"
28+
self.toolchain_file = ""
29+
elif self.triple == "linux-armv7-gcc9":
30+
self.cc_compiler = ""
31+
self.cxx_compiler = ""
32+
self.cc_compiler_package = "gcc-9-arm-linux-gnueabi"
33+
self.cxx_compiler_package = "g++-9-arm-linux-gnueabi"
34+
self.toolchain_file = "toolchains/gcc-armv7.cmake"
35+
elif self.triple == "linux-aarch64-gcc9":
36+
self.cc_compiler = ""
37+
self.cxx_compiler = ""
38+
self.cc_compiler_package = "gcc-9-aarch64-linux-gnu"
39+
self.cxx_compiler_package = "g++-9-aarch64-linux-gnu"
40+
self.toolchain_file = "toolchains/gcc-aarch64.cmake"
2941
elif self.triple == "windows-x64-mingw64":
30-
self.compiler_id = "mingw64"
3142
self.cc_compiler = "cc"
3243
self.cxx_compiler = "c++"
3344
self.cc_compiler_package = ""
3445
self.cxx_compiler_package = ""
46+
self.toolchain_file = ""
3547
elif self.triple == "windows-x64-msvc":
36-
self.compiler_id = "msvc"
37-
self.cc_compiler = ""
38-
self.cxx_compiler = ""
48+
self.cc_compiler = "msvc"
49+
self.cxx_compiler = "msvc"
3950
self.cc_compiler_package = ""
4051
self.cxx_compiler_package = ""
52+
self.toolchain_file = ""
4153
else:
4254
raise LookupError(f"Triple {self.triple} is not known to the system")
4355

@@ -129,12 +141,12 @@ def build_generic_cmake_project(self,
129141
cmake_args_debug = [],
130142
cmake_args_release = []):
131143

132-
# if self.toolchain_file != None and self.toolchain_file != "":
133-
# cmake_args.append(f'-DCMAKE_TOOLCHAIN_FILE={os.path.join(self.repo_dir, self.toolchain_file)}')
134-
# else:
135-
if self.compiler_id != 'msvc':
136-
cmake_args.append(f'-DCMAKE_C_COMPILER={self.cc_compiler}')
137-
cmake_args.append(f'-DCMAKE_CXX_COMPILER={self.cxx_compiler}')
144+
if self.toolchain_file != None and self.toolchain_file != "":
145+
cmake_args.append(f'-DCMAKE_TOOLCHAIN_FILE={os.path.join(self.repo_dir, self.toolchain_file)}')
146+
else:
147+
if self.cc_compiler != 'msvc':
148+
cmake_args.append(f'-DCMAKE_C_COMPILER={self.cc_compiler}')
149+
cmake_args.append(f'-DCMAKE_CXX_COMPILER={self.cxx_compiler}')
138150

139151
cmake_args.append(f'-DBUILD_SHARED_LIBS=OFF')
140152
cmake_args.append(f'-DPython_ROOT_DIR={os.path.dirname(sys.executable)}')
@@ -160,7 +172,7 @@ def build_generic_cmake_project(self,
160172
args_release.append(' '.join(cmake_args_release))
161173

162174
cmake_build_args = []
163-
if self.compiler_id != 'msvc':
175+
if self.cc_compiler != 'msvc':
164176
cmake_build_args.append(f'-j{os.cpu_count()}')
165177

166178
log(f'Building Debug configuration ...')

toolchains/gcc-aarch64.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set(CMAKE_SYSTEM_NAME Linux)
2+
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
3+
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
4+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
5+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
6+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

toolchains/gcc-armv7.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set(CMAKE_SYSTEM_NAME Linux)
2+
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
3+
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
4+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
5+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
6+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

0 commit comments

Comments
 (0)