File tree Expand file tree Collapse file tree 3 files changed +41
-6
lines changed Expand file tree Collapse file tree 3 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -2004,7 +2004,7 @@ Python/frozen.o: $(FROZEN_FILES_OUT)
20042004# an include guard, so we can't use a pipeline to transform its output.
20052005Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
20062006 $(MKDIR_P) Include
2007- CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) $(DFLAGS) -o $@ -h -s $<
2007+ CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) $(DFLAGS) -o $@ -h -s $(srcdir)/Include/pydtrace.d
20082008 : sed in-place edit with POSIX-only tools
20092009 sed 's/PYTHON_/PyDTrace_/' $@ >
[email protected] 20102010@@ -2014,7 +2014,7 @@ Python/gc.o: $(srcdir)/Include/pydtrace.h
20142014Python/import.o: $(srcdir)/Include/pydtrace.h
20152015
20162016Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
2017- CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
2017+ CC="$(CC)" CFLAGS="$(CFLAGS)" $(DTRACE) $(DFLAGS) -o $@ -G -s $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
20182018
20192019Objects/typeobject.o: Objects/typeslots.inc
20202020
Original file line number Diff line number Diff line change @@ -5099,16 +5099,33 @@ then
50995099 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
51005100 # generation flag '-G'. We check for presence of this flag, rather than
51015101 # hardcoding support by OS, in the interest of robustness.
5102+ #
5103+ # NetBSD DTrace requires the -x nolibs flag to avoid system library conflicts
5104+ # and uses header generation for testing instead of object generation.
51025105 AC_CACHE_CHECK ( [ whether DTrace probes require linking] ,
5103- [ ac_cv_dtrace_link] , [ dnl
5106+ [ ac_cv_dtrace_link] , [
51045107 ac_cv_dtrace_link=no
51055108 echo 'BEGIN{}' > conftest.d
5106- "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
5109+ case $host in
5110+ *netbsd*)
5111+ DTRACE_TEST_FLAGS="-x nolibs -h"
5112+ ;;
5113+ *)
5114+ DTRACE_TEST_FLAGS="-G"
5115+ ;;
5116+ esac
5117+ "$DTRACE" $DFLAGS $DTRACE_TEST_FLAGS -s conftest.d -o conftest.o > /dev/null 2>&1 && \
51075118 ac_cv_dtrace_link=yes
51085119 ] )
51095120 if test "$ac_cv_dtrace_link" = "yes"; then
51105121 DTRACE_OBJS="Python/pydtrace.o"
51115122 fi
5123+ # Set NetBSD-specific DTrace flags in DFLAGS
5124+ case $host in
5125+ *netbsd*)
5126+ DFLAGS="$DFLAGS -x nolibs"
5127+ ;;
5128+ esac
51125129fi
51135130
51145131dnl Platform-specific C and header files.
You can’t perform that action at this time.
0 commit comments