package/libva: bump version to 2.2.0
PATCH v2 1/3 package/libva: bump version to 2.2.0
Upstream moved its github repo to github.com/intel/, updated URLs, for reference see upstream PR 198. Also updated project URL.
Added patch to fix build without stack-protector support.
---
v2: added configure check for -fstack-protector (Thomas)
package/libva/0001-check-ssp.patch | 64 ++++++++++++++++++++++++++++++ package/libva/Config.in | 2 +- package/libva/libva.hash | 6 +-- package/libva/libva.mk | 6 ++- 4 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 package/libva/0001-check-ssp.patch
package/libva/0001-check-ssp.patch new file +64 -0
@@ -0,0 +1,64 @@ +From c60ac5bc4f95c8d1ce3d44aa1dfad8636dbe3bee Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sun, 29 Jul 2018 00:16:25 +0200 +Subject: [PATCH] Check for -fstack-protector + +Not all toolchains provide support for -fstack-protector. This patch +provides a configure check to avoid build errors like + +/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared +/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp + +Patch sent upstream as PR 226. + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + configure.ac | 16 ++++++++++++++++ + va/Makefile.am | 5 ++++- + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b0b88361..da1908cf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -209,6 +209,22 @@ if test "$ac_cv_have_gnuc_visibility_attribute" = "yes"; then + [Defined to 1 if GCC visibility attribute is supported]) + fi + ++# Check for -fstack-protector ++ssp_cc=yes ++if test "X$CC-cc" != "X"; then ++ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector]) ++ ssp_old_cflags="$CFLAGS" ++ CFLAGS="$CFLAGS -fstack-protector" ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [], [ssp_cc=no]) ++ AC_MSG_RESULT([$ssp_cc]) ++ if test "X$ssp_cc" = "Xno"; then ++ CFLAGS="$ssp_old_cflags" ++ else ++ AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) ++ fi ++fi ++AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes") ++ + # Check for DRM (mandatory) + LIBDRM_VERSION=libdrm_version + PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION]) +diff --git a/va/Makefile.am b/va/Makefile.am +index 5b6d49ab..0e94d0ff 100644 +--- a/va/Makefile.am ++++ b/va/Makefile.am +@@ -77,9 +77,12 @@ libva_ldflags = \ + + libva_cflags = \ + -Wall \ +- -fstack-protector \ + $(NULL) + ++if USE_SSP ++libva_cflags += -fstack-protector ++endif ++ + lib_LTLIBRARIES = libva.la + libvaincludedir = ${includedir}/va + libvainclude_HEADERS = $(libva_source_h)
package/libva/Config.in +1 -1
@@ -13,7 +13,7 @@ config BR2_PACKAGE_LIBVA prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3). - https://01.org/linuxmedia/vaapi + https://01.org/vaapi comment "libva needs a toolchain w/ threads, dynamic library" depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/libva/libva.hash +3 -3
@@ -1,5 +1,5 @@ -# From https://github.com/01org/libva/releases -sha1 9ecde2b6c9deda16e895a0b00b8aef3a765acb4c libva-2.1.0.tar.bz2 +# From https://github.com/intel/libva/releases +sha1 5b19d2fbf532f14e24c3bedb4074238a1d7f1686 libva-2.2.0.tar.bz2 # Locally computed -sha256 f3fa953a11d3210c3a4ee79031abdbe0863d5ce13d9b3f93f315f1eec60a4b0f libva-2.1.0.tar.bz2 +sha256 6f6ca04c785544d30d315ef130a6aeb9435b75f934d7fbe0e4e9ba6084ce4ef2 libva-2.2.0.tar.bz2 sha256 c86a782ee845b52472dae9b9d79fb915d333628ac0efe49cdce63644814931de COPYING
package/libva/libva.mk +4 -2
@@ -4,12 +4,14 @@ # ################################################################################ -LIBVA_VERSION = 2.1.0 +LIBVA_VERSION = 2.2.0 LIBVA_SOURCE = libva-$(LIBVA_VERSION).tar.bz2 -LIBVA_SITE = https://github.com/01org/libva/releases/download/$(LIBVA_VERSION) +LIBVA_SITE = https://github.com/intel/libva/releases/download/$(LIBVA_VERSION) LIBVA_LICENSE = MIT LIBVA_LICENSE_FILES = COPYING LIBVA_INSTALL_STAGING = YES +# 0001-check-ssp.patch +LIBVA_AUTORECONF = YES LIBVA_DEPENDENCIES = host-pkgconf libdrm # libdrm is a hard-dependency
Signature · 1 line
2.18.0
PATCH v2 2/3 package/libva-intel-driver: bump version to 2.2.0
Upstream moved its github repo to github.com/intel/, updated URLs, for reference see upstream PR 371. Also updated project URL.
Added patch to fix build without stack-protector support.
---
v2: added configure check for -fstack-protector (Thomas)
.../libva-intel-driver/0001-check-ssp.patch | 65 +++++++++++++++++++ package/libva-intel-driver/Config.in | 2 +- .../libva-intel-driver.hash | 6 +- .../libva-intel-driver/libva-intel-driver.mk | 6 +- 4 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 package/libva-intel-driver/0001-check-ssp.patch
package/libva-intel-driver/0001-check-ssp.patch new file +65 -0
@@ -0,0 +1,65 @@ +From bf08643583520b763150af9ed20166b7fe272fd5 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sun, 29 Jul 2018 20:55:23 +0200 +Subject: [PATCH] Check for -fstack-protector + +Not all toolchains provide support for -fstack-protector. This patch +provides a configure check to avoid build errors like + +/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared +/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp + +Patch sent upstream as PR 408. + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + configure.ac | 17 +++++++++++++++++ + src/Makefile.am | 5 ++++- + 2 files changed, 21 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c76060c7..5471aee7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -86,6 +86,23 @@ AC_SEARCH_LIBS([dlopen], [dl], [], [ + AC_MSG_ERROR([unable to find the dlopen() function]) + ]) + ++ ++# Check for -fstack-protector ++ssp_cc=yes ++if test "X$CC-cc" != "X"; then ++ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector]) ++ ssp_old_cflags="$CFLAGS" ++ CFLAGS="$CFLAGS -fstack-protector" ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [], [ssp_cc=no]) ++ AC_MSG_RESULT([$ssp_cc]) ++ if test "X$ssp_cc" = "Xno"; then ++ CFLAGS="$ssp_old_cflags" ++ else ++ AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) ++ fi ++fi ++AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes") ++ + dnl Check for recent enough DRM + LIBDRM_VERSION=libdrm_version + PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION libdrm_intel]) +diff --git a/src/Makefile.am b/src/Makefile.am +index c26293dd..5c52658a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -35,9 +35,12 @@ AM_CPPFLAGS = \ + driver_cflags = \ + -Wall \ + -fvisibility=hidden \ +- -fstack-protector \ + $(NULL) + ++if USE_SSP ++driver_cflags += -fstack-protector ++endif ++ + driver_ldflags = \ + -avoid-version \ + -no-undefined \
package/libva-intel-driver/Config.in +1 -1
@@ -12,7 +12,7 @@ config BR2_PACKAGE_LIBVA_INTEL_DRIVER help VA-API back-end driver for Intel graphics chips - https://01.org/linuxmedia/vaapi + https://01.org/vaapi comment "libva intel driver needs a toolchain w/ threads, dynamic library" depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/libva-intel-driver/libva-intel-driver.hash +3 -3
@@ -1,5 +1,5 @@ -# From https://github.com/01org/intel-vaapi-driver/releases -sha1 a40c6bd89b71b547986bf9f9fa2533bb50cf269e intel-vaapi-driver-2.1.0.tar.bz2 +# From https://github.com/intel/intel-vaapi-driver/releases +sha1 0934f97ddcaf4e633f59d049226723239b645b33 intel-vaapi-driver-2.2.0.tar.bz2 # Locally computed -sha256 ecfaf2ccc4b9af7340e002d2ef807d1e33051d4992f1983f5f4d60e516f86bdf intel-vaapi-driver-2.1.0.tar.bz2 +sha256 e8a5f54694eb76aad42653b591030b8a53b1513144c09a80defb3d8d8c875c18 intel-vaapi-driver-2.2.0.tar.bz2 sha256 c86a782ee845b52472dae9b9d79fb915d333628ac0efe49cdce63644814931de COPYING
package/libva-intel-driver/libva-intel-driver.mk +4 -2
@@ -4,12 +4,14 @@ # ################################################################################ -LIBVA_INTEL_DRIVER_VERSION = 2.1.0 +LIBVA_INTEL_DRIVER_VERSION = 2.2.0 LIBVA_INTEL_DRIVER_SOURCE = intel-vaapi-driver-$(LIBVA_INTEL_DRIVER_VERSION).tar.bz2 LIBVA_INTEL_DRIVER_SITE = \ - https://github.com/01org/intel-vaapi-driver/releases/download/$(LIBVA_INTEL_DRIVER_VERSION) + https://github.com/intel/intel-vaapi-driver/releases/download/$(LIBVA_INTEL_DRIVER_VERSION) LIBVA_INTEL_DRIVER_LICENSE = MIT LIBVA_INTEL_DRIVER_LICENSE_FILES = COPYING +# 0001-check-ssp.patch +LIBVA_INTEL_DRIVER_AUTORECONF = YES LIBVA_INTEL_DRIVER_DEPENDENCIES = host-pkgconf libdrm libva ifeq ($(BR2_PACKAGE_XORG7),y)
Signature · 1 line
2.18.0
PATCH v2 3/3 package/libva-utils: bump version to 2.2.0
In reply to Bernd KuhlsUpstream moved its github repo to github.com/intel/, updated URLs, for reference see upstream PR 110. Also updated project URL.
Added patch to fix build without stack-protector support.
---
v2: added configure check for -fstack-protector (Thomas)
package/libva-utils/0001-check-ssp.patch | 145 +++++++++++++++++++++++ package/libva-utils/Config.in | 2 +- package/libva-utils/libva-utils.hash | 6 +- package/libva-utils/libva-utils.mk | 6 +- 4 files changed, 153 insertions(+), 6 deletions(-) create mode 100644 package/libva-utils/0001-check-ssp.patch
package/libva-utils/0001-check-ssp.patch new file +145 -0
@@ -0,0 +1,145 @@ +From bdcf4d90f618f497311c348f984e005924cb3def Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sun, 29 Jul 2018 20:58:06 +0200 +Subject: [PATCH] Check for -fstack-protector + +Not all toolchains provide support for -fstack-protector. This patch +provides a configure check to avoid build errors like + +/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared +/home/buildroot/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/6.4.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp + +Patch sent upstream as PR 125. + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + configure.ac | 16 ++++++++++++++++ + decode/Makefile.am | 5 ++++- + encode/Makefile.am | 5 ++++- + putsurface/Makefile.am | 5 ++++- + vainfo/Makefile.am | 5 ++++- + videoprocess/Makefile.am | 5 ++++- + 6 files changed, 36 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index be2e00d..cfa508a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -129,6 +129,22 @@ if test "$ac_cv_have_gnuc_visibility_attribute" = "yes"; then + [Defined to 1 if GCC visibility attribute is supported]) + fi + ++# Check for -fstack-protector ++ssp_cc=yes ++if test "X$CC-cc" != "X"; then ++ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector]) ++ ssp_old_cflags="$CFLAGS" ++ CFLAGS="$CFLAGS -fstack-protector" ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [], [ssp_cc=no]) ++ AC_MSG_RESULT([$ssp_cc]) ++ if test "X$ssp_cc" = "Xno"; then ++ CFLAGS="$ssp_old_cflags" ++ else ++ AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) ++ fi ++fi ++AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes") ++ + # Check for DRM (mandatory) + LIBDRM_VERSION=libdrm_version + PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION]) +diff --git a/decode/Makefile.am b/decode/Makefile.am +index febc50d..8ea9252 100644 +--- a/decode/Makefile.am ++++ b/decode/Makefile.am +@@ -24,11 +24,14 @@ bin_PROGRAMS = mpeg2vldemo loadjpeg + + AM_CPPFLAGS = \ + -Wall \ +- -fstack-protector \ + $(LIBVA_CFLAGS) \ + -I$(top_srcdir)/common \ + $(NULL) + ++if USE_SSP ++AM_CPPFLAGS += -fstack-protector ++endif ++ + TEST_LIBS = \ + $(LIBVA_LIBS) \ + $(top_builddir)/common/libva-display.la \ +diff --git a/encode/Makefile.am b/encode/Makefile.am +index 8298b39..c107007 100644 +--- a/encode/Makefile.am ++++ b/encode/Makefile.am +@@ -25,10 +25,13 @@ noinst_PROGRAMS = svctenc + + AM_CPPFLAGS = \ + -Wall \ +- -fstack-protector \ + $(LIBVA_CFLAGS) \ + $(NULL) + ++if USE_SSP ++AM_CPPFLAGS += -fstack-protector ++endif ++ + h264encode_SOURCES = h264encode.c + h264encode_CFLAGS = -I$(top_srcdir)/common -g + h264encode_LDADD = \ +diff --git a/putsurface/Makefile.am b/putsurface/Makefile.am +index e7b62a1..10ae63e 100644 +--- a/putsurface/Makefile.am ++++ b/putsurface/Makefile.am +@@ -26,9 +26,12 @@ TEST_CFLAGS = \ + $(LIBVA_CFLAGS) \ + -I$(top_srcdir)/common \ + -Wall \ +- -fstack-protector \ + $(NULL) + ++if USE_SSP ++TEST_CFLAGS += -fstack-protector ++endif ++ + TEST_LIBS = \ + $(LIBVA_LIBS) \ + $(top_builddir)/common/libva-display.la \ +diff --git a/vainfo/Makefile.am b/vainfo/Makefile.am +index aff201f..e59f466 100644 +--- a/vainfo/Makefile.am ++++ b/vainfo/Makefile.am +@@ -27,9 +27,12 @@ vainfo_cflags = \ + $(LIBVA_CFLAGS) \ + -DLIBVA_VERSION_S="\"$(LIBVA_VERSION)\"" \ + -Wall \ +- -fstack-protector \ + $(NULL) + ++if USE_SSP ++vainfo_cflags += -fstack-protector ++endif ++ + vainfo_libs = \ + $(LIBVA_LIBS) \ + $(top_builddir)/common/libva-display.la \ +diff --git a/videoprocess/Makefile.am b/videoprocess/Makefile.am +index eb79bc3..448da7d 100644 +--- a/videoprocess/Makefile.am ++++ b/videoprocess/Makefile.am +@@ -24,11 +24,14 @@ bin_PROGRAMS = vavpp + + AM_CPPFLAGS = \ + -Wall \ +- -fstack-protector \ + $(LIBVA_CFLAGS) \ + -I$(top_srcdir)/common \ + $(NULL) + ++if USE_SSP ++AM_CPPFLAGS += -fstack-protector ++endif ++ + TEST_LIBS = \ + $(LIBVA_LIBS) \ + $(top_builddir)/common/libva-display.la \
package/libva-utils/Config.in +1 -1
@@ -8,7 +8,7 @@ config BR2_PACKAGE_LIBVA_UTILS Libva-utils is a collection of tests for VA-API (Video Acceleration API) - https://01.org/linuxmedia/vaapi + https://01.org/vaapi comment "libva-utils needs a toolchain w/ C++, threads, dynamic library" depends on !BR2_INSTALL_LIBSTDCPP || \
package/libva-utils/libva-utils.hash +3 -3
@@ -1,5 +1,5 @@ -# From https://github.com/01org/libva-utils/releases -sha1 9902eb944c3ace00be4fe95627708f156fc5ace7 libva-utils-2.1.0.tar.bz2 +# From https://github.com/intel/libva-utils/releases +sha1 ef15d40d6bec847c74f21ee3431b7e7b06fec3b4 libva-utils-2.2.0.tar.bz2 # Locally computed -sha256 f6a7790c3dcc56537372c90a83036a3136194a8b397e84e97bf9cc9254fa2c51 libva-utils-2.1.0.tar.bz2 +sha256 ed7a6ed1fab657df4e83ea11f90310efcf31c27828f32d65351a28ca3c404dc0 libva-utils-2.2.0.tar.bz2 sha256 c6220c9f87832c27abcb8a32eafdd2823e13ce146b3ea63d5deae2a76798ef50 COPYING
package/libva-utils/libva-utils.mk +4 -2
@@ -4,11 +4,13 @@ # ################################################################################ -LIBVA_UTILS_VERSION = 2.1.0 +LIBVA_UTILS_VERSION = 2.2.0 LIBVA_UTILS_SOURCE = libva-utils-$(LIBVA_UTILS_VERSION).tar.bz2 -LIBVA_UTILS_SITE = https://github.com/01org/libva-utils/releases/download/$(LIBVA_UTILS_VERSION) +LIBVA_UTILS_SITE = https://github.com/intel/libva-utils/releases/download/$(LIBVA_UTILS_VERSION) LIBVA_UTILS_LICENSE = MIT LIBVA_UTILS_LICENSE_FILES = COPYING +# 0001-check-ssp.patch +LIBVA_UTILS_AUTORECONF = YES LIBVA_UTILS_DEPENDENCIES = host-pkgconf libva $(eval $(autotools-package))
Signature · 1 line
2.18.0
PATCH v2 1/3 package/libva: bump version to 2.2.0
In reply to Bernd KuhlsHello,
Quoted 8 lines · Bernd Kuhls
Upstream moved its github repo to github.com/intel/, updated URLs, for reference see upstream PR 198. Also updated project URL.
Added patch to fix build without stack-protector support.
Signed-off-by Bernd Kuhls <[email protected]>---
v2: added configure check for -fstack-protector (Thomas)
Entire series applied to next! Thanks for having worked on upstream-acceptable patches. I see it has already been merged in libva (I haven't checked libva-intel and libva-utils though).
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com