diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-01-24 15:25:54 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-01-24 23:09:31 +0100 |
commit | d635364ccb2ede25419c4a6066fa58893d1d5a93 (patch) | |
tree | 355d7183bf4b7e04b1172903c7f7adf248ad57e1 /dev-lang | |
parent | app-arch/lunzip: Fix CC/CFLAGS overrides (diff) | |
download | gentoo-d635364ccb2ede25419c4a6066fa58893d1d5a93.tar.gz gentoo-d635364ccb2ede25419c4a6066fa58893d1d5a93.tar.bz2 gentoo-d635364ccb2ede25419c4a6066fa58893d1d5a93.zip |
dev-lang/python: Fix hardcoding C/LDFLAGS in Python 3.11
Closes: https://bugs.gentoo.org/831901
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/python-3.11.0_alpha4.ebuild | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/dev-lang/python/python-3.11.0_alpha4.ebuild b/dev-lang/python/python-3.11.0_alpha4.ebuild index 92c0168fc31a..1ee098aec00d 100644 --- a/dev-lang/python/python-3.11.0_alpha4.ebuild +++ b/dev-lang/python/python-3.11.0_alpha4.ebuild @@ -184,7 +184,15 @@ src_configure() { $(use_with readline readline "$(usex libedit editline readline)") ) - OPT="" econf "${myeconfargs[@]}" + # disable implicit optimization/debugging flags + local -x OPT= + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + econf "${myeconfargs[@]}" if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then eerror "configure has detected that the sem_open function is broken." @@ -226,6 +234,8 @@ src_compile() { addpredict /usr/lib/python3.11/site-packages fi + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* emake CPPFLAGS= CFLAGS= LDFLAGS= # Work around bug 329499. See also bug 413751 and 457194. @@ -290,11 +300,6 @@ src_install() { emake DESTDIR="${D}" altinstall - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - # Fix collisions between different slots of Python. rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |