svn commit: r400578 - in head/multimedia/openh264: . files
Jan Beich
jbeich at FreeBSD.org
Sat Oct 31 14:24:18 UTC 2015
Author: jbeich
Date: Sat Oct 31 14:24:16 2015
New Revision: 400578
URL: https://svnweb.freebsd.org/changeset/ports/400578
Log:
multimedia/openh264: unbreak build on aarch64
/nxb-bin/usr/bin/cc -O2 -pipe -I/usr/local/include/gmp-api -fno-strict-aliasing -DHAVE_NEON_AARCH64 -fPIC -DGENERATED_VERSION_HEADER -I./codec/common/arm64/ -I./codec/api/svc -I./codec/common/inc -c -o codec/common/arm64/copy_mb_aarch64_neon.o codec/common/arm64/copy_mb_aarch64_neon.S
<instantiation>:4:1: error: unknown directive
.func WelsCopy8x8_AArch64_neon
^
codec/common/arm64/copy_mb_aarch64_neon.S:186:1: note: while in macro instantiation
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy8x8_AArch64_neon
^
<instantiation>:2:1: error: unknown directive
.endfunc
^
codec/common/arm64/copy_mb_aarch64_neon.S:196:1: note: while in macro instantiation
WELS_ASM_AARCH64_FUNC_END
^
[...]
Backout r394430 as armv6 can do NEON but not runtime detection on
FreeBSD while armv8 always has NEON. So, use devel/binutils and detect
NEON via compiler defines e.g.,
# To enable NEON on armv6 put the following into make.conf
CFLAGS+= -march=armv7-a
PR: 201273 (ping)
MFH: 2015Q4
Added:
head/multimedia/openh264/files/patch-codec_common_src_cpu.cpp (contents, props changed)
Deleted:
head/multimedia/openh264/files/patch-build_arch.mk
Modified:
head/multimedia/openh264/Makefile (contents, props changed)
Modified: head/multimedia/openh264/Makefile
==============================================================================
--- head/multimedia/openh264/Makefile Sat Oct 31 13:08:49 2015 (r400577)
+++ head/multimedia/openh264/Makefile Sat Oct 31 14:24:16 2015 (r400578)
@@ -3,7 +3,7 @@
PORTNAME= openh264
PORTVERSION= 1.4.0
DISTVERSIONPREFIX=v
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= multimedia
MAINTAINER= gecko at FreeBSD.org
@@ -14,10 +14,12 @@ LICENSE= BSD2CLAUSE
USE_GITHUB= yes
GH_ACCOUNT= cisco
-USES= cpe gmake
+USES= compiler cpe gmake
CPE_VENDOR= cisco
USE_LDCONFIG= yes
+ASFLAGS+= ${ASFLAGS_${CHOSEN_COMPILER_TYPE}}
MAKE_ARGS= OS=freebsd ARCH="${ARCH:S/amd64/x86_64/}" \
+ CCASFLAGS='$$(CFLAGS) ${ASFLAGS}' \
CFLAGS_OPT="" CFLAGS_DEBUG=""
ALL_TARGET= all
@@ -45,6 +47,13 @@ TEST_CFLAGS= -I${LOCALBASE}/include
TEST_MAKE_ARGS= HAVE_GTEST=Yes
TEST_ALL_TARGET=test
+.include <bsd.port.options.mk>
+
+.if ! ${PORT_OPTIONS:MDEBUG} && (${ARCH:Maarch*} || ${ARCH:Marm*} )
+USE_BINUTILS= yes
+ASFLAGS_clang= -no-integrated-as
+.endif
+
post-patch:
${REINPLACE_CMD} -e '/gtest-targets\.mk/d' \
-e '/pkgconfig/s/lib/libdata/' \
Added: head/multimedia/openh264/files/patch-codec_common_src_cpu.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/multimedia/openh264/files/patch-codec_common_src_cpu.cpp Sat Oct 31 14:24:16 2015 (r400578)
@@ -0,0 +1,23 @@
+--- codec/common/src/cpu.cpp.orig 2015-03-25 07:43:00 UTC
++++ codec/common/src/cpu.cpp
+@@ -276,9 +276,17 @@ uint32_t WelsCPUFeatureDetect (int32_t*
+ * that NEON and all associated features are available. */
+
+ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
+- return WELS_CPU_ARMv7 |
+- WELS_CPU_VFPv3 |
+- WELS_CPU_NEON;
++ int flags = 0;
++# if __ARM_ARCH == 7
++ flags |= WELS_CPU_ARMv7;
++# endif
++# ifdef __ARM_VFPV3__
++ flags |= WELS_CPU_VFPv3;
++# endif
++# ifdef __ARM_NEON
++ flags |= WELS_CPU_NEON;
++# endif
++ return flags;
+ }
+ #endif
+ #elif defined(HAVE_NEON_AARCH64)
More information about the svn-ports-head
mailing list