mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
multimedia/libvpx: restore NEON on armv6 after r466922
- Only armv6 needs -meabi=5 - Build NEON files on armv6 - Respect CPUTYPE on armv7 and aarch64
This commit is contained in:
parent
dbf6ec8999
commit
4667d6c426
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=489061
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user