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
|
From 42c387601ec8ebb84447a92879abe14f9af4de5a Mon Sep 17 00:00:00 2001
Date: Mon, 1 Jun 2020 07:57:47 -0700
Subject: [PATCH] arm64-darwin-fixes
---
build/make/configure.sh | 80 +++++++++++++++++++++++++++++++++++------
1 file changed, 70 insertions(+), 10 deletions(-)
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 472e7de..fbe5e97 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -737,6 +737,9 @@ process_common_toolchain() {
aarch64*)
tgt_isa=arm64
;;
+ arm64*)
+ tgt_isa=arm64
+ ;;
armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf)
tgt_isa=armv7
float_abi=hard
@@ -768,35 +771,35 @@ process_common_toolchain() {
# detect tgt_os
case "$gcctarget" in
*darwin10*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin10
;;
*darwin11*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin11
;;
*darwin12*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin12
;;
*darwin13*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin13
;;
*darwin14*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin14
;;
*darwin15*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin15
;;
*darwin16*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin16
;;
*darwin17*)
- tgt_isa=x86_64
+ #tgt_isa=x86_64
tgt_os=darwin17
;;
x86_64*mingw32*)
@@ -873,7 +876,7 @@ process_common_toolchain() {
# Handle darwin variants. Newer SDKs allow targeting older
# platforms, so use the newest one available.
case ${toolchain} in
- arm*-darwin*)
+ arm*-ios*)
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
if [ -d "${iphoneos_sdk_dir}" ]; then
@@ -881,6 +884,13 @@ process_common_toolchain() {
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
fi
;;
+ arm*-darwin*)
+ osx_sdk_dir="$(show_darwin_sdk_path macosx)"
+ if [ -d "${osx_sdk_dir}" ]; then
+ add_cflags "-isysroot ${osx_sdk_dir}"
+ add_ldflags "-isysroot ${osx_sdk_dir}"
+ fi
+ ;;
x86*-darwin*)
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
if [ -d "${osx_sdk_dir}" ]; then
@@ -1104,7 +1114,7 @@ EOF
soft_enable unit_tests
;;
- darwin*)
+ ios*)
XCRUN_FIND="xcrun --sdk iphoneos --find"
CXX="$(${XCRUN_FIND} clang++)"
CC="$(${XCRUN_FIND} clang)"
@@ -1162,6 +1172,56 @@ EOF
fi
;;
+ darwin*)
+ XCRUN_FIND="xcrun --sdk macosx --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)"
+ AS_SFX=.S
+ 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
+ # options that were put in above
+ ASFLAGS="-arch ${tgt_isa} -g"
+
+ add_cflags -arch ${tgt_isa}
+ add_ldflags -arch ${tgt_isa}
+
+ alt_libc="$(show_darwin_sdk_path macosx)"
+ if [ -d "${alt_libc}" ]; then
+ add_cflags -isysroot ${alt_libc}
+ fi
+
+ for d in lib usr/lib usr/lib/system; do
+ try_dir="${alt_libc}/${d}"
+ [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
+ done
+
+ case ${tgt_isa} in
+ armv7|armv7s|armv8|arm64)
+ if enabled neon && ! check_xcode_minimum_version; then
+ soft_disable neon
+ log_echo " neon disabled: upgrade Xcode (need v6.3+)."
+ if enabled neon_asm; then
+ soft_disable neon_asm
+ log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
+ fi
+ fi
+ ;;
+ esac
+
+ asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
+
+ ;;
+
+
+
+
linux*)
enable_feature linux
if enabled rvct; then
--
2.24.2 (Apple Git-127)
|