Date: Wed, 6 Jun 2012 23:46:16 +0200 From: Marcus von Appen <mva@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org, freebsd-python@freebsd.org Subject: Re: [PATCH]: lang/python26+ must not set OPT Message-ID: <20120606214616.GA2192@medusa.sysfault.org> In-Reply-To: <201206061950.q56JoMlq080679@medusa.sysfault.org> References: <201206061950.q56JoMlq080679@medusa.sysfault.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D=3D "unix": (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = =3D \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') [...] if 'CFLAGS' in os.environ: cflags =3D opt + ' ' + os.environ['CFLAGS'] ldshared =3D 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 =66rom 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 --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/Pz6gACgkQi68/ErJnpkfbGQCfYDoxnGkV71L170qHHX34W5Oz ScUAnit3GAiO0cnGGbpq/fLjBuc8dHhY =wy3o -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120606214616.GA2192>