diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2019-01-02 08:10:07 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2019-01-02 08:10:07 +0000 |
commit | 4667d6c426ee3380c66ea6bab21564efb285981a (patch) | |
tree | 551920b695160e6668efca4354e2b8b9686f12d7 | |
parent | dbf6ec899951b421275c3b85ecb192fd0361337f (diff) |
Notes
-rw-r--r-- | multimedia/libvpx/Makefile | 5 | ||||
-rw-r--r-- | multimedia/libvpx/files/patch-build_make_Makefile | 31 | ||||
-rw-r--r-- | multimedia/libvpx/files/patch-build_make_configure.sh | 42 |
3 files changed, 73 insertions, 5 deletions
diff --git a/multimedia/libvpx/Makefile b/multimedia/libvpx/Makefile index 4328695f0ba6..609adf95a5e0 100644 --- a/multimedia/libvpx/Makefile +++ b/multimedia/libvpx/Makefile @@ -4,7 +4,7 @@ PORTNAME= libvpx DISTVERSIONPREFIX= v DISTVERSION= 1.7.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= multimedia MAINTAINER= jbeich@FreeBSD.org @@ -24,7 +24,6 @@ HAS_CONFIGURE= yes USE_PERL5= build USE_LDCONFIG= yes SHEBANG_FILES= build/make/ads2gas.pl -CONFIGURE_ENV= ASFLAGS="${ASFLAGS}" CONFIGURE_ARGS= --prefix=${PREFIX} \ --disable-install-docs \ --disable-install-srcs \ @@ -32,8 +31,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \ --enable-vp8 \ --enable-vp9 MAKE_ARGS+= verbose=yes -ASFLAGS+= ${ASFLAGS_${MACHINE}} -ASFLAGS_arm= -meabi=5 ALL_TARGET= # empty OPTIONS_DEFINE= DEBUG MULTIRES POSTPROC RTCPU SHARED SIZE_LIMIT TEST THREADS diff --git a/multimedia/libvpx/files/patch-build_make_Makefile b/multimedia/libvpx/files/patch-build_make_Makefile index 3603c66b6d91..41bcf8e37f40 100644 --- a/multimedia/libvpx/files/patch-build_make_Makefile +++ b/multimedia/libvpx/files/patch-build_make_Makefile @@ -1,5 +1,36 @@ +- Make sure NEON is available when building with intrinsics + --- build/make/Makefile.orig +++ build/make/Makefile +@@ -142,6 +142,28 @@ $(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 + $(BUILD_PFX)%_avx512.c.d: CFLAGS += -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl + $(BUILD_PFX)%_avx512.c.o: CFLAGS += -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl + ++# ARM ++ifeq ($(TGT_ISA),armv6) ++ifeq (,$(filter -march=%,$(CFLAGS))) ++$(BUILD_PFX)%_neon.c.d: CFLAGS += -march=armv7-a ++$(BUILD_PFX)%_neon.c.o: CFLAGS += -march=armv7-a ++$(BUILD_PFX)%_neon.asm.S.d: ASFLAGS += -march=armv7-a ++$(BUILD_PFX)%_neon.asm.S.o: ASFLAGS += -march=armv7-a ++$(BUILD_PFX)%_neon_asm.asm.S.d: ASFLAGS += -march=armv7-a ++$(BUILD_PFX)%_neon_asm.asm.S.o: ASFLAGS += -march=armv7-a ++endif ++$(BUILD_PFX)%_neon.asm.S.d: ASFLAGS += -meabi=5 ++$(BUILD_PFX)%_neon.asm.S.o: ASFLAGS += -meabi=5 ++$(BUILD_PFX)%_neon_asm.asm.S.d: ASFLAGS += -meabi=5 ++$(BUILD_PFX)%_neon_asm.asm.S.o: ASFLAGS += -meabi=5 ++endif ++ifneq (,$(filter arm%,$(TGT_ISA))) ++$(BUILD_PFX)%_neon.asm.S.d: ASFLAGS += -mfpu=neon ++$(BUILD_PFX)%_neon.asm.S.o: ASFLAGS += -mfpu=neon ++$(BUILD_PFX)%_neon_asm.asm.S.d: ASFLAGS += -mfpu=neon ++$(BUILD_PFX)%_neon_asm.asm.S.o: ASFLAGS += -mfpu=neon ++endif ++ + # POWER + $(BUILD_PFX)%_vsx.c.d: CFLAGS += -maltivec -mvsx + $(BUILD_PFX)%_vsx.c.o: CFLAGS += -maltivec -mvsx @@ -230,8 +230,8 @@ define install_map_template $(DIST_DIR)/$(1): $(2) diff --git a/multimedia/libvpx/files/patch-build_make_configure.sh b/multimedia/libvpx/files/patch-build_make_configure.sh index e95ef7527e61..c2eda18109b5 100644 --- a/multimedia/libvpx/files/patch-build_make_configure.sh +++ b/multimedia/libvpx/files/patch-build_make_configure.sh @@ -1,5 +1,6 @@ -- Add armv6 targets where NEON depends on CFLAGS +- Add armv6 targets and try NEON there - Recognize DragonFly as x86_64-linux-gcc target by default +- Don't override -march= on armv6, armv7 and aarch64 --- build/make/configure.sh.orig 2018-01-24 22:25:44 UTC +++ build/make/configure.sh @@ -27,3 +28,42 @@ tgt_os=linux ;; *solaris2.10) +@@ -914,7 +922,7 @@ process_common_toolchain() { + arm64|armv8) + soft_enable neon + ;; +- armv7|armv7s) ++ armv6|armv7|armv7s) + soft_enable neon + # Only enable neon_asm when neon is also enabled. + enabled neon && soft_enable neon_asm +@@ -935,29 +943,6 @@ + arch_int=${arch_int%%te} + check_add_asflags --defsym ARCHITECTURE=${arch_int} + tune_cflags="-mtune=" +- if [ ${tgt_isa} = "armv7" ] || [ ${tgt_isa} = "armv7s" ]; then +- if [ -z "${float_abi}" ]; then +- check_cpp <<EOF && float_abi=hard || float_abi=softfp +-#ifndef __ARM_PCS_VFP +-#error "not hardfp" +-#endif +-EOF +- fi +- check_add_cflags -march=armv7-a -mfloat-abi=${float_abi} +- check_add_asflags -march=armv7-a -mfloat-abi=${float_abi} +- +- if enabled neon || enabled neon_asm; then +- check_add_cflags -mfpu=neon #-ftree-vectorize +- check_add_asflags -mfpu=neon +- fi +- elif [ ${tgt_isa} = "arm64" ] || [ ${tgt_isa} = "armv8" ]; then +- check_add_cflags -march=armv8-a +- check_add_asflags -march=armv8-a +- else +- check_add_cflags -march=${tgt_isa} +- check_add_asflags -march=${tgt_isa} +- fi +- + enabled debug && add_asflags -g + asm_conversion_cmd="${source_path}/build/make/ads2gas.pl" + if enabled thumb; then |