Skip to content

gh-128042: configure complains when CFLAGS=-O0 and --enable-optimizations #137975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

taegyunkim
Copy link

@taegyunkim taegyunkim commented Aug 20, 2025

@bedevere-app
Copy link

bedevere-app bot commented Aug 20, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

# Check for conflicting CFLAGS=-O0 and --enable-optimizations
case "$CFLAGS" in
*-O0*)
AC_MSG_ERROR([CFLAGS contains -O0 which conflicts with --enable-optimizations. Please remove -O0 from CFLAGS or do not use --enable-optimizations.])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error is too harsh here. Per @hauntsaninja on the devguide, there are lots of combinations of configurations that might not make sense.

I'm also not entirely convinced by the motivation in the issue, as when you are passing explicit CFLAGS and configure options we tend to assume you know what you're doing.

At the very least I would downgrade to an informational note or warning, if we do change something here.

A

@bedevere-app
Copy link

bedevere-app bot commented Aug 20, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants