[Numpy-discussion] numpy ignores OPT/FOPT under Python3
Thomas Unterthiner
thomas_unterthiner at web.de
Tue Sep 9 11:23:38 EDT 2014
Hi!
I want to use the OPT/FOPT environment viariables to set compiler flags
when compiling numpy. However it seems that they get ignored under
python3. Using Ubuntu 14.04 and numpy 1.9.0, I did the following:
>export OPT="-march=native"
>export FOPT = "-march=native"
> python setup.py build # "python" executes python2.7
[...snip...]
C compiler: x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing
-march=native -fPIC
^C
obviously under python 2.7, the additional march flag works as expected.
However, using python3:
>export OPT="-march=native"
>export FOPT = "-march=native"
>python3 setup.py build
[.... snip ...]
C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC
^C
obviously, the flags aren't used in python 3. Did I overlook something
here? Do $OPT/$FOPT only work in Python 2.7 by design, is this a bug or
did I miss something?
Cheers
Thomas
More information about the NumPy-Discussion
mailing list