11diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py
2- index 632bcb4..c1e0dd5 100644
2+ index 0fac9b0..94be92a 100644
33--- a/numpy/core/code_generators/generate_umath.py
44+++ b/numpy/core/code_generators/generate_umath.py
5- @@ -970 ,6 +970 ,7 @@ def make_arrays(funcdict):
5+ @@ -982 ,6 +982 ,7 @@ def make_arrays(funcdict):
66 funclist.append('%s_%s' % (tname, name))
77 if t.simd is not None:
88 for vt in t.simd:
@@ -11,30 +11,27 @@ index 632bcb4..c1e0dd5 100644
1111 #ifdef HAVE_ATTRIBUTE_TARGET_{ISA}
1212 if (npy_cpu_supports("{isa}")) {{
1313diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py
14- index b03fb96..f9e6cd0 100644
14+ index 14451fa..dfd65da 100644
1515--- a/numpy/distutils/ccompiler.py
1616+++ b/numpy/distutils/ccompiler.py
17- @@ -275 ,6 +275 ,7 @@ def CCompiler_compile(self, sources, output_dir=None, macros=None,
17+ @@ -295 ,6 +295 ,7 @@ def CCompiler_compile(self, sources, output_dir=None, macros=None,
1818 self._setup_compile(output_dir, macros, include_dirs, sources,
1919 depends, extra_postargs)
2020 cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
2121+ cc_args += os.environ['CFLAGS'].split()
2222 display = "compile options: '%s'" % (' '.join(cc_args))
2323 if extra_postargs:
2424 display += "\nextra options: '%s'" % (' '.join(extra_postargs))
25+ @@ -795,4 +796,3 @@ for _cc in ['msvc9', 'msvc', '_msvc', 'bcpp', 'cygwinc', 'emxc', 'unixc']:
26+ _m = sys.modules.get('distutils.' + _cc + 'compiler')
27+ if _m is not None:
28+ setattr(_m, 'gen_lib_options', gen_lib_options)
29+ -
2530diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py
26- index 11b2cce..f6dde79 100644
31+ index 11b2cce..c3e9f10 100644
2732--- a/numpy/distutils/unixccompiler.py
2833+++ b/numpy/distutils/unixccompiler.py
29- @@ -54,6 +54,7 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
30- deps = []
31-
32- try:
33- + self.linker_so = [os.environ['LD']+" "+os.environ['LDFLAGS']]
34- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps +
35- extra_postargs, display = display)
36- except DistutilsExecError:
37- @@ -111,6 +112,7 @@ def UnixCCompiler_create_static_lib(self, objects, output_libname,
34+ @@ -111,6 +111,7 @@ def UnixCCompiler_create_static_lib(self, objects, output_libname,
3835 while tmp_objects:
3936 objects = tmp_objects[:50]
4037 tmp_objects = tmp_objects[50:]
0 commit comments