Skip to content

Commit

Permalink
Use clang for arm/x86 with static binary and zig cc for mips #1107
Browse files Browse the repository at this point in the history
  • Loading branch information
Catalin Toda committed Jun 20, 2023
1 parent a9bbd6d commit d6228fe
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Binaries
on:
push:
branches: [ master ]
branches: [ master, next ]
pull_request:
branches: [ master ]
branches: [ master, next ]

jobs:
build:
Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ endif

ifeq ($(NETCVCLIENT),1)
SOURCES+=netceiver.c
LDFLAGS+=-lmcli -lxml2
LDFLAGS+=-lnetceiver -lxml2
else
CFLAGS+=-DDISABLE_NETCVCLIENT
endif
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/netceiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "utils/alloc.h"

#define DEFAULT_LOG LOG_NETCEIVER

Expand Down
2 changes: 1 addition & 1 deletion src/netceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6228fe

Please sign in to comment.