On 9 September 2014 17:23, Thomas Unterthiner
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 Double-checking: $ echo $OPT -march=native