summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-13 05:29:27 +0000
committerSam James <sam@gentoo.org>2023-01-13 05:29:27 +0000
commitc5026603fbe974271937b3c0e5915926e36f316c (patch)
tree3cdb0ef9c57bfddeb4cbe1a8400418476638a796 /media-tv
parentsys-apps/file: Stabilize 5.44-r3 amd64, #890610 (diff)
downloadgentoo-c5026603fbe974271937b3c0e5915926e36f316c.tar.gz
gentoo-c5026603fbe974271937b3c0e5915926e36f316c.tar.bz2
gentoo-c5026603fbe974271937b3c0e5915926e36f316c.zip
media-tv/v4l-utils: fix build w/ clang+ssp
Closes: https://bugs.gentoo.org/889561 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/v4l-utils/files/v4l-utils-1.22.1-no-stack-protector-bpf.patch25
-rw-r--r--media-tv/v4l-utils/v4l-utils-1.22.1-r1.ebuild6
2 files changed, 30 insertions, 1 deletions
diff --git a/media-tv/v4l-utils/files/v4l-utils-1.22.1-no-stack-protector-bpf.patch b/media-tv/v4l-utils/files/v4l-utils-1.22.1-no-stack-protector-bpf.patch
new file mode 100644
index 000000000000..0ee28643ea1c
--- /dev/null
+++ b/media-tv/v4l-utils/files/v4l-utils-1.22.1-no-stack-protector-bpf.patch
@@ -0,0 +1,25 @@
+SSP doesn't make sense for BPF.
+
+https://bugs.gentoo.org/889561
+--- a/utils/keytable/Makefile.am
++++ b/utils/keytable/Makefile.am
+@@ -22,7 +22,7 @@ ir_keytable_LDFLAGS = $(ARGP_LIBS)
+
+ if WITH_BPF
+ ir_keytable_LDFLAGS += $(LIBELF_LIBS) $(LIBBPF_LIBS)
+-ir_keytable_CFLAGS = $(LIBBPF_CFLAGS)
++ir_keytable_CFLAGS = $(LIBBPF_CFLAGS) -fno-stack-protector
+ SUBDIRS = bpf_protocols
+ endif
+
+--- a/utils/keytable/bpf_protocols/Makefile.am
++++ b/utils/keytable/bpf_protocols/Makefile.am
+@@ -8,7 +8,7 @@ CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - </dev/null 2>&1 \
+ | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')
+
+ %.o: %.c bpf_helpers.h
+- $(CLANG) $(CLANG_SYS_INCLUDES) -D__linux__ -I$(top_srcdir)/include -target bpf -O2 -c $<
++ $(CLANG) $(CLANG_SYS_INCLUDES) -D__linux__ -I$(top_srcdir)/include -target bpf -O2 -fno-stack-protector -c $<
+
+ PROTOCOLS = grundig.o pulse_distance.o pulse_length.o rc_mm.o manchester.o xbox-dvd.o imon_rsc.o raw.o samsung36.o
+
diff --git a/media-tv/v4l-utils/v4l-utils-1.22.1-r1.ebuild b/media-tv/v4l-utils/v4l-utils-1.22.1-r1.ebuild
index 57f4e1a21e15..1294a25de248 100644
--- a/media-tv/v4l-utils/v4l-utils-1.22.1-r1.ebuild
+++ b/media-tv/v4l-utils/v4l-utils-1.22.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -45,6 +45,10 @@ BDEPEND="
# Not really prebuilt but BPF objects make our QA checks go crazy.
QA_PREBUILT="*/rc_keymaps/protocols/*.o"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.22.1-no-stack-protector-bpf.patch
+)
+
check_llvm() {
if [[ ${MERGE_TYPE} != binary ]] && use bpf; then
local clang=${ac_cv_prog_CLANG:-${CLANG:-clang}}