diff options
author | jbeich <jbeich@FreeBSD.org> | 2015-10-31 22:24:16 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2015-10-31 22:24:16 +0800 |
commit | b21ce6e31472fcb96484723441c5537e2cddf4cb (patch) | |
tree | e708566d39068c9ed2afeab1d3a2d02326ff7eb6 /multimedia | |
parent | cbe63fe889b8a015693e9f5deffc279333d782f6 (diff) | |
download | freebsd-ports-gnome-b21ce6e31472fcb96484723441c5537e2cddf4cb.tar.gz freebsd-ports-gnome-b21ce6e31472fcb96484723441c5537e2cddf4cb.tar.zst freebsd-ports-gnome-b21ce6e31472fcb96484723441c5537e2cddf4cb.zip |
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
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/openh264/Makefile | 13 | ||||
-rw-r--r-- | multimedia/openh264/files/patch-build_arch.mk | 11 | ||||
-rw-r--r-- | multimedia/openh264/files/patch-codec_common_src_cpu.cpp | 23 |
3 files changed, 34 insertions, 13 deletions
diff --git a/multimedia/openh264/Makefile b/multimedia/openh264/Makefile index 412996d8d96e..5aeaf6df4508 100644 --- a/multimedia/openh264/Makefile +++ b/multimedia/openh264/Makefile @@ -3,7 +3,7 @@ PORTNAME= openh264 PORTVERSION= 1.4.0 DISTVERSIONPREFIX=v -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= multimedia MAINTAINER= gecko@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/' \ diff --git a/multimedia/openh264/files/patch-build_arch.mk b/multimedia/openh264/files/patch-build_arch.mk deleted file mode 100644 index ae78cca837eb..000000000000 --- a/multimedia/openh264/files/patch-build_arch.mk +++ /dev/null @@ -1,11 +0,0 @@ ---- build/arch.mk.orig 2015-08-09 21:14:55 UTC -+++ build/arch.mk -@@ -1,7 +1,7 @@ - ifneq ($(filter %86 x86_64, $(ARCH)),) - include $(SRC_PATH)build/x86-common.mk - endif --ifneq ($(filter-out arm64, $(filter arm%, $(ARCH))),) -+ifneq ($(filter-out armv6 arm64, $(filter arm%, $(ARCH))),) - ifeq ($(USE_ASM), Yes) - ASM_ARCH = arm - ASMFLAGS += -I$(SRC_PATH)codec/common/arm/ diff --git a/multimedia/openh264/files/patch-codec_common_src_cpu.cpp b/multimedia/openh264/files/patch-codec_common_src_cpu.cpp new file mode 100644 index 000000000000..88e9ed40a966 --- /dev/null +++ b/multimedia/openh264/files/patch-codec_common_src_cpu.cpp @@ -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) |