summaryrefslogtreecommitdiffhomepage
path: root/tasks/toolchains/openwrt.rake
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-01-06 17:14:12 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-01-06 17:14:12 +0900
commit8e048ae25db2c00e983bb75f915058844a50c0cb (patch)
tree4dbf22f15e482bf082712286bcf0daa5e51aa41c /tasks/toolchains/openwrt.rake
parent1341e53961b3e99ac67d803e5ead677e976d18c4 (diff)
parent74c9502bd45fd70926c86ce564c2d5d1df9a6dd0 (diff)
downloadmruby-8e048ae25db2c00e983bb75f915058844a50c0cb.tar.gz
mruby-8e048ae25db2c00e983bb75f915058844a50c0cb.zip
Merge branch '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']