summaryrefslogtreecommitdiffstats
path: root/contrib/x264
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2020-08-01 02:30:34 -0400
committerDamiano Galassi <[email protected]>2020-08-05 12:32:23 +0200
commit19e4d89ffd3e8c1fec36effb55b1f1ec054a008b (patch)
tree14cbf8b74555778aabfe59f9405aeb95d7b62429 /contrib/x264
parent1644b5099ffe6d815f65725321373fdf0dfd54f8 (diff)
contrib: Update most contribs for Apple Silicon.
Diffstat (limited to 'contrib/x264')
-rw-r--r--contrib/x264/P00-darwin-applesi.patch75
-rw-r--r--contrib/x264/module.defs4
2 files changed, 79 insertions, 0 deletions
diff --git a/contrib/x264/P00-darwin-applesi.patch b/contrib/x264/P00-darwin-applesi.patch
new file mode 100644
index 000000000..e5cb47bc1
--- /dev/null
+++ b/contrib/x264/P00-darwin-applesi.patch
@@ -0,0 +1,75 @@
+From ff750fd9797ee200daf5915c84c88dce5074498e Mon Sep 17 00:00:00 2001
+Date: Mon, 1 Jun 2020 09:36:04 -0700
+Subject: [PATCH] arm64-config
+
+---
+ config.sub | 4 ++--
+ configure | 24 ++++++++++++------------
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/config.sub b/config.sub
+index 8df5511..72e9265 100755
+--- a/config.sub
++++ b/config.sub
+@@ -255,7 +255,7 @@ case $basic_machine in
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+- | aarch64 | aarch64_be \
++ | aarch64 | aarch64_be | arm64 \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+@@ -369,7 +369,7 @@ case $basic_machine in
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+- | aarch64-* | aarch64_be-* \
++ | aarch64-* | aarch64_be-* | arm64*-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+diff --git a/configure b/configure
+index 07ba449..d47de9a 100755
+--- a/configure
++++ b/configure
+@@ -788,6 +788,18 @@ case $host_cpu in
+ AS="${AS-${CC}}"
+ AS_EXT=".c"
+ ;;
++ aarch64|arm64*)
++ ARCH="AARCH64"
++ stack_alignment=16
++ if [ "$SYS" = MACOSX ] ; then
++ AS="${AS-${CC}}"
++ ASFLAGS="$ASFLAGS -DPREFIX -DPIC"
++ elif [ "$SYS" = WINDOWS ] && [ "$compiler" = CL ] ; then
++ AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch aarch64 -as-type armasm -- armasm64 -nologo}"
++ else
++ AS="${AS-${CC}}"
++ fi
++ ;;
+ arm*)
+ ARCH="ARM"
+ if [ "$SYS" = MACOSX ] ; then
+@@ -806,18 +818,6 @@ case $host_cpu in
+ AS="${AS-${CC}}"
+ fi
+ ;;
+- aarch64)
+- ARCH="AARCH64"
+- stack_alignment=16
+- if [ "$SYS" = MACOSX ] ; then
+- AS="${AS-${CC}}"
+- ASFLAGS="$ASFLAGS -DPREFIX -DPIC"
+- elif [ "$SYS" = WINDOWS ] && [ "$compiler" = CL ] ; then
+- AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch aarch64 -as-type armasm -- armasm64 -nologo}"
+- else
+- AS="${AS-${CC}}"
+- fi
+- ;;
+ s390|s390x)
+ ARCH="S390"
+ ;;
+--
+2.24.2 (Apple Git-127)
diff --git a/contrib/x264/module.defs b/contrib/x264/module.defs
index f9bd448ae..f5d8b9e1a 100644
--- a/contrib/x264/module.defs
+++ b/contrib/x264/module.defs
@@ -19,6 +19,10 @@ ifeq (1,$(HOST.cross))
X264.CONFIGURE.env.LDFLAGS = LDFLAGS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib) $(call fn.ARGS,X264.GCC,*archs *sysroot *minver)"
endif
+ifeq (arm64-darwin,$(HOST.machine)-$(HOST.system))
+ X264.CONFIGURE.extra += --host=arm64-apple-darwin
+endif
+
ifeq (1,$(FEATURE.flatpak))
X264.CONFIGURE.extra += --enable-pic
endif