Skip to content

Commit e90b583

Browse files
committed
Bring our compiler commands more inline with MRI's defaults.
1 parent b72cc22 commit e90b583

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/truffle/rbconfig-for-mkmf.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@
140140
end
141141

142142
for_pipe = proc do |compiler, flags, opt_command|
143-
"#{preprocess_ruby} #{cext_dir}/preprocess.rb $< | #{compiler} -I$(<D) #{flags} - -o $@ && #{opt_command}"
143+
"#{preprocess_ruby} #{cext_dir}/preprocess.rb $< | #{compiler} -I$(<D) #{flags}&& #{opt_command}"
144144
end
145145

146-
c_flags = '$(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG) -xc'
147-
cxx_flags = '$(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG) -xc++'
146+
c_flags = '$(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -xc'
147+
cxx_flags = '$(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -xc++'
148148
opt_command = "#{opt} #{opt_passes} $@ -o $@"
149149

150-
mkconfig['TRUFFLE_RAW_COMPILE_C'] = for_pipe.call('$(CC)', c_flags, opt_command)
150+
mkconfig['TRUFFLE_RAW_COMPILE_C'] = for_file.call('$(CC)', c_flags, opt_command)
151151
mkconfig['COMPILE_C'] = with_conditional_preprocessing.call(
152152
for_pipe.call('$(CC)', c_flags, opt_command),
153153
for_file.call('$(CC)', c_flags, opt_command))

lib/truffle/rbconfig.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ module RbConfig
6161
'build' => host,
6262
'build_os' => host_os_full,
6363
'configure_args' => ' ',
64+
'COUTFLAG' => '-o ',
6465
'CPPFLAGS' => '',
6566
'CPPOUTFILE' => '-o conftest.i',
6667
'DLDFLAGS' => '',

0 commit comments

Comments
 (0)