From e47e8a25120be53fd55d808210344aaea32c0a25 Mon Sep 17 00:00:00 2001 From: Robert Rowe Date: Mon, 8 Jul 2013 21:16:16 -0700 Subject: Fix the androideabi toolchain not matching host The included method of determining the host platform in the androideabi would not match to windows if RUBY_PLATFORM returned mingw, wince, or emx. As an added pre-caution, using a case statement with regexp matching will better determine the host platform since it won't be case sensitive and for windows is set to match more specifially than just "win". --- tasks/toolchains/androideabi.rake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tasks/toolchains') diff --git a/tasks/toolchains/androideabi.rake b/tasks/toolchains/androideabi.rake index a69fd1a9d..51897667e 100644 --- a/tasks/toolchains/androideabi.rake +++ b/tasks/toolchains/androideabi.rake @@ -41,20 +41,21 @@ MRuby::Toolchain.new(:androideabi) do |conf| end if ANDROID_STANDALONE_TOOLCHAIN == nil then - if RUBY_PLATFORM.include?('darwin') then + case RUBY_PLATFORM + when /cygwin|mswin|mingw|bccwin|wince|emx/i + HOST_PLATFORM = 'windows' + when /darwin/i HOST_PLATFORM = 'darwin-x86' - elsif RUBY_PLATFORM.include?('linux') then + when /linux/i HOST_PLATFORM = 'linux-x86' - elsif RUBY_PLATFORM.include?('win') then - HOST_PLATFORM = 'windows' else - # Unknown host platform. + # Unknown host platform end ANDROID_TARGET_PLATFORM = ENV['ANDROID_TARGET_PLATFORM'] || DEFAULT_ANDROID_TARGET_PLATFORM path_to_toolchain = ANDROID_NDK_HOME + '/toolchains/' - path_to_sysroot = ANDROID_NDK_HOME + '/platforms/' + ANDROID_TARGET_PLATFORM + path_to_sysroot = ANDROID_NDK_HOME + '/platforms/' + ANDROID_TARGET_PLATFORM if ANDROID_TOOLCHAIN.downcase == 'gcc' then case ANDROID_TARGET_ARCH.downcase when 'arch-arm', 'arm' then -- cgit v1.2.3 From ccf69cde8ae52aee86db1b1eff286798e3cc5aed Mon Sep 17 00:00:00 2001 From: crimsonwoods Date: Sat, 20 Jul 2013 14:42:09 +0900 Subject: Improve Android NDK toolchain support. Linux-x86_64 has not been supported now. This commit add Linux-x86_64 platform support. --- tasks/toolchains/androideabi.rake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tasks/toolchains') diff --git a/tasks/toolchains/androideabi.rake b/tasks/toolchains/androideabi.rake index 51897667e..a20027c0d 100644 --- a/tasks/toolchains/androideabi.rake +++ b/tasks/toolchains/androideabi.rake @@ -46,6 +46,8 @@ MRuby::Toolchain.new(:androideabi) do |conf| HOST_PLATFORM = 'windows' when /darwin/i HOST_PLATFORM = 'darwin-x86' + when /x86_64-linux/i + HOST_PLATFORM = 'linux-x86_64' when /linux/i HOST_PLATFORM = 'linux-x86' else -- cgit v1.2.3