• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mrubyを超漢字で動作させる


Commit MetaInfo

Revisãoae926e08026f31666b384337ba33898f67bfa4a7 (tree)
Hora2015-10-12 20:44:40
AutorYukihiro "Matz" Matsumoto <matz@ruby...>
CommiterYukihiro "Matz" Matsumoto

Mensagem de Log

Merge pull request #2988 from crimsonwoods/update_androidndk_rake

Update androidndk.rake to add support 64bit architectures.

Mudança Sumário

Diff

--- a/tasks/toolchains/androidndk.rake
+++ b/tasks/toolchains/androidndk.rake
@@ -53,7 +53,20 @@ Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
5353 params.fetch(:toolchain_version) do
5454 test = case toolchain
5555 when :gcc
56- 'arm-linux-androideabi-*'
56+ case arch
57+ when /armeabi/
58+ 'arm-linux-androideabi-*'
59+ when /arm64/
60+ 'aarch64-linux-android-*'
61+ when /mips64/
62+ 'mips64el-linux-android-*'
63+ when /mips/
64+ 'mipsel-linux-android-*'
65+ when /x86_64/
66+ 'x86_64-*'
67+ when /x86/
68+ 'x86-*'
69+ end
5770 when :clang
5871 'llvm-*'
5972 end
@@ -67,9 +80,12 @@ Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
6780 when :clang then 'llvm-'
6881 when :gcc
6982 case arch
70- when /arm/ then 'arm-linux-androideabi-'
71- when /x86/ then 'x86-'
72- when /mips/ then 'mipsel-linux-android-'
83+ when /armeabi/ then 'arm-linux-androideabi-'
84+ when /arm64/ then 'aarch64-linux-android-'
85+ when /x86_64/ then 'x86_64-'
86+ when /x86/ then 'x86-'
87+ when /mips64/ then 'mips64el-linux-android-'
88+ when /mips/ then 'mipsel-linux-android-'
7389 end
7490 end
7591 home_path.join('toolchains', prefix + toolchain_version.to_s, 'prebuilt', host_platform)
@@ -77,9 +93,12 @@ Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
7793
7894 def sysroot
7995 path = case arch
80- when /arm/ then 'arch-arm'
81- when /x86/ then 'arch-x86'
82- when /mips/ then 'arch-mips'
96+ when /armeabi/ then 'arch-arm'
97+ when /arm64/ then 'arch-arm64'
98+ when /x86_64/ then 'arch-x86_64'
99+ when /x86/ then 'arch-x86'
100+ when /mips64/ then 'arch-mips64'
101+ when /mips/ then 'arch-mips'
83102 end
84103
85104 home_path.join('platforms', platform, path).to_s
@@ -90,9 +109,12 @@ Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
90109
91110 if toolchain == :gcc
92111 command = case arch
93- when /arm/ then 'arm-linux-androideabi-'
94- when /x86/ then 'i686-linux-android-'
95- when /mips/ then 'mipsel-linux-android-'
112+ when /armeabi/ then 'arm-linux-androideabi-'
113+ when /arm64/ then 'aarch64-linux-android-'
114+ when /x86_64/ then 'x86_64-linux-android-'
115+ when /x86/ then 'i686-linux-android-'
116+ when /mips64/ then 'mips64el-linux-android-'
117+ when /mips/ then 'mipsel-linux-android-'
96118 end + command
97119 end
98120
@@ -111,15 +133,21 @@ Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
111133
112134 case toolchain
113135 when :gcc
114- flags += %W(-ffunction-sections -funwind-tables -fstack-protector)
136+ flags += %W(-ffunction-sections -funwind-tables -no-canonical-prefixes)
115137 flags += %W(-D__android__ -mandroid --sysroot="#{sysroot}")
116138 case arch
139+ when /arm64/
140+ flags += %W(-fpic -fstack-protector-strong)
141+ when 'armeabi-v7a-hard'
142+ flags += %W(-fpic -fstack-protector-strong -march=armv7-a -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -mfpu=vfpv3-d16)
117143 when 'armeabi-v7a'
118- flags += %W(-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16)
144+ flags += %W(-fpic -fstack-protector-strong -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16)
119145 when /arm/
120- flags += %W(-march=armv5te -mtune=xscale -msoft-float)
146+ flags += %W(-fpic -fstack-protector-strong -march=armv5te -mtune=xscale -msoft-float)
121147 when /mips/
122148 flags += %W(-fpic -fno-strict-aliasing -finline-functions -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers)
149+ when /x86/
150+ flags += %W(-fstack-protector-strong)
123151 end
124152 when :clang
125153 end
@@ -132,7 +160,18 @@ Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
132160 end
133161
134162 def ldflags
135- %W(-D__android__ -mandroid --sysroot="#{sysroot}")
163+ flags = []
164+ case toolchain
165+ when :gcc
166+ flags += %W(-no-canonical-prefixes)
167+ flags += %W(-D__android__ -mandroid --sysroot="#{sysroot}")
168+ case arch
169+ when 'armeabi-v7a-hard'
170+ flags += %W(-march=armv7-a -Wl,--fix-cortex-a8 -Wl,--no-warn-mismatch -lm_hard)
171+ when 'armeabi-v7a'
172+ flags += %W(-march=armv7-a -Wl,--fix-cortex-a8)
173+ end
174+ end
136175 end
137176
138177 def ar