On, Wed Jun 06, 2012, Marcus von Appen wrote: [OPT cleanup]
The patch actually is wrong. It should be the other way around, since OPT gets included by the CFLAGS of the python build as well as for every python package depending on distutils: distutils/sysconfig.py, def customize_compiler(compiler): [...] if compiler.compiler_type == "unix": (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') [...] if 'CFLAGS' in os.environ: cflags = opt + ' ' + os.environ['CFLAGS'] ldshared = ldshared + ' ' + os.environ['CFLAGS'] As shown above, opt is always appended to distutils's CFLAGS settings for the C compiler, hence every additional flags we usually would pass to CFLAGS or CPPFLAGS in a port's Makefile, would need to go into OPTS instead, to be consistent and guaranteed to be applied (since CFLAGS from config/Makefile is not necessarily used). A slight issue with the LDFLAGS remains for the python-config script, which does not pick up Python's LDFLAGS, but uses LIBS, SYSLIBS and LIBPL install, omitting any additional LDFLAGS specified elsewhere. Both, the OPT assignment and python-config LDFLAGS behaviour need to be fixed in that aspect (patches will follow). Cheers Marcus
pgp4noBgCemfo.pgp
Description: PGP signature