diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-01-20 14:41:50 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-01-20 14:41:50 -0800 |
| commit | 8e86ff2283d427b5cb2a02607e1aab998cb5090c (patch) | |
| tree | bd40d166673b2290053f1742660d573d5586a974 /tasks/toolchains/gcc.rake | |
| parent | cc16bd7c0d70b326ddcf8de8a511116dae9fc30d (diff) | |
| parent | ced80d2b4b1ed4ef0752a8bbaf0dbfe7aa6c6a95 (diff) | |
| download | mruby-8e86ff2283d427b5cb2a02607e1aab998cb5090c.tar.gz mruby-8e86ff2283d427b5cb2a02607e1aab998cb5090c.zip | |
Merge pull request #755 from masuidrive/imprive_build_scripts
Improved build scripts and config files
Diffstat (limited to 'tasks/toolchains/gcc.rake')
| -rw-r--r-- | tasks/toolchains/gcc.rake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tasks/toolchains/gcc.rake b/tasks/toolchains/gcc.rake new file mode 100644 index 000000000..c624c8fc9 --- /dev/null +++ b/tasks/toolchains/gcc.rake @@ -0,0 +1,21 @@ +MRuby::Toolchain.new(:gcc) do |conf| + conf.cc do |cc| + cc.command = ENV['CC'] || 'gcc' + cc.flags = [ENV['CFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration)] + cc.include_paths = ["#{root}/include"] + cc.defines = %w(DISABLE_GEMS) + cc.option_include_path = '-I%s' + cc.option_define = '-D%s' + cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' + end + + conf.linker do |linker| + linker.command = ENV['LD'] || 'gcc' + linker.flags = [ENV['LDFLAGS'] || %w()] + linker.libraries = %w(m) + linker.library_paths = [] + linker.option_library = '-l%s' + linker.option_library_path = '-L%s' + linker.link_options = '%{flags} -o %{outfile} %{objs} %{libs}' + end +end |
