From d6228fecb8357a5effc3b32d4a34d53b427a9b3c Mon Sep 17 00:00:00 2001 From: Catalin Toda Date: Wed, 7 Jun 2023 03:15:18 -0700 Subject: [PATCH] Use clang for arm/x86 with static binary and zig cc for mips #1107 --- .github/workflows/binaries.yml | 12 ++++++------ src/Makefile.in | 7 ++++--- src/netceiver.c | 1 + src/netceiver.h | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 3973779cf9..a2b9d536fd 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -1,9 +1,9 @@ name: Binaries on: push: - branches: [ master ] + branches: [ master, next ] pull_request: - branches: [ master ] + branches: [ master, next ] jobs: build: @@ -16,14 +16,14 @@ jobs: fetch-depth: '0' - name: Build x64 run: | - ./configure --enable-static + ./configure --enable-static CC="clang" make DDCI=1 zip -9 -r /minisatip_x64.zip minisatip html - name: Build ARM run: | make clean - ./configure --enable-static --host=arm-linux-gnueabihf + ./configure --enable-static --host=arm-linux-gnueabihf CC="clang -target arm-linux-gnueabihf" make zip -9 -r /minisatip_arm.zip minisatip html @@ -37,8 +37,8 @@ jobs: - name: Build MIPS run: | make clean - ./configure --enable-static --host=mipsel-tuxbox-linux-gnu - make + ./configure --enable-static --host=mipsel-linux-gnu CC="zig cc -target mipsel-linux-gnueabihf.2.34" + make EXTRA_CFLAGS="-I/sysroot/mipsel/include -L/sysroot/mipsel/lib" zip -9 -r /minisatip_mips.zip minisatip html diff --git a/src/Makefile.in b/src/Makefile.in index 634b0ba5dd..79ff4da970 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -106,7 +106,7 @@ endif ifeq ($(NETCVCLIENT),1) SOURCES+=netceiver.c -LDFLAGS+=-lmcli -lxml2 +LDFLAGS+=-lnetceiver -lxml2 else CFLAGS+=-DDISABLE_NETCVCLIENT endif @@ -138,9 +138,10 @@ CFLAGS-$(DEBUG) += -fsanitize=address -fno-omit-frame-pointer -fsanitize=leak -f ifeq ($(STATIC),1) -LDFLAGS+=$(addsuffix .a,$(addprefix -l:lib,$(LIBS))) + CFLAGS+=-static + LDFLAGS+=$(addsuffix .a,$(addprefix -l:lib,$(LIBS))) else -LDFLAGS+=$(addprefix -l,$(LIBS)) + LDFLAGS+=$(addprefix -l,$(LIBS)) endif SOURCES+=$(SOURCES-1) diff --git a/src/netceiver.c b/src/netceiver.c index 2a8902d7ff..90b4705022 100644 --- a/src/netceiver.c +++ b/src/netceiver.c @@ -28,6 +28,7 @@ #include #include #include +#include "utils/alloc.h" #define DEFAULT_LOG LOG_NETCEIVER diff --git a/src/netceiver.h b/src/netceiver.h index 2fdc6ece3a..c6521ab8e8 100644 --- a/src/netceiver.h +++ b/src/netceiver.h @@ -6,7 +6,7 @@ #define API_SOCK #ifndef DISABLE_LINUXDVB #undef AOT_CA_PMT -#include "headers.h" +#include "libnetceiver/netcv/headers.h" #else #include "netceiver_mcli_defs.h" #endif