aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2024-07-22 16:03:13 -0400
committerMike Gilbert <floppym@gentoo.org>2024-07-22 16:08:09 -0400
commitb16cce4ad0cb04e407252ab2f37331cd4bf3b19d (patch)
tree8675471a0984e9025eb2f2855d0ce4fca8170883
parentci: make tests verbose (diff)
downloadpax-utils-b16cce4ad0cb04e407252ab2f37331cd4bf3b19d.tar.gz
pax-utils-b16cce4ad0cb04e407252ab2f37331cd4bf3b19d.tar.bz2
pax-utils-b16cce4ad0cb04e407252ab2f37331cd4bf3b19d.zip
make-seccomp-filters.sh: split cflags/ldflags for libseccomp
Resolves a link failure with -Wl,--as-needed. Thanks to Mathias Krause for noticing the problem. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rwxr-xr-xmake-seccomp-filters.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/make-seccomp-filters.sh b/make-seccomp-filters.sh
index 124646a..762670f 100755
--- a/make-seccomp-filters.sh
+++ b/make-seccomp-filters.sh
@@ -4,10 +4,12 @@ set -ufe
>&2 echo YOU DO NOT NEED TO RUN IT UNLESS YOU EDITED seccomp-bpf.c
: "${CC:=gcc}"
-: "${CCFLAGS:=$(pkg-config --cflags --libs libseccomp)}"
+: "${PKG_CONFIG:=pkg-config}"
+: "${SECCOMP_CFLAGS:=$(${PKG_CONFIG} --cflags libseccomp)}"
+: "${SECCOMP_LIBS:=$(${PKG_CONFIG} --libs libseccomp)}"
generator="$(mktemp)"
trap 'rm "${generator}"' EXIT
-"${CC}" -o "${generator}" -D_GNU_SOURCE ${CCFLAGS} seccomp-bpf.c && \
+${CC} -o "${generator}" -D_GNU_SOURCE ${SECCOMP_CFLAGS} ${CFLAGS-} ${LDFLAGS-} seccomp-bpf.c ${SECCOMP_LIBS} && \
"${generator}" > seccomp-bpf.h