summaryrefslogtreecommitdiff
path: root/data/libvpx/toolchain.diff
blob: 5c25ba44d119d8889af894bc602aac424c3ffd61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
diff -ur libvpx-1.8.0/build/make/Makefile libvpx-1.8.0+iPhone/build/make/Makefile
--- libvpx-1.8.0/build/make/Makefile	2019-02-04 07:02:33.000000000 -1000
+++ libvpx-1.8.0+iPhone/build/make/Makefile	2019-04-03 14:16:22.000000000 -1000
@@ -70,9 +70,15 @@
 ASFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT)/ -I$(SRC_PATH)/
 DIST_DIR?=dist
 HOSTCC?=gcc
+ifeq ($(words $(subst -, ,$(TOOLCHAIN))),4)
+TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
+TGT_OS:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
+TGT_CC:=$(word 4, $(subst -, ,$(TOOLCHAIN)))
+else
 TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
 TGT_OS:=$(word 2, $(subst -, ,$(TOOLCHAIN)))
 TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
+endif
 quiet:=$(if $(or $(verbose), $(V)),, yes)
 qexec=$(if $(quiet),@)
 
diff -ur libvpx-1.8.0/build/make/configure.sh libvpx-1.8.0+iPhone/build/make/configure.sh
--- libvpx-1.8.0/build/make/configure.sh	2019-02-04 07:02:33.000000000 -1000
+++ libvpx-1.8.0+iPhone/build/make/configure.sh	2019-04-03 14:17:28.000000000 -1000
@@ -771,35 +771,27 @@
     # detect tgt_os
     case "$gcctarget" in
       *darwin10*)
-        tgt_isa=x86_64
         tgt_os=darwin10
         ;;
       *darwin11*)
-        tgt_isa=x86_64
         tgt_os=darwin11
         ;;
       *darwin12*)
-        tgt_isa=x86_64
         tgt_os=darwin12
         ;;
       *darwin13*)
-        tgt_isa=x86_64
         tgt_os=darwin13
         ;;
       *darwin14*)
-        tgt_isa=x86_64
         tgt_os=darwin14
         ;;
       *darwin15*)
-        tgt_isa=x86_64
         tgt_os=darwin15
         ;;
       *darwin16*)
-        tgt_isa=x86_64
         tgt_os=darwin16
         ;;
       *darwin17*)
-        tgt_isa=x86_64
         tgt_os=darwin17
         ;;
       x86_64*mingw32*)
@@ -838,9 +830,16 @@
   #
   # Set up toolchain variables
   #
-  tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}')
-  tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}')
-  tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}')
+  if [ "$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print NF}')" = "4" ]; then
+      tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}')
+      tgt_flavor=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}')
+      tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}')
+      tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $4}')
+  else
+      tgt_isa=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $1}')
+      tgt_os=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $2}')
+      tgt_cc=$(echo ${toolchain} | awk 'BEGIN{FS="-"}{print $3}')
+  fi
 
   # Mark the specific ISA requested as enabled
   soft_enable ${tgt_isa}
@@ -876,12 +875,14 @@
   # Handle darwin variants. Newer SDKs allow targeting older
   # platforms, so use the newest one available.
   case ${toolchain} in
-    arm*-darwin*)
-      add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
-      iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
-      if [ -d "${iphoneos_sdk_dir}" ]; then
-        add_cflags  "-isysroot ${iphoneos_sdk_dir}"
-        add_ldflags "-isysroot ${iphoneos_sdk_dir}"
+    arm*-darwin*|aarch64*-darwin*)
+      if [ -z "${CROSS}" ]; then
+          add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
+          iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
+          if [ -d "${iphoneos_sdk_dir}" ]; then
+              add_cflags  "-isysroot ${iphoneos_sdk_dir}"
+              add_ldflags "-isysroot ${iphoneos_sdk_dir}"
+          fi
       fi
       ;;
     x86*-darwin*)
@@ -894,6 +895,8 @@
   esac
 
   case ${toolchain} in
+    aarch64-*-darwin*|arm-*-darwin*)
+      ;;  
     *-darwin8-*)
       add_cflags  "-mmacosx-version-min=10.4"
       add_ldflags "-mmacosx-version-min=10.4"
@@ -1153,16 +1156,17 @@
           ;;
 
         darwin*)
-          XCRUN_FIND="xcrun --sdk iphoneos --find"
-          CXX="$(${XCRUN_FIND} clang++)"
-          CC="$(${XCRUN_FIND} clang)"
-          AR="$(${XCRUN_FIND} ar)"
-          AS="$(${XCRUN_FIND} as)"
-          STRIP="$(${XCRUN_FIND} strip)"
-          NM="$(${XCRUN_FIND} nm)"
-          RANLIB="$(${XCRUN_FIND} ranlib)"
+          if [ -z "${CROSS}" ]; then
+              XCRUN_FIND="xcrun --sdk iphoneos --find }"
+          CXX="${CXX:-$(${XCRUN_FIND}clang++)}"
+          CC="${CC:-$(${XCRUN_FIND}clang)}"
+          AR="${AR:-$(${XCRUN_FIND}ar)}"
+          AS="${AS:-$(${XCRUN_FIND}as)}"
+          STRIP="${STRIP:-$(${XCRUN_FIND}strip)}"
+          NM="${NM:-$(${XCRUN_FIND}nm)}"
+          RANLIB="${RANLIB:-$(${XCRUN_FIND}ranlib)}"
           AS_SFX=.S
-          LD="${CXX:-$(${XCRUN_FIND} ld)}"
+          LD="${CXX:-$(${XCRUN_FIND}ld)}"
 
           # ASFLAGS is written here instead of using check_add_asflags
           # because we need to overwrite all of ASFLAGS and purge the
@@ -1208,6 +1212,7 @@
             check_add_asflags -fembed-bitcode
             check_add_ldflags -fembed-bitcode
           fi
+          fi
           ;;
 
         linux*)
diff -ur libvpx-1.8.0/configure libvpx-1.8.0+iPhone/configure
--- libvpx-1.8.0/configure	2019-02-04 07:02:33.000000000 -1000
+++ libvpx-1.8.0+iPhone/configure	2019-04-03 14:16:22.000000000 -1000
@@ -100,9 +100,11 @@
 # alphabetically by architecture, generic-gnu last.
 all_platforms="${all_platforms} arm64-android-gcc"
 all_platforms="${all_platforms} arm64-darwin-gcc"
+all_platforms="${all_platforms} aarch64-apple-darwin17-gcc"
 all_platforms="${all_platforms} arm64-linux-gcc"
 all_platforms="${all_platforms} arm64-win64-gcc"
 all_platforms="${all_platforms} arm64-win64-vs15"
+all_platforms="${all_platforms} arm-apple-darwin11-gcc"
 all_platforms="${all_platforms} armv7-android-gcc"   #neon Cortex-A8
 all_platforms="${all_platforms} armv7-darwin-gcc"    #neon Cortex-A8
 all_platforms="${all_platforms} armv7-linux-rvct"    #neon Cortex-A8