Skip to content

Commit eb7f45b

Browse files
committed
use our own musl toolchain
1 parent 73c0f68 commit eb7f45b

1 file changed

Lines changed: 4 additions & 19 deletions

File tree

build/musl.mk

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
## Initialize build defaults
22
include build/init.mk
33

4-
BUILD_DEPS := apply-patches milagro lua54 embed-lua mlkem \
5-
quantum-proof ed25519-donna longfellow-zk zstd
6-
7-
COMPILER := musl-gcc
4+
COMPILER := /opt/musl-cross-dyne/bin/x86_64-linux-musl-gcc
5+
COMPILER_CXX := /opt/musl-cross-dyne/bin/x86_64-linux-musl-g++
86

97
cflags += -static -std=gnu99 -fPIC -D'ARCH="MUSL"' -D__MUSL__ -DARCH_MUSL
108
ldflags += -static
119
system := Linux
1210

13-
ldadd := ${pwd}/lib/lua54/src/liblua.a
14-
ldadd += ${milib}/libamcl_curve_${ecp_curve}.a
15-
ldadd += ${milib}/libamcl_pairing_${ecp_curve}.a
16-
ldadd += ${milib}/libamcl_curve_${ecdh_curve}.a
17-
ldadd += ${milib}/libamcl_rsa_2048.a ${milib}/libamcl_rsa_4096.a
18-
ldadd += ${milib}/libamcl_x509.a
19-
ldadd += ${milib}/libamcl_core.a
20-
ldadd += ${pwd}/lib/pqclean/libqpz.a
21-
ldadd += ${pwd}/lib/ed25519-donna/libed25519.a
22-
ldadd += ${pwd}/lib/mlkem/test/build/libmlkem.a
23-
ldadd += ${pwd}/lib/longfellow-zk/liblongfellow-zk.a
24-
ldadd += ${pwd}/lib/zstd/libzstd.a
25-
2611
# activate CCACHE etc.
2712
include build/plugins.mk
2813

@@ -33,12 +18,12 @@ deps: ${BUILD_DEPS}
3318
cli_sources := src/cli-zenroom.o src/repl.o
3419
zenroom: ${ZEN_SOURCES} ${cli_sources}
3520
$(info === Building the zenroom CLI)
36-
${zenroom_cc} ${cflags} ${ZEN_SOURCES} ${cli_sources} \
21+
${cxx} ${cflags} ${ZEN_SOURCES} ${cli_sources} \
3722
-o $@ ${ldflags} ${ldadd}
3823

3924
zencode-exec: ${ZEN_SOURCES} src/zencode-exec.o
4025
$(info === Building the zencode-exec utility)
41-
${zenroom_cc} ${cflags} ${ZEN_SOURCES} src/zencode-exec.o \
26+
${cxx} ${cflags} ${ZEN_SOURCES} src/zencode-exec.o \
4227
-o $@ ${ldflags} ${ldadd}
4328

4429
include build/deps.mk

0 commit comments

Comments
 (0)