summaryrefslogtreecommitdiffhomepage
path: root/tasks/toolchains/openwrt.rake
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-01-06 17:06:07 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-01-06 17:06:07 +0900
commit74c9502bd45fd70926c86ce564c2d5d1df9a6dd0 (patch)
tree4dbf22f15e482bf082712286bcf0daa5e51aa41c /tasks/toolchains/openwrt.rake
parent1341e53961b3e99ac67d803e5ead677e976d18c4 (diff)
parent456878ba06358a77d4ab9312fdc69bf780f8fdf4 (diff)
downloadmruby-74c9502bd45fd70926c86ce564c2d5d1df9a6dd0.tar.gz
mruby-74c9502bd45fd70926c86ce564c2d5d1df9a6dd0.zip
Merge branch 'improve-source-scanning-for-presym' of https://github.com/shuujii/mruby into shuujii-improve-source-scanning-for-presym
Diffstat (limited to 'tasks/toolchains/openwrt.rake')
-rw-r--r--tasks/toolchains/openwrt.rake23
1 files changed, 9 insertions, 14 deletions
diff --git a/tasks/toolchains/openwrt.rake b/tasks/toolchains/openwrt.rake
index c376d96ec..d5763d8de 100644
--- a/tasks/toolchains/openwrt.rake
+++ b/tasks/toolchains/openwrt.rake
@@ -1,24 +1,19 @@
# usage of environmental variables to set the
# cross compiling toolchain proper
MRuby::Toolchain.new(:openwrt) do |conf|
- [conf.cc, conf.objc, conf.asm].each do |cc|
- cc.command = ENV['TARGET_CC']
- cc.flags = ENV['TARGET_CFLAGS']
- cc.include_paths = ["#{MRUBY_ROOT}/include"]
+ [conf.cc, conf.cxx, conf.objc, conf.asm].each do |cc|
+ if cc == conf.cxx
+ cc.command = ENV['TARGET_CXX']
+ cc.flags = ENV['TARGET_CXXFLAGS']
+ else
+ cc.command = ENV['TARGET_CC']
+ cc.flags = ENV['TARGET_CFLAGS']
+ end
cc.option_include_path = %q[-I"%s"]
cc.option_define = '-D%s'
- cc.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"]
+ cc.compile_options = %q[%{flags} -MMD -MF "%{outfile}.d" -o "%{outfile}" -c "%{infile}"]
end
- [conf.cxx].each do |cxx|
- cxx.command = ENV['TARGET_CXX']
- cxx.flags = ENV['TARGET_CXXFLAGS']
- cxx.include_paths = ["#{MRUBY_ROOT}/include"]
- cxx.option_include_path = %q[-I"%s"]
- cxx.option_define = '-D%s'
- cxx.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"]
- end
-
conf.linker do |linker|
linker.command = ENV['TARGET_CC']
linker.flags = ENV['TARGET_LDFLAGS']