Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use -fno-strict-aliasing instead of -O1 for SmartOS

  • Loading branch information...
commit c98adce363bd2ccfd2469ca467801304374e1370 1 parent bab59f3
@isaacs authored
Showing with 7 additions and 7 deletions.
  1. +3 −3 common.gypi
  2. +4 −4 configure
View
6 common.gypi
@@ -38,11 +38,11 @@
[ 'OS!="solaris"', {
'cflags': [ '-O3','-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
}],
- [ 'OS=="solaris" and gcc_optimize_level =="-O3"', {
+ [ 'OS=="solaris" and gcc_old =="no"', {
'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
}],
- [ 'OS=="solaris" and gcc_optimize_level =="-O"', {
- 'cflags': [ '-O', '-fdata-sections', '-ffunction-sections' ], # For bug fix of #2830
+ [ 'OS=="solaris" and gcc_old =="yes"', {
+ 'cflags': [ '-O3', '-fno-strict-aliasing', '-fdata-sections', '-ffunction-sections' ],
}],
['target_arch=="x64"', {
'msvs_configuration_platform': 'x64',
View
8 configure
@@ -200,7 +200,7 @@ def host_arch():
def target_arch():
return host_arch()
-def gcc_optimize_level():
+def gcc_old():
cc = ['gcc']
cmd = cc + [ '-dumpversion' ]
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -208,9 +208,9 @@ def gcc_optimize_level():
out = p.communicate()[0]
gcc_version = (str(out).split('\n'))[0]
if StrictVersion(gcc_version) >= '4.6.1':
- return '-O3'
+ return 'no'
else:
- return '-O'
+ return 'yes'
def configure_node(o):
# TODO add gdb
@@ -225,7 +225,7 @@ def configure_node(o):
# TODO move to node.gyp
if sys.platform == 'sunos5':
o['variables']['visibility'] = '' # FIXME -fvisibility=hidden, should be a gcc check
- o['variables']['gcc_optimize_level'] = gcc_optimize_level() # For bug fix of #2830
+ o['variables']['gcc_old'] = gcc_old() # For bug fix of #2830
def configure_libz(o):
o['variables']['node_shared_zlib'] = b(options.shared_zlib)
Please sign in to comment.
Something went wrong with that request. Please try again.