Skip to content
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

gh-120671: Fix as_fn_append CFLAGS #120822

Merged
merged 2 commits into from
Jun 25, 2024
Merged

gh-120671: Fix as_fn_append CFLAGS #120822

merged 2 commits into from
Jun 25, 2024

Conversation

allsey87
Copy link
Contributor

@allsey87 allsey87 commented Jun 21, 2024

This fixes an issue with failing configure tests due to a missing space when appending to CFLAGS. @eli-schwartz tracked down the source of this bug as follows:

In commit 76d14fa (GH-29485), some code was refactored to be more compact and use more advanced autoconf tricks. In the process, it switched

AS_VAR_SET([XXX], ["$XXX other values"])

to

AS_VAR_APPEND([XXX], ["other values"])

This was a functional logic break, since it elided the space in between the existing and appended values -- and that space is mandatory for command-line flags stuffed into a variable.

The same problem occurred for LDFLAGS, but was silently fixed as a side effect of commit bb8b931 (GH-32229).

Resolves #120671

@allsey87
Copy link
Contributor Author

Note that this issue with a missing space might also be true of configure.ac#L7548.

@erlend-aasland erlend-aasland self-assigned this Jun 21, 2024
@erlend-aasland erlend-aasland added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jun 21, 2024
@erlend-aasland
Copy link
Contributor

Note that this issue with a missing space might also be true of configure.ac#L7548.

No, that's not an issue. It's the # that prepends some extension module build variables. See for example Modules/Setup.stdlib.in

@erlend-aasland
Copy link
Contributor

Can you supply a NEWS entry?

@vstinner vstinner merged commit 2106c9b into python:main Jun 25, 2024
36 checks passed
@miss-islington-app
Copy link

Thanks @allsey87 for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 25, 2024
…120822)

Add missing space in AS_VAR_APPEND() on CFLAGS.
(cherry picked from commit 2106c9b)

Co-authored-by: Michael Allwright <allsey87@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 25, 2024

GH-120985 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 25, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 25, 2024
…120822)

Add missing space in AS_VAR_APPEND() on CFLAGS.
(cherry picked from commit 2106c9b)

Co-authored-by: Michael Allwright <allsey87@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 25, 2024

GH-120986 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 25, 2024
@vstinner
Copy link
Member

Merged, thanks.

vstinner pushed a commit that referenced this pull request Jun 25, 2024
… (#120986)

gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822)

Add missing space in AS_VAR_APPEND() on CFLAGS.
(cherry picked from commit 2106c9b)

Co-authored-by: Michael Allwright <allsey87@gmail.com>
vstinner pushed a commit that referenced this pull request Jun 25, 2024
… (#120985)

gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822)

Add missing space in AS_VAR_APPEND() on CFLAGS.
(cherry picked from commit 2106c9b)

Co-authored-by: Michael Allwright <allsey87@gmail.com>
mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing configure tests due to missing space
4 participants