mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.12] gh-131865: Properly apply exported CFLAGS for dtrace/systemtap 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 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 the dtrace invocation on Solaris/macOS.
(cherry picked from commit 0cd4befb02)
Co-authored-by: stratakis <cstratak@redhat.com>
This commit is contained in:
parent
5d4e891411
commit
b87ea7d4e3
2 changed files with 4 additions and 2 deletions
|
|
@ -1574,7 +1574,7 @@ Python/frozen.o: $(FROZEN_FILES_OUT)
|
|||
# an include guard, so we can't use a pipeline to transform its output.
|
||||
Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
|
||||
$(MKDIR_P) Include
|
||||
$(DTRACE) $(DFLAGS) -o $@ -h -s $<
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) $(DFLAGS) -o $@ -h -s $<
|
||||
: sed in-place edit with POSIX-only tools
|
||||
sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
|
@ -1584,7 +1584,7 @@ Python/import.o: $(srcdir)/Include/pydtrace.h
|
|||
Modules/gcmodule.o: $(srcdir)/Include/pydtrace.h
|
||||
|
||||
Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
|
||||
$(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
|
||||
|
||||
Objects/typeobject.o: Objects/typeslots.inc
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
The DTrace build now properly passes the ``CC`` and ``CFLAGS`` variables
|
||||
to the ``dtrace`` command when utilizing SystemTap on Linux.
|
||||
Loading…
Add table
Add a link
Reference in a new issue