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

Appearance settings

Commit 5c8f537

Browse filesBrowse files
kulikjakambv
authored andcommitted
bpo-35520: Fix build with dtrace support on certain systems. (#11194)
1 parent fd628cf commit 5c8f537
Copy full SHA for 5c8f537

File tree

Expand file treeCollapse file tree

3 files changed

+10
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+10
-6
lines changed

‎Makefile.pre.in

Copy file name to clipboardExpand all lines: Makefile.pre.in
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,7 @@ LIBRARY_OBJS= \
451451
# On some systems, object files that reference DTrace probes need to be modified
452452
# in-place by dtrace(1).
453453
DTRACE_DEPS = \
454-
Python/ceval.o
455-
# XXX: should gcmodule, etc. be here, too?
454+
Python/ceval.o Python/import.o Modules/gcmodule.o
456455

457456
#########################################################################
458457
# Rules
@@ -628,7 +627,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
628627
-rm -f $@
629628
$(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
630629

631-
libpython$(LDVERSION).so: $(LIBRARY_OBJS)
630+
libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
632631
if test $(INSTSONAME) != $(LDLIBRARY); then \
633632
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
634633
$(LN) -f $(INSTSONAME) $@; \
@@ -640,7 +639,7 @@ libpython3.so: libpython$(LDVERSION).so
640639
$(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
641640

642641
libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
643-
$(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
642+
$(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
644643

645644

646645
libpython$(VERSION).sl: $(LIBRARY_OBJS)
@@ -752,6 +751,7 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
752751
$(PYTHON_OBJS) \
753752
$(MODULE_OBJS) \
754753
$(MODOBJS) \
754+
$(DTRACE_OBJS) \
755755
$(srcdir)/Modules/getbuildinfo.c
756756
$(CC) -c $(PY_CORE_CFLAGS) \
757757
-DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
@@ -954,6 +954,10 @@ Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
954954
sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
955955
mv $@.tmp $@
956956

957+
Python/ceval.o: Include/pydtrace.h
958+
Python/import.o: Include/pydtrace.h
959+
Modules/gcmodule.o: Include/pydtrace.h
960+
957961
Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
958962
$(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
959963

‎configure

Copy file name to clipboardExpand all lines: configure
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11352,7 +11352,7 @@ if ${ac_cv_dtrace_link+:} false; then :
1135211352
$as_echo_n "(cached) " >&6
1135311353
else
1135411354
ac_cv_dtrace_link=no
11355-
echo 'BEGIN' > conftest.d
11355+
echo 'BEGIN{}' > conftest.d
1135611356
"$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
1135711357
ac_cv_dtrace_link=yes
1135811358

‎configure.ac

Copy file name to clipboardExpand all lines: configure.ac
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3429,7 +3429,7 @@ then
34293429
AC_CACHE_CHECK([whether DTrace probes require linking],
34303430
[ac_cv_dtrace_link], [dnl
34313431
ac_cv_dtrace_link=no
3432-
echo 'BEGIN' > conftest.d
3432+
echo 'BEGIN{}' > conftest.d
34333433
"$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
34343434
ac_cv_dtrace_link=yes
34353435
])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.