Skip to content

bpo-33990: Add CPPFLAGS during ./configure when customizing the compiler in distutils #7997

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

Closed
wants to merge 3 commits into from

Conversation

ericvw
Copy link
Contributor

@ericvw ericvw commented Jun 28, 2018

@ericvw
Copy link
Contributor Author

ericvw commented Jun 29, 2018

I noticed that the CI environment sets the CFLAGS environment variable, which is perturbing the introduced test case. I'm going to update the test case to clear out the tested environment variables since it is desired to test against what is stored via sysconfig.

ericvw added 3 commits June 29, 2018 10:52
Add a test case to ensure that `CPPFLAGS`, `CFLAGS`, and `LDSHARED`
flags captured during `./configure` are present when customizing the
compiler (for Unix).
Since preprocessor flags may be specified via `CPPFLAGS` instead of
`CFLAGS` during `./configure`, ensure that the `CPPFLAGS` are added to
the appropriate executables when customizing the compiler via
`sysconfig`.
@ericvw ericvw force-pushed the distutils-cppflags branch from a32ecd4 to d868c65 Compare June 29, 2018 17:52
@ericvw
Copy link
Contributor Author

ericvw commented Jun 29, 2018

I've updated the PR addressing the sanitization of the environment variables to ensure what is being tested is expected now.

@ericvw
Copy link
Contributor Author

ericvw commented Mar 15, 2019

In rebasing this against #12236, I discovered that Makefile.in.pre injects include paths for building the interpreter, itself, which should probably not be passed along via distutils for building C/C++ extensions 😕.

PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)

It seems like more investigation is required in determining the purpose of CPPFLAGS with respect to building the interpreter and if distutils should be passing along at./configure time of the interpreter.

For now, specifying include paths via CFLAGS will still suffice until the scope of CPPFLAGS is better defined.

@ericvw ericvw closed this Mar 15, 2019
@ericvw ericvw deleted the distutils-cppflags branch July 26, 2019 15:20
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.

3 participants