[Numpy-discussion] numpy ignores OPT/FOPT under Python3

Daπid davidmenhur at gmail.com
Wed Sep 10 03:12:39 EDT 2014

On 9 September 2014 17:23, Thomas Unterthiner <thomas_unterthiner at web.de>

> 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

Running the same on my computer (Fedora 20, python 2.7) doesn't seem to
process the flags:

    C compiler: -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC


$ echo $OPT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140910/9200bf8f/attachment.html>

More information about the NumPy-Discussion mailing list