Files
bsdports/media/libx264/files/patch-configure
2019-12-26 07:26:06 +00:00

98 lines
3.3 KiB
Plaintext

--- configure.orig 2017-06-26 20:45:05 UTC
+++ configure
@@ -682,12 +682,6 @@ case $host_cpu in
AS_EXT=".asm"
ASFLAGS="$ASFLAGS -DARCH_X86_64=0 -I\$(SRCPATH)/common/x86/"
if [ $compiler = GNU ]; then
- if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then
- CFLAGS="$CFLAGS -march=i686"
- fi
- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
- CFLAGS="$CFLAGS -mfpmath=sse -msse -msse2"
- fi
CFLAGS="-m32 $CFLAGS"
LDFLAGS="-m32 $LDFLAGS"
fi
@@ -702,7 +696,7 @@ case $host_cpu in
ASFLAGS="$ASFLAGS -f elf32"
fi
;;
- x86_64)
+ amd64|x86_64)
ARCH="X86_64"
AS="${AS-yasm}"
AS_EXT=".asm"
@@ -776,7 +770,7 @@ case $host_cpu in
AS="${AS-${CC}}"
fi
;;
- aarch64)
+ aarch64|arm64)
ARCH="AARCH64"
stack_alignment=16
AS="${AS-${CC}}"
@@ -875,7 +869,7 @@ elif [ $compiler = ICC -a $ARCH = X86 ]; then
fi
fi
-if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
+if [ $cli_libx264 != system -a $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
if ! as_check "vpmovzxwd ymm0, xmm0" ; then
VER=`($AS --version || echo no assembler) 2>/dev/null | head -n 1`
echo "Found $VER"
@@ -889,9 +883,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \
fi
if [ $asm = auto -a $ARCH = ARM ] ; then
- # set flags so neon is built by default
- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
-
cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
define HAVE_ARMV6
@@ -902,9 +893,8 @@ if [ $asm = auto -a $ARCH = ARM ] ; then
cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
ASFLAGS="$ASFLAGS -c"
else
- echo "You specified a pre-ARMv6 or Thumb-1 CPU in your CFLAGS."
- echo "If you really want to run on such a CPU, configure with --disable-asm."
- exit 1
+ echo "No usable SIMD found, assuming --disable-asm."
+ asm="no"
fi
fi
@@ -931,9 +921,8 @@ if [ $asm = auto -a $ARCH = MIPS ] ; then
if cc_check '' '' '__asm__("addvi.b $w0, $w1, 1");' ; then
define HAVE_MSA
else
- echo "You specified a pre-MSA CPU in your CFLAGS."
- echo "If you really want to run on such a CPU, configure with --disable-asm."
- exit 1
+ echo "No usable SIMD found, assuming --disable-asm."
+ asm="no"
fi
fi
@@ -1245,10 +1234,6 @@ if cc_check '' -Wshadow ; then
CFLAGS="-Wshadow $CFLAGS"
fi
-if cc_check '' -Wmaybe-uninitialized ; then
- CFLAGS="-Wno-maybe-uninitialized $CFLAGS"
-fi
-
if [ $compiler = ICC -o $compiler = ICL ] ; then
if cc_check 'extras/intel_dispatcher.h' '' 'x264_intel_dispatcher_override();' ; then
define HAVE_INTEL_DISPATCHER
@@ -1284,6 +1269,9 @@ if [ "$opencl" = "yes" ]; then
opencl="yes"
define HAVE_OPENCL
libdl="-ldl"
+ else
+ opencl="yes"
+ define HAVE_OPENCL
fi
LDFLAGS="$LDFLAGS $libdl"
fi