Commit 33698d73 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge branch 'modify_toolchains_gcc' of https://github.com/crimsonwoods/mruby...

Merge branch 'modify_toolchains_gcc' of https://github.com/crimsonwoods/mruby into crimsonwoods-modify_toolchains_gcc
parents ed0d9f00 92916bb4
MRuby::Toolchain.new(:gcc) do |conf| MRuby::Toolchain.new(:gcc) do |conf|
[conf.cc, conf.cxx, conf.objc, conf.asm].each do |cc| [conf.cc, conf.objc, conf.asm].each do |cc|
cc.command = ENV['CC'] || 'gcc' cc.command = ENV['CC'] || 'gcc'
cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration)] cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration)]
cc.include_paths = ["#{MRUBY_ROOT}/include"] cc.include_paths = ["#{MRUBY_ROOT}/include"]
...@@ -9,6 +9,16 @@ MRuby::Toolchain.new(:gcc) do |conf| ...@@ -9,6 +9,16 @@ MRuby::Toolchain.new(:gcc) do |conf|
cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
end end
[conf.cxx].each do |cxx|
cxx.command = ENV['CXX'] || 'g++'
cxx.flags = [ENV['CXXFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration)]
cxx.include_paths = ["#{MRUBY_ROOT}/include"]
cxx.defines = %w(DISABLE_GEMS)
cxx.option_include_path = '-I%s'
cxx.option_define = '-D%s'
cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
end
conf.linker do |linker| conf.linker do |linker|
linker.command = ENV['LD'] || 'gcc' linker.command = ENV['LD'] || 'gcc'
linker.flags = [ENV['LDFLAGS'] || %w()] linker.flags = [ENV['LDFLAGS'] || %w()]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment