From d6108df63cb765c17975aa172141ef83827e07ee Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Sat, 29 Mar 2025 02:04:35 +0100 Subject: [PATCH 1/3] gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds 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/Oracle/MacOS --- Makefile.pre.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 9658bfa44b98e4..2102f9cfe882bd 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2090,7 +2090,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 $@ @@ -2100,7 +2100,7 @@ Python/gc.o: $(srcdir)/Include/pydtrace.h Python/import.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 From 7eb624b795733b227bd478146bcf121b6f685522 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 31 Mar 2025 19:22:57 +0200 Subject: [PATCH 2/3] Add NEWS entry --- .../next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst diff --git a/Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst b/Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst new file mode 100644 index 00000000000000..95335db94f8466 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst @@ -0,0 +1,2 @@ +The DTrace build now properly passes the CC and CFLAGS variables to the +dtrace command when utilizing SystemTap on Linux. From 7c7389a60aa7159eb8005f4594aecec44d18b31f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 31 Mar 2025 19:37:49 +0200 Subject: [PATCH 3/3] Update Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst --- .../next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst b/Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst index 95335db94f8466..a287e0b22834f3 100644 --- a/Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst +++ b/Misc/NEWS.d/next/Build/2025-03-31-19-22-41.gh-issue-131865.PIJy7X.rst @@ -1,2 +1,2 @@ -The DTrace build now properly passes the CC and CFLAGS variables to the -dtrace command when utilizing SystemTap on Linux. +The DTrace build now properly passes the ``CC`` and ``CFLAGS`` variables +to the ``dtrace`` command when utilizing SystemTap on Linux. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy