Skip to content

Commit

Permalink
Minimize the if openbsd? block
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Dec 7, 2016
1 parent a3db87e commit 4f792a2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,12 @@ def using_system_libraries?
do_clean
end

if openbsd? && !ENV['CC']
unless find_executable 'egcc'
message "please install gcc 4.9+ from ports using `pkg_add -v gcc`\n"
exit! 1
end
RbConfig::MAKEFILE_CONFIG['CC'] = find_executable 'egcc'
elsif ENV['CC']
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC']
if openbsd?
ENV['CC'] ||= find_executable('egcc')

This comment has been minimized.

Copy link
@larskanis

larskanis Dec 29, 2016

Member

@knu did you miss the or after find_executable? See #1569

This comment has been minimized.

Copy link
@knu

knu Dec 29, 2016

Author Member

@larskanis Exactly! Would you mind fixing it?

abort "Please install gcc 4.9+ from ports using `pkg_add -v gcc`"
end

RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
# use same c compiler for libxml and libxslt
ENV['CC'] = RbConfig::MAKEFILE_CONFIG['CC']

Expand Down

0 comments on commit 4f792a2

Please sign in to comment.