Determining the origin of compiler flags

When compiling, how can you determine which compiler flags are set? I am dealing with a strange problem, where if I do not have any environment variables:

$ env | grep FLAG
$

then gfortran uses all these flags: -Wall -arch i686 -arch x86_64 -Wall -undefined dynamic_lookup -bundle

While in the environment where they are installed,

$ env | grep FLAG
LDFLAGS=
CCFLAGS=
CXXFLAGS=
CFLAGS=
FFLAGS=

single flag: -Wall

I just lost how to provide a consistent build environment when distributing the code.

EDIT: Further research suggests that this magic can happen in numpy.distutils.fcompiler, but I don't know!

+4
source share
1 answer

Well, I'm not at all sure of Numpy, but I distutilsuse distutils.sysconfig.customize_compilerto set flags.

, Makefile, , .

+1

All Articles