Skip to content

Commit

Permalink
Merge branch 'master' into jeremymv2/aix
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Mar 30, 2018
2 parents 2667b16 + a6b572d commit a3208e0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ext/unf_ext/extconf.rb
Expand Up @@ -5,7 +5,19 @@
else
have_library('stdc++')

if RbConfig::CONFIG['host_os'] =~ /aix/
case RbConfig::CONFIG['host_os']
when /solaris(!?2.11)/
# Do a little trickery here to enable C++ standard on Solaris 11 if found.
# This also forces 64bit compilation mode.
$CXX = CONFIG['CXX']
$CXX << ' ' << '-m64'
$CFLAGS = CONFIG['CFLAGS'].gsub(/-std=c99/, '')
$CFLAGS << ' ' << '-m64 -std=c++11'
$CPPFLAGS = CONFIG['CFLAGS'].gsub(/-std=c99/, '')
$CPPFLAGS << ' ' << '-m64 -std=c++11'
$CXXFLAGS = CONFIG['CFLAGS'].gsub(/-std=c99/, '')
$CXXFLAGS << ' ' << '-m64 -std=c++11'
when /aix/
# Compiler flags necessary on AIX.
# rubocop:disable Style/GlobalVars
$CFLAGS << ' ' << '-D_ALL_SOURCE=1'
Expand Down

0 comments on commit a3208e0

Please sign in to comment.