diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-03-25 17:06:19 +0100 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-03-30 17:09:14 +0200 |
commit | 2788f53c283d212030dc2fdaa97d494cabf4a640 (patch) | |
tree | 5f8c86285be402c800fc6f9ac98f3618ea63701c /numpy/distutils | |
parent | 135e9418610241dc66ce3fefe25322d14a913954 (diff) | |
download | numpy-2788f53c283d212030dc2fdaa97d494cabf4a640.tar.gz |
ENH: distutils: provide better support for C++ code on HPUX. Closes #1383.
Diffstat (limited to 'numpy/distutils')
-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] + |