summaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorcrimsonwoods <[email protected]>2017-02-15 02:36:37 +0900
committercrimsonwoods <[email protected]>2017-02-15 03:03:47 +0900
commita6b1e964a3cb4cc0e09d4ecc89e4fee682f8446c (patch)
treeef1a853f705d01d8281233ce76f473ca86bf4c34 /tasks
parent838fa69aa318bba76542cea9abcdb9738c6f202f (diff)
downloadmruby-a6b1e964a3cb4cc0e09d4ecc89e4fee682f8446c.tar.gz
mruby-a6b1e964a3cb4cc0e09d4ecc89e4fee682f8446c.zip
Modify default cflags.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/toolchains/android.rake30
1 files changed, 16 insertions, 14 deletions
diff --git a/tasks/toolchains/android.rake b/tasks/toolchains/android.rake
index eb6c7c2ce..7759a3f9c 100644
--- a/tasks/toolchains/android.rake
+++ b/tasks/toolchains/android.rake
@@ -203,31 +203,33 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
def cflags
flags = []
- flags += %W(-D__android__ --sysroot="#{sysroot}")
+ flags += %W(-MMD -MP)
+ flags += %W(-D__android__ -DANDROID --sysroot="#{sysroot}")
case toolchain
when :gcc
- flags += %W(-mandroid)
case arch
- when /armeabi-v7a/ then flags += %W(-march=armv7-a)
- when /armeabi/ then flags += %W(-march=armv5te)
- when /arm64-v8a/ then flags += %W(-march=armv8-a)
+ when /armeabi-v7a/ then flags += %W(-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fpic)
+ when /armeabi/ then flags += %W(-march=armv5te -mtune=xscale -msoft-float -fpic)
+ when /arm64-v8a/ then flags += %W(-march=armv8-a -fpic)
when /x86_64/ then flags += %W(-march=x86-64)
when /x86/ then flags += %W(-march=i686)
- when /mips64/ then flags += %W(-march=mips64)
- when /mips/ then flags += %W(-march=mips32)
+ when /mips64/ then flags += %W(-march=mips64r6 -fmessage-length=0 -fpic)
+ when /mips/ then flags += %W(-march=mips32 -fmessage-length=0 -fpic)
end
when :clang
flags += %W(-gcc-toolchain "#{gcc_toolchain_path.to_s}")
case arch
- when /armeabi-v7a/ then flags += %W(-target armv7-none-linux-androideabi)
- when /armeabi/ then flags += %W(-target armv5te-none-linux-androideabi)
- when /arm64-v8a/ then flags += %W(-target aarch64-none-linux-android)
- when /x86_64/ then flags += %W(-target x86_64-none-linux-android)
- when /x86/ then flags += %W(-target i686-none-linux-android)
- when /mips64/ then flags += %W(-target mips64el-none-linux-android)
- when /mips/ then flags += %W(-target mipsel-none-linux-android)
+ when /armeabi-v7a/ then flags += %W(-target armv7-none-linux-androideabi -fpic)
+ when /armeabi/ then flags += %W(-target armv5te-none-linux-androideabi -fpic)
+ when /arm64-v8a/ then flags += %W(-target aarch64-none-linux-android -fpic)
+ when /x86_64/ then flags += %W(-target x86_64-none-linux-android -fPIC)
+ when /x86/ then flags += %W(-target i686-none-linux-android -fPIC)
+ when /mips64/ then flags += %W(-target mips64el-none-linux-android -fmessage-length=0 -fpic)
+ when /mips/ then flags += %W(-target mipsel-none-linux-android -fmessage-length=0 -fpic)
end
+ flags += %W(-Wno-invalid-command-line-argument -Wno-unused-command-line-argument)
end
+ flags += %W(-ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes)
flags
end