Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds#131866

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 3 commits intopython:mainfromstratakis:dtrace_cflags
Mar 31, 2025

Conversation

@stratakis
Copy link
Contributor

@stratakisstratakis commentedMar 29, 2025
edited by bedevere-appbot
Loading

When using --with-dtrace the resulting object file could be missing specific CFLAGS exported by the build system due to the systemtap script using specific defaults.

Exporting the CC and CFLAGS variables before the dtrace invocation allows us to properly apply CFLAGS exported by the build system even when cross-compiling.

The fix does not affect dtrace invocation on Solaris/Oracle/MacOS

…buildsWhen using --with-dtrace the resulting object file could be missingspecific CFLAGS exported by the build system due to the systemtapscript using specific defaults.Exporting the CC and CFLAGS variables before the dtrace invocationallows us to properly apply CFLAGS exported by the build systemeven when cross-compiling.The fix does not affect the dtrace invocation on Solaris/Oracle/MacOS
@stratakis
Copy link
ContributorAuthor

Unfortunately there are no buildbots testing --with-dtrace and dtrace itself is in a sort of half broken state as far as its functionality is concerned. However it is still an issue whenever someone uses --with-dtrace.

I have verified through the Fedora build infrastructure that the fix works.

Also this should not affect the dtrace builds when the actual dtrace tool is used in Solaris/Oracle/MacOS.

A news entry is not required here I believe.

Copy link
Member

@vstinnervstinner left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM. The change works as expected.

Without this PR,make Include/pydtrace_probes.h SHELL="bash -x" prints:

+ /usr/bin/mkdir -p Include+ /usr/bin/dtrace -o Include/pydtrace_probes.h -h -s Include/pydtrace.d

With this PR, it prints:

+ /usr/bin/mkdir -p Include+ CC=gcc+ CFLAGS=+ /usr/bin/dtrace -o Include/pydtrace_probes.h -h -s Include/pydtrace.d

CFLAGS is passed as expected. Example:

$ CFLAGS="-O2" make Include/pydtrace_probes.h SHELL="bash -x"(...)/usr/bin/mkdir -p IncludeCC="gcc" CFLAGS="-O2" /usr/bin/dtrace  -o Include/pydtrace_probes.h -h -s Include/pydtrace.d(...)+ /usr/bin/mkdir -p Include+ CC=gcc+ CFLAGS=-O2+ /usr/bin/dtrace -o Include/pydtrace_probes.h -h -s Include/pydtrace.d

Note: tests done with./configure --with-pydebug --with-dtrace.

@vstinner
Copy link
Member

A news entry is not required here I believe.

It might be interesting to add a NEWS entry.

@vstinner
Copy link
Member

It might be interesting to add a NEWS entry.

For example, add a NEWS entry in the "Build" category:

"DTrace build now pass properly CC and CFLAGS variables to the dtrace command."

You can use the blurb tool for that.

@stratakis
Copy link
ContributorAuthor

Added a NEWS entry

@vstinnervstinner added the needs backport to 3.13bugs and security fixes labelMar 31, 2025
@vstinnervstinnerenabled auto-merge (squash)March 31, 2025 17:39
@vstinnervstinner merged commit0cd4bef intopython:mainMar 31, 2025
37 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 31, 2025
…builds (pythonGH-131866)When using --with-dtrace the resulting object file could be missingspecific CFLAGS exported by the build system due to the systemtapscript using specific defaults.Exporting the CC and CFLAGS variables before the dtrace invocationallows us to properly apply CFLAGS exported by the build systemeven when cross-compiling.The fix does not affect the dtrace invocation on Solaris/macOS.(cherry picked from commit0cd4bef)Co-authored-by: stratakis <cstratak@redhat.com>
@bedevere-app
Copy link

GH-131950 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMar 31, 2025
@stratakis
Copy link
ContributorAuthor

Would it be possible to backport it on 3.12 as well?

vstinner pushed a commit that referenced this pull requestMar 31, 2025
… builds (GH-131866) (#131950)gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (GH-131866)When using --with-dtrace the resulting object file could be missingspecific CFLAGS exported by the build system due to the systemtapscript using specific defaults.Exporting the CC and CFLAGS variables before the dtrace invocationallows us to properly apply CFLAGS exported by the build systemeven when cross-compiling.The fix does not affect the dtrace invocation on Solaris/macOS.(cherry picked from commit0cd4bef)Co-authored-by: stratakis <cstratak@redhat.com>
@vstinnervstinner added the needs backport to 3.12only security fixes labelMar 31, 2025
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 31, 2025
…builds (pythonGH-131866)When using --with-dtrace the resulting object file could be missingspecific CFLAGS exported by the build system due to the systemtapscript using specific defaults.Exporting the CC and CFLAGS variables before the dtrace invocationallows us to properly apply CFLAGS exported by the build systemeven when cross-compiling.The fix does not affect the dtrace invocation on Solaris/macOS.(cherry picked from commit0cd4bef)Co-authored-by: stratakis <cstratak@redhat.com>
@bedevere-app
Copy link

GH-131951 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelMar 31, 2025
@vstinner
Copy link
Member

Merged, thank you for your fix.

Would it be possible to backport it on 3.12 as well?

Done. I was awaiting to see if the 3.13 backport goes well first.

@stratakisstratakis deleted the dtrace_cflags branchMarch 31, 2025 18:24
vstinner pushed a commit that referenced this pull requestMar 31, 2025
… builds (GH-131866) (#131951)gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (GH-131866)When using --with-dtrace the resulting object file could be missingspecific CFLAGS exported by the build system due to the systemtapscript using specific defaults.Exporting the CC and CFLAGS variables before the dtrace invocationallows us to properly apply CFLAGS exported by the build systemeven when cross-compiling.The fix does not affect the dtrace invocation on Solaris/macOS.(cherry picked from commit0cd4bef)Co-authored-by: stratakis <cstratak@redhat.com>
@stratakis
Copy link
ContributorAuthor

Thanks for merging!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@stratakis@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp