summaryrefslogtreecommitdiffstats
path: root/rules/gst-libav1.make
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-05-09 09:56:03 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-05-09 09:59:06 +0200
commit693af4025d9f7d0c3e32d80a29416c132e646120 (patch)
tree7e86025c2b59ca59d207d6a3cb60da831537b397 /rules/gst-libav1.make
parent66aad6e71bbc00b0d8c6a7ce29fd0e979c6c9b93 (diff)
downloadptxdist-693af4025d9f7d0c3e32d80a29416c132e646120.tar.gz
ptxdist-693af4025d9f7d0c3e32d80a29416c132e646120.tar.xz
gst-libav1: explicitly specify the cpu
In the non-cross case, libav does basically the same, but with -march=native / -mcpu=native. Without this and gcc 7.x, the CPU for PPC is not detected correctly and building fails with: ./libavutil/ppc/util_altivec.h:134:63: internal compiler error: Segmentation fault Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/gst-libav1.make')
-rw-r--r--rules/gst-libav1.make10
1 files changed, 9 insertions, 1 deletions
diff --git a/rules/gst-libav1.make b/rules/gst-libav1.make
index 6f90cbc7e..b0fb86930 100644
--- a/rules/gst-libav1.make
+++ b/rules/gst-libav1.make
@@ -33,6 +33,14 @@ GST_LIBAV1_ENV := \
$(CROSS_ENV) \
AS=$(CROSS_CC)
+GST_LIBAV1_CPU := $(strip $(shell ptxd_cross_cc_v | sed -n "s/COLLECT_GCC_OPTIONS=.*'-march=\([^']*\)'.*/\1/p" | tail -n1))
+ifeq ($(GST_LIBAV1_CPU),)
+GST_LIBAV1_CPU := $(strip $(shell ptxd_cross_cc_v | sed -n "s/COLLECT_GCC_OPTIONS=.*'-mcpu=\([^']*\)'.*/\1/p" | tail -n1))
+endif
+ifeq ($(GST_LIBAV1_CPU),)
+GST_LIBAV1_CPU := generic
+endif
+
#
# autoconf
#
@@ -53,7 +61,7 @@ GST_LIBAV1_CONF_OPT := \
--disable-gpl \
--with-package-origin="PTXdist" \
--without-system-libav \
- --with-libav-extra-configure="--x86asmexe=nasm"
+ --with-libav-extra-configure="--x86asmexe=nasm --cpu=$(GST_LIBAV1_CPU)"
# ----------------------------------------------------------------------------
# Target-Install