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

Commit0cd4bef

Browse files
authored
gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (#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.
1 parent51e0f2b commit0cd4bef

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎Makefile.pre.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,7 +2090,7 @@ Python/frozen.o: $(FROZEN_FILES_OUT)
20902090
# an include guard, so we can't use a pipeline to transform its output.
20912091
Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
20922092
$(MKDIR_P) Include
2093-
$(DTRACE) $(DFLAGS) -o $@ -h -s $<
2093+
CC="$(CC)" CFLAGS="$(CFLAGS)"$(DTRACE) $(DFLAGS) -o $@ -h -s $<
20942094
: sed in-place edit with POSIX-only tools
20952095
sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
20962096
mv $@.tmp $@
@@ -2100,7 +2100,7 @@ Python/gc.o: $(srcdir)/Include/pydtrace.h
21002100
Python/import.o: $(srcdir)/Include/pydtrace.h
21012101

21022102
Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
2103-
$(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
2103+
CC="$(CC)" CFLAGS="$(CFLAGS)"$(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
21042104

21052105
Objects/typeobject.o: Objects/typeslots.inc
21062106

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The DTrace build now properly passes the ``CC`` and ``CFLAGS`` variables
2+
to the ``dtrace`` command when utilizing SystemTap on Linux.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp