summaryrefslogtreecommitdiff
path: root/numpy/distutils
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-10-25 00:24:42 +0300
committermattip <matti.picus@gmail.com>2019-10-25 11:31:33 +0300
commit3356d994fcf3fdfcfedc70185fc013501a87a4b9 (patch)
treedce5e3526624937eb762efc716873bcc9bc06024 /numpy/distutils
parent396af7def65e75b6ef8a4e82f8aa8a357a9230f4 (diff)
downloadnumpy-3356d994fcf3fdfcfedc70185fc013501a87a4b9.tar.gz
BUILD: add std=c99 flag for gcc, cleanup error reporting
Diffstat (limited to 'numpy/distutils')
-rw-r--r--numpy/distutils/ccompiler.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py
index 643879023..1b5a14cfd 100644
--- a/numpy/distutils/ccompiler.py
+++ b/numpy/distutils/ccompiler.py
@@ -532,6 +532,11 @@ def CCompiler_customize(self, dist, need_cxx=0):
'g++' in self.compiler[0] or
'clang' in self.compiler[0]):
self._auto_depends = True
+ if 'gcc' in self.compiler[0]:
+ # add std=c99 flag for gcc < 5
+ # TODO: does this need to be more specific?
+ self.compiler.append('-std=c99')
+ self.compiler_so.append('-std=c99')
elif os.name == 'posix':
import tempfile
import shutil