diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/distutils/unixccompiler.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py index cc1a9a4f9..dfc5a676f 100644 --- a/numpy/distutils/unixccompiler.py +++ b/numpy/distutils/unixccompiler.py @@ -17,6 +17,18 @@ else: # Note that UnixCCompiler._compile appeared in Python 2.3 def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): """Compile a single source files with a Unix-style compiler.""" + # HP ad-hoc fix, see ticket 1383 + ccomp = self.compiler_so + if ccomp[0] == 'aCC': + # remove flags that will trigger ANSI-C mode for aCC + if '-Ae' in ccomp: + ccomp.remove('-Ae') + if '-Aa' in ccomp: + ccomp.remove('-Aa') + # add flags for (almost) sane C++ handling + ccomp += ['-AA'] + self.compiler_so = ccomp + display = '%s: %s' % (os.path.basename(self.compiler_so[0]),src) try: self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + |