Projects
home:pandora:RobinOS23
systemtap
_service:download_src_package:0002-Standardize-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:0002-Standardize-dyninst-include-file-use.patch of Package systemtap
From b6fc2c144e6763b62c2b5f7ec9ba28285440847e Mon Sep 17 00:00:00 2001 From: Stan Cox <scox@redhat.com> Date: Fri, 7 Jan 2022 12:01:49 -0500 Subject: [PATCH] Standardize dyninst include file use. Change stapdyn to use the more standard '#include <dyninst/*.h>' form and the standard include path. Adjust configure so that --with-dyninst=PATH works, assuming PATH is a /usr style path laid out in standard linux form. --- Makefile.am | 4 ++++ Makefile.in | 37 +++++++++++++++++++------------------ configure | 14 +++++++------- configure.ac | 8 ++++---- stapdyn/dynsdt.cxx | 8 ++++---- stapdyn/dynutil.h | 2 +- stapdyn/mutatee.cxx | 10 +++++----- stapdyn/mutatee.h | 6 +++--- stapdyn/mutator.cxx | 2 +- stapdyn/mutator.h | 8 ++++---- 10 files changed, 52 insertions(+), 47 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3bccd9846..85a0821a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -149,6 +149,10 @@ stap_CXXFLAGS += $(nss_CFLAGS) stap_CPPFLAGS += $(nss_CFLAGS) stap_LDADD += $(nss_LIBS) +if HAVE_DYNINST +stap_CXXFLAGS += $(DYNINST_CXXFLAGS) +endif + install-exec-local: install-scripts PHONIES += install-scripts diff --git a/Makefile.in b/Makefile.in index fe373820b..68bebc0d2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -114,16 +114,17 @@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_17 = $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_18 = $(nss_CFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_19 = $(nss_LIBS) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_20 = install-scripts -@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@am__append_21 = client-http.cxx -@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@am__append_22 = $(libcurl_LIBS) $(jsonc_LIBS) $(openssl_LIBS) -@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@@HAVE_NSS_TRUE@am__append_23 = $(openssl_LIBS) +@BUILD_TRANSLATOR_TRUE@@HAVE_DYNINST_TRUE@@HAVE_NSS_TRUE@am__append_20 = $(DYNINST_CXXFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_21 = install-scripts +@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@am__append_22 = client-http.cxx +@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@am__append_23 = $(libcurl_LIBS) $(jsonc_LIBS) $(openssl_LIBS) @BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@@HAVE_NSS_TRUE@am__append_24 = $(openssl_LIBS) -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_25 = $(avahi_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@@HAVE_NSS_TRUE@am__append_25 = $(openssl_LIBS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_26 = $(avahi_CFLAGS) -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_27 = $(avahi_LIBS) -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@@HAVE_NSS_TRUE@am__append_28 = $(openssl_LIBS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_27 = $(avahi_CFLAGS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_28 = $(avahi_LIBS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@@HAVE_NSS_TRUE@am__append_29 = $(openssl_LIBS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_HTTP_SUPPORT_TRUE@@HAVE_NSS_TRUE@am__append_30 = $(openssl_LIBS) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ @@ -697,13 +698,13 @@ oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h @BUILD_TRANSLATOR_TRUE@ tapset-python.cxx analysis.cxx \ @BUILD_TRANSLATOR_TRUE@ $(am__append_7) $(am__append_9) \ @BUILD_TRANSLATOR_TRUE@ $(am__append_14) $(am__append_15) \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_21) +@BUILD_TRANSLATOR_TRUE@ $(am__append_22) @BUILD_TRANSLATOR_TRUE@noinst_HEADERS = sdt_types.h @BUILD_TRANSLATOR_TRUE@stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ \ @BUILD_TRANSLATOR_TRUE@ @LIBINTL@ -lpthread @debuginfod_LIBS@ \ @BUILD_TRANSLATOR_TRUE@ @DYNINST_LDFLAGS@ @DYNINST_LIBS@ \ @BUILD_TRANSLATOR_TRUE@ $(am__append_8) $(am__append_13) \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_19) $(am__append_22) +@BUILD_TRANSLATOR_TRUE@ $(am__append_19) $(am__append_23) @BUILD_TRANSLATOR_TRUE@stap_DEPENDENCIES = @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_SOURCES = stapvirt.c @BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_CFLAGS = \ @@ -724,13 +725,13 @@ oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h BUILT_SOURCES = git_version.stamp CLEANFILES = git_version.h $(pkglibexec_PROGRAMS) GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh -PHONIES = $(am__append_20) runcheck update-po dist-gzip rpm srpm \ +PHONIES = $(am__append_21) runcheck update-po dist-gzip rpm srpm \ uprobes install-uprobes @BUILD_TRANSLATOR_TRUE@stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ \ @BUILD_TRANSLATOR_TRUE@ $(am__append_16) @BUILD_TRANSLATOR_TRUE@stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ \ @BUILD_TRANSLATOR_TRUE@ @ALIGNEDNEW@ $(am__append_11) \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_17) +@BUILD_TRANSLATOR_TRUE@ $(am__append_17) $(am__append_20) @BUILD_TRANSLATOR_TRUE@stap_CPPFLAGS = $(AM_CPPFLAGS) -DSTAP_SDT_V2 \ @BUILD_TRANSLATOR_TRUE@ $(am__append_12) $(am__append_18) @BUILD_TRANSLATOR_TRUE@stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BOOST_SYSTEM_LIB@ @@ -742,7 +743,7 @@ PHONIES = $(am__append_20) runcheck update-po dist-gzip rpm srpm \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDADD = \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(nss_LIBS) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(debuginfod_LIBS) \ -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_23) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_24) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_SOURCES = stap-authorize-cert.cxx nsscommon.cxx util.cxx @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CPPFLAGS = $(AM_CPPFLAGS) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) @@ -751,30 +752,30 @@ PHONIES = $(am__append_20) runcheck update-po dist-gzip rpm srpm \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_LDADD = \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(nss_LIBS) \ @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(debuginfod_LIBS) \ -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_24) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_25) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_SOURCES = stap-serverd.cxx cscommon.cxx util.cxx privilege.cxx nsscommon.cxx cmdline.cxx @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ @PIECXXFLAGS@ \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(nss_CFLAGS) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_26) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_27) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_CFLAGS = $(AM_CFLAGS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ @PIECFLAGS@ \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(nss_CFLAGS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(debuginfod_CFLAGS) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_25) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_26) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDADD = $(nss_LIBS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ -lpthread \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(debuginfod_LIBS) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_27) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_28) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_28) \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_29) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(debuginfod_CFLAGS) @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_LDADD = $(nss_LIBS) \ @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(debuginfod_LIBS) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_29) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_30) # crash(8) extension @BUILD_CRASHMOD_TRUE@STAPLOG = staplog.so diff --git a/configure b/configure index 853136256..56fc51c24 100755 --- a/configure +++ b/configure @@ -12042,8 +12042,8 @@ fi case "$with_dyninst" in no) ;; ''|yes) # Try a simple-minded distro search - DYNINST_CXXFLAGS="-I/usr/include/dyninst" - DYNINST_LDFLAGS="-L/usr/lib64/dyninst -L/usr/lib/dyninst" # XXX both lib paths!?! + DYNINST_CXXFLAGS="" + DYNINST_LDFLAGS="-L/usr/lib64/dyninst" # Add Dyninst libraries only if they are available if test -d "/usr/include/dyninst"; then save_LIBS="$LIBS" @@ -12095,7 +12095,7 @@ fi ;; *) # Use paths in the user-specified prefix DYNINST_CXXFLAGS="-I$with_dyninst/include" - DYNINST_LDFLAGS="-L$with_dyninst/lib/" # XXX need lib64 too? + DYNINST_LDFLAGS="-L$with_dyninst/lib64/dyninst -Wl,-rpath-link,$with_dyninst/lib64/dyninst" # Will assume Dyninst libraries are available as the path is specified save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TBB_runtime_interface_version in -ltbb" >&5 @@ -12155,12 +12155,12 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CPPFLAGS="$CPPFLAGS $DYNINST_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking dyninst support" >&5 $as_echo "$as_me: checking dyninst support" >&6;} - for ac_header in BPatch_object.h + for ac_header in dyninst/BPatch_object.h do : - ac_fn_cxx_check_header_mongrel "$LINENO" "BPatch_object.h" "ac_cv_header_BPatch_object_h" "$ac_includes_default" -if test "x$ac_cv_header_BPatch_object_h" = xyes; then : + ac_fn_cxx_check_header_mongrel "$LINENO" "dyninst/BPatch_object.h" "ac_cv_header_dyninst_BPatch_object_h" "$ac_includes_default" +if test "x$ac_cv_header_dyninst_BPatch_object_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_BPATCH_OBJECT_H 1 +#define HAVE_DYNINST_BPATCH_OBJECT_H 1 _ACEOF diff --git a/configure.ac b/configure.ac index c81bace43..0ad1c3105 100644 --- a/configure.ac +++ b/configure.ac @@ -615,8 +615,8 @@ AC_ARG_WITH([dyninst], case "$with_dyninst" in no) ;; ''|yes) # Try a simple-minded distro search - DYNINST_CXXFLAGS="-I/usr/include/dyninst" - DYNINST_LDFLAGS="-L/usr/lib64/dyninst -L/usr/lib/dyninst" # XXX both lib paths!?! + DYNINST_CXXFLAGS="" + DYNINST_LDFLAGS="-L/usr/lib64/dyninst" # Add Dyninst libraries only if they are available if test -d "/usr/include/dyninst"; then save_LIBS="$LIBS" @@ -627,7 +627,7 @@ no) ;; ;; *) # Use paths in the user-specified prefix DYNINST_CXXFLAGS="-I$with_dyninst/include" - DYNINST_LDFLAGS="-L$with_dyninst/lib/" # XXX need lib64 too? + DYNINST_LDFLAGS="-L$with_dyninst/lib64/dyninst -Wl,-rpath-link,$with_dyninst/lib64/dyninst" # Will assume Dyninst libraries are available as the path is specified save_LIBS="$LIBS" AC_CHECK_LIB(tbb, TBB_runtime_interface_version, [tbb_LIBS=-ltbb],[tbb_LIBS=]) @@ -640,7 +640,7 @@ if test "$with_dyninst" != "no"; then old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $DYNINST_CXXFLAGS" AC_MSG_NOTICE([checking dyninst support]) - AC_CHECK_HEADERS([BPatch_object.h], [ + AC_CHECK_HEADERS([dyninst/BPatch_object.h], [ AC_SUBST(DYNINST_CXXFLAGS) AC_SUBST(DYNINST_LDFLAGS) AC_SUBST(DYNINST_LIBS) diff --git a/stapdyn/dynsdt.cxx b/stapdyn/dynsdt.cxx index 6c44bb88c..04f89e871 100644 --- a/stapdyn/dynsdt.cxx +++ b/stapdyn/dynsdt.cxx @@ -27,10 +27,10 @@ extern "C" { #include <libelf.h> } -#include <BPatch.h> -#include <BPatch_function.h> -#include <BPatch_object.h> -#include <BPatch_point.h> +#include <dyninst/BPatch.h> +#include <dyninst/BPatch_function.h> +#include <dyninst/BPatch_object.h> +#include <dyninst/BPatch_point.h> #include "dynutil.h" #include "../util.h" diff --git a/stapdyn/dynutil.h b/stapdyn/dynutil.h index f9c2cc5af..56e5679c1 100644 --- a/stapdyn/dynutil.h +++ b/stapdyn/dynutil.h @@ -13,7 +13,7 @@ #include <stdexcept> #include <string> -#include <BPatch_process.h> +#include <dyninst/BPatch_process.h> // Check that environment DYNINSTAPI_RT_LIB exists and is a valid file. // If not, try to guess a good value and set it. diff --git a/stapdyn/mutatee.cxx b/stapdyn/mutatee.cxx index 1b4fd65ba..c357b1702 100644 --- a/stapdyn/mutatee.cxx +++ b/stapdyn/mutatee.cxx @@ -13,11 +13,11 @@ extern "C" { #include <sys/types.h> } -#include <BPatch_function.h> -#include <BPatch_image.h> -#include <BPatch_module.h> -#include <BPatch_point.h> -#include <BPatch_thread.h> +#include <dyninst/BPatch_function.h> +#include <dyninst/BPatch_image.h> +#include <dyninst/BPatch_module.h> +#include <dyninst/BPatch_point.h> +#include <dyninst/BPatch_thread.h> #include "dynutil.h" #include "../util.h" diff --git a/stapdyn/mutatee.h b/stapdyn/mutatee.h index 2e0ef5fd8..1bae23f1e 100644 --- a/stapdyn/mutatee.h +++ b/stapdyn/mutatee.h @@ -12,9 +12,9 @@ #include <string> #include <vector> -#include <BPatch_object.h> -#include <BPatch_process.h> -#include <BPatch_snippet.h> +#include <dyninst/BPatch_object.h> +#include <dyninst/BPatch_process.h> +#include <dyninst/BPatch_snippet.h> #include "dynprobe.h" #include "dynutil.h" diff --git a/stapdyn/mutator.cxx b/stapdyn/mutator.cxx index 24c6ee40e..f66b53350 100644 --- a/stapdyn/mutator.cxx +++ b/stapdyn/mutator.cxx @@ -17,7 +17,7 @@ extern "C" { #include <time.h> } -#include <BPatch_snippet.h> +#include <dyninst/BPatch_snippet.h> #include "dynutil.h" #include "../util.h" diff --git a/stapdyn/mutator.h b/stapdyn/mutator.h index 22e72bb69..3850fecc2 100644 --- a/stapdyn/mutator.h +++ b/stapdyn/mutator.h @@ -13,10 +13,10 @@ #include <string> #include <vector> -#include <BPatch.h> -#include <BPatch_module.h> -#include <BPatch_process.h> -#include <BPatch_thread.h> +#include <dyninst/BPatch.h> +#include <dyninst/BPatch_module.h> +#include <dyninst/BPatch_process.h> +#include <dyninst/BPatch_thread.h> #include "dynprobe.h" #include "dynutil.h" -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2