Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
5d2795c0
Commit
5d2795c0
authored
Oct 08, 2016
by
Felix Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed mips and mips64: GCC Toolchain now points to GCC.
parent
5fd068eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
22 deletions
+29
-22
tasks/toolchains/android.rake
tasks/toolchains/android.rake
+29
-22
No files found.
tasks/toolchains/android.rake
View file @
5d2795c0
...
@@ -18,7 +18,8 @@ class MRuby::Toolchain::Android
...
@@ -18,7 +18,8 @@ class MRuby::Toolchain::Android
ARCHITECTURES
=
%w{
ARCHITECTURES
=
%w{
armeabi armeabi-v7a arm64-v8a
armeabi armeabi-v7a arm64-v8a
x86 x86_64
x86 x86_64
}
# TODO : Add mips mips64 support
mips mips64
}
class
AndroidNDKHomeNotFound
<
StandardError
class
AndroidNDKHomeNotFound
<
StandardError
def
message
def
message
...
@@ -59,26 +60,6 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
...
@@ -59,26 +60,6 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
when
/mips/
then
'mipsel-linux-android-'
when
/mips/
then
'mipsel-linux-android-'
end
+
command
end
+
command
prefix
=
case
arch
when
/armeabi/
then
'arm-linux-androideabi-'
when
/arm64-v8a/
then
'aarch64-linux-android-'
when
/x86_64/
then
'x86_64-'
when
/x86/
then
'x86-'
when
/mips64/
then
'mips64el-linux-android-'
when
/mips/
then
'mipsel-linux-android-'
end
test
=
case
arch
when
/armeabi/
then
'arm-linux-androideabi-*'
when
/arm64-v8a/
then
'aarch64-linux-android-*'
when
/x86_64/
then
'x86_64-*'
when
/x86/
then
'x86-*'
when
/mips64/
then
'mips64el-linux-android-*'
when
/mips/
then
'mipsel-linux-android-*'
end
gcc_toolchain_version
=
Dir
[
home_path
.
join
(
'toolchains'
,
test
)].
map
{
|
t
|
t
.
match
(
/-(\d+\.\d+)$/
);
$1
.
to_f
}.
max
gcc_toolchain_path
=
home_path
.
join
(
'toolchains'
,
prefix
+
gcc_toolchain_version
.
to_s
,
'prebuilt'
,
host_platform
)
gcc_toolchain_path
.
join
(
'bin'
,
command
).
to_s
gcc_toolchain_path
.
join
(
'bin'
,
command
).
to_s
end
end
end
end
...
@@ -112,6 +93,32 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
...
@@ -112,6 +93,32 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
end
end
end
end
def
gcc_toolchain_path
if
@gcc_toolchain_path
===
nil
then
prefix
=
case
arch
when
/armeabi/
then
'arm-linux-androideabi-'
when
/arm64-v8a/
then
'aarch64-linux-android-'
when
/x86_64/
then
'x86_64-'
when
/x86/
then
'x86-'
when
/mips64/
then
'mips64el-linux-android-'
when
/mips/
then
'mipsel-linux-android-'
end
test
=
case
arch
when
/armeabi/
then
'arm-linux-androideabi-*'
when
/arm64-v8a/
then
'aarch64-linux-android-*'
when
/x86_64/
then
'x86_64-*'
when
/x86/
then
'x86-*'
when
/mips64/
then
'mips64el-linux-android-*'
when
/mips/
then
'mipsel-linux-android-*'
end
gcc_toolchain_version
=
Dir
[
home_path
.
join
(
'toolchains'
,
test
)].
map
{
|
t
|
t
.
match
(
/-(\d+\.\d+)$/
);
$1
.
to_f
}.
max
@gcc_toolchain_path
=
home_path
.
join
(
'toolchains'
,
prefix
+
gcc_toolchain_version
.
to_s
,
'prebuilt'
,
host_platform
)
end
@gcc_toolchain_path
end
def
host_platform
def
host_platform
@host_platform
||=
case
RUBY_PLATFORM
@host_platform
||=
case
RUBY_PLATFORM
when
/cygwin|mswin|mingw|bccwin|wince|emx/i
when
/cygwin|mswin|mingw|bccwin|wince|emx/i
...
@@ -199,7 +206,7 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
...
@@ -199,7 +206,7 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
flags
+=
%W(-D__android__ --sysroot="
#{
sysroot
}
")
flags
+=
%W(-D__android__ --sysroot="
#{
sysroot
}
")
case
toolchain
case
toolchain
when
:clang
when
:clang
flags
+=
%W(-gcc-toolchain "
#{
toolchain_path
.
to_s
}
")
flags
+=
%W(-gcc-toolchain "
#{
gcc_
toolchain_path
.
to_s
}
")
case
arch
case
arch
when
/armeabi-v7a/
then
flags
+=
%W(-target armv7-none-linux-androideabi)
when
/armeabi-v7a/
then
flags
+=
%W(-target armv7-none-linux-androideabi)
when
/armeabi/
then
flags
+=
%W(-target armv5te-none-linux-androideabi)
when
/armeabi/
then
flags
+=
%W(-target armv5te-none-linux-androideabi)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment