|
1 | 1 | MRuby::Build.new do |conf|
|
2 |
| - # load specific toolchain settings |
3 |
| - |
4 |
| - # Gets set by the VS command prompts. |
5 |
| - if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] |
6 |
| - toolchain :visualcpp |
7 |
| - else |
8 |
| - toolchain :gcc |
9 |
| - end |
| 2 | + toolchain :gcc |
10 | 3 |
|
11 | 4 | enable_debug
|
12 | 5 |
|
13 |
| - # Use mrbgems |
14 |
| - # conf.gem 'examples/mrbgems/ruby_extension_example' |
15 |
| - # conf.gem 'examples/mrbgems/c_extension_example' do |g| |
16 |
| - # g.cc.flags << '-g' # append cflags in this gem |
17 |
| - # end |
18 |
| - # conf.gem 'examples/mrbgems/c_and_ruby_extension_example' |
19 |
| - # conf.gem :core => 'mruby-eval' |
20 |
| - # conf.gem :mgem => 'mruby-io' |
21 |
| - # conf.gem :github => 'iij/mruby-io' |
22 |
| - # conf.gem :git => '[email protected]:iij/mruby-io.git', :branch => 'master', :options => '-v' |
23 |
| - |
24 |
| - # include the default GEMs |
25 |
| - conf.gembox 'default' |
26 |
| - # C compiler settings |
27 |
| - # conf.cc do |cc| |
28 |
| - # cc.command = ENV['CC'] || 'gcc' |
29 |
| - # cc.flags = [ENV['CFLAGS'] || %w()] |
30 |
| - # cc.include_paths = ["#{root}/include"] |
31 |
| - # cc.defines = %w(DISABLE_GEMS) |
32 |
| - # cc.option_include_path = '-I%s' |
33 |
| - # cc.option_define = '-D%s' |
34 |
| - # cc.compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}" |
35 |
| - # end |
36 |
| - |
37 |
| - # mrbc settings |
38 |
| - # conf.mrbc do |mrbc| |
39 |
| - # mrbc.compile_options = "-g -B%{funcname} -o-" # The -g option is required for line numbers |
40 |
| - # end |
41 |
| - |
42 |
| - # Linker settings |
43 |
| - # conf.linker do |linker| |
44 |
| - # linker.command = ENV['LD'] || 'gcc' |
45 |
| - # linker.flags = [ENV['LDFLAGS'] || []] |
46 |
| - # linker.flags_before_libraries = [] |
47 |
| - # linker.libraries = %w() |
48 |
| - # linker.flags_after_libraries = [] |
49 |
| - # linker.library_paths = [] |
50 |
| - # linker.option_library = '-l%s' |
51 |
| - # linker.option_library_path = '-L%s' |
52 |
| - # linker.link_options = "%{flags} -o %{outfile} %{objs} %{libs}" |
53 |
| - # end |
54 |
| - |
55 |
| - # Archiver settings |
56 |
| - # conf.archiver do |archiver| |
57 |
| - # archiver.command = ENV['AR'] || 'ar' |
58 |
| - # archiver.archive_options = 'rs %{outfile} %{objs}' |
59 |
| - # end |
60 |
| - |
61 |
| - # Parser generator settings |
62 |
| - # conf.yacc do |yacc| |
63 |
| - # yacc.command = ENV['YACC'] || 'bison' |
64 |
| - # yacc.compile_options = '-o %{outfile} %{infile}' |
65 |
| - # end |
66 |
| - |
67 |
| - # gperf settings |
68 |
| - # conf.gperf do |gperf| |
69 |
| - # gperf.command = 'gperf' |
70 |
| - # gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}' |
71 |
| - # end |
72 |
| - |
73 |
| - # file extensions |
74 |
| - # conf.exts do |exts| |
75 |
| - # exts.object = '.o' |
76 |
| - # exts.executable = '' # '.exe' if Windows |
77 |
| - # exts.library = '.a' |
78 |
| - # end |
79 |
| - |
80 |
| - # file separetor |
81 |
| - # conf.file_separator = '/' |
82 |
| - |
83 |
| - # bintest |
84 |
| - # conf.enable_bintest |
85 |
| -end |
86 |
| - |
87 |
| -MRuby::Build.new('host-debug') do |conf| |
88 |
| - # load specific toolchain settings |
89 |
| - |
90 |
| - # Gets set by the VS command prompts. |
91 |
| - if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] |
92 |
| - toolchain :visualcpp |
93 |
| - else |
94 |
| - toolchain :gcc |
| 6 | + conf.linker do |linker| |
| 7 | + linker.libraries = %w(softfloat) |
| 8 | + linker.library_paths = ["./"] |
95 | 9 | end
|
96 |
| - |
97 |
| - enable_debug |
98 |
| - |
99 |
| - # include the default GEMs |
100 |
| - conf.gembox 'default' |
101 |
| - |
102 |
| - # C compiler settings |
103 |
| - conf.cc.defines = %w(MRB_ENABLE_DEBUG_HOOK) |
104 |
| - |
105 |
| - # Generate mruby debugger command (require mruby-eval) |
106 |
| - conf.gem :core => "mruby-bin-debugger" |
107 |
| - |
108 |
| - # bintest |
109 |
| - # conf.enable_bintest |
110 |
| -end |
111 |
| - |
112 |
| -MRuby::Build.new('test') do |conf| |
113 |
| - # Gets set by the VS command prompts. |
114 |
| - if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] |
115 |
| - toolchain :visualcpp |
116 |
| - else |
117 |
| - toolchain :gcc |
118 |
| - end |
119 |
| - |
120 |
| - enable_debug |
121 |
| - conf.enable_bintest |
122 |
| - conf.enable_test |
123 |
| - |
124 |
| - conf.gembox 'default' |
| 10 | + conf.cc.flags << "-mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-stack-protector" |
125 | 11 | end
|
126 |
| - |
127 |
| -#MRuby::Build.new('bench') do |conf| |
128 |
| -# # Gets set by the VS command prompts. |
129 |
| -# if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] |
130 |
| -# toolchain :visualcpp |
131 |
| -# else |
132 |
| -# toolchain :gcc |
133 |
| -# conf.cc.flags << '-O3' |
134 |
| -# end |
135 |
| -# |
136 |
| -# conf.gembox 'default' |
137 |
| -#end |
138 |
| - |
139 | 12 | # Define cross build settings
|
140 | 13 | # MRuby::CrossBuild.new('32bit') do |conf|
|
141 | 14 | # toolchain :gcc
|
|
0 commit comments