From owner-svn-ports-all@freebsd.org Wed Jun 13 12:33:01 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 706B3100613D; Wed, 13 Jun 2018 12:33:01 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 256C67FF52; Wed, 13 Jun 2018 12:33:01 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06EDD197E1; Wed, 13 Jun 2018 12:33:01 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5DCX0AM008225; Wed, 13 Jun 2018 12:33:00 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5DCX06Y008222; Wed, 13 Jun 2018 12:33:00 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201806131233.w5DCX06Y008222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 13 Jun 2018 12:33:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r472311 - in head/multimedia/libvpx: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/multimedia/libvpx: . files X-SVN-Commit-Revision: 472311 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2018 12:33:01 -0000 Author: jbeich Date: Wed Jun 13 12:33:00 2018 New Revision: 472311 URL: https://svnweb.freebsd.org/changeset/ports/472311 Log: multimedia/libvpx: unbreak on powerpc* - newer libstdc++ ABI is required by many consumers - -mspe and -maltivec are mutually exclusive - implement VSX detection for powerpc and powerpc64 PR: 228586 Submitted by: jhibbits (based on) Added: head/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c (contents, props changed) Modified: head/multimedia/libvpx/Makefile (contents, props changed) head/multimedia/libvpx/files/patch-libs.mk (contents, props changed) Modified: head/multimedia/libvpx/Makefile ============================================================================== --- head/multimedia/libvpx/Makefile Wed Jun 13 12:26:53 2018 (r472310) +++ head/multimedia/libvpx/Makefile Wed Jun 13 12:33:00 2018 (r472311) @@ -17,7 +17,7 @@ BUILD_DEPENDS= nasm:devel/nasm USE_GITHUB= yes GH_ACCOUNT= webmproject -USES= cpe gmake perl5 shebangfix +USES= compiler:c++11-lib cpe gmake perl5 shebangfix CPE_VENDOR= john_koleszar HAS_CONFIGURE= yes USE_PERL5= build @@ -38,6 +38,7 @@ ALL_TARGET= # empty OPTIONS_DEFINE= DEBUG MULTIRES POSTPROC RTCPU SHARED SIZE_LIMIT TEST THREADS OPTIONS_DEFAULT=MULTIRES POSTPROC RTCPU SHARED SIZE_LIMIT THREADS OPTIONS_EXCLUDE_aarch64=RTCPU +OPTIONS_EXCLUDE_powerpcspe=RTCPU OPTIONS_SUB= yes DEBUG_CONFIGURE_ON= --enable-debug Modified: head/multimedia/libvpx/files/patch-libs.mk ============================================================================== --- head/multimedia/libvpx/files/patch-libs.mk Wed Jun 13 12:26:53 2018 (r472310) +++ head/multimedia/libvpx/files/patch-libs.mk Wed Jun 13 12:33:00 2018 (r472311) @@ -1,16 +1,5 @@ --- libs.mk.orig 2017-01-12 20:27:27 UTC +++ libs.mk -@@ -117,8 +117,8 @@ endif - $(BUILD_PFX)third_party/googletest/%.cc.o: CXXFLAGS += -Wno-missing-field-initializers - # Suppress -Wextra warnings in first party code pending investigation. - # https://bugs.chromium.org/p/webm/issues/detail?id=1069 --$(BUILD_PFX)vp8/encoder/onyx_if.c.o: CFLAGS += -Wno-unknown-warning-option -Wno-clobbered --$(BUILD_PFX)vp8/decoder/onyxd_if.c.o: CFLAGS += -Wno-unknown-warning-option -Wno-clobbered -+$(BUILD_PFX)vp8/encoder/onyx_if.c.o: CFLAGS += -Wno-extra -+$(BUILD_PFX)vp8/decoder/onyxd_if.c.o: CFLAGS += -Wno-extra - - ifeq ($(CONFIG_MSVS),yes) - CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd) @@ -339,8 +339,8 @@ else $(qexec)echo 'Libs.private: -lm' >> $@ endif Added: head/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c Wed Jun 13 12:33:00 2018 (r472311) @@ -0,0 +1,66 @@ +--- vpx_ports/ppc_cpudetect.c.orig 2018-01-24 22:25:44 UTC ++++ vpx_ports/ppc_cpudetect.c +@@ -8,12 +8,6 @@ + * be found in the AUTHORS file in the root of the source tree. + */ + +-#include +-#include +-#include +-#include +-#include +- + #include "./vpx_config.h" + #include "vpx_ports/ppc.h" + +@@ -35,6 +29,13 @@ static int cpu_env_mask(void) { + return env && *env ? (int)strtol(env, NULL, 0) : ~0; + } + ++#if defined(__linux__) ++#include ++#include ++#include ++#include ++#include ++ + int ppc_simd_caps(void) { + int flags; + int mask; +@@ -73,6 +74,36 @@ out_close: + close(fd); + return flags & mask; + } ++#elif defined(__FreeBSD__) ++#include ++#include ++#include ++ ++int ppc_simd_caps(void) { ++ int flags; ++ int mask; ++ u_long cpu_features = 0; ++ size_t sz = sizeof(cpu_features); ++ ++ // If VPX_SIMD_CAPS is set then allow only those capabilities. ++ if (!cpu_env_flags(&flags)) { ++ return flags; ++ } ++ ++ mask = cpu_env_mask(); ++ ++ sysctlbyname("hw.cpu_features", &cpu_features, &sz, NULL, 0); ++#if HAVE_VSX ++ if (cpu_features & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX; ++#endif ++ ++ return flags & mask; ++} ++#else ++#error \ ++ "--enable-runtime-cpu-detect selected, but no CPU detection method " \ ++"available for your platform. Reconfigure with --disable-runtime-cpu-detect." ++#endif /* end __linux__ */ + #else + // If there is no RTCD the function pointers are not used and can not be + // changed.