Initial import of dyninst.
This commit is contained in:
parent
a34a2be934
commit
b937567a9a
2
.gitignore
vendored
2
.gitignore
vendored
@ -0,0 +1,2 @@
|
||||
/dyninst-7.99.tar.gz
|
||||
/dyninst-docs-7.99.tar.gz
|
12
dyninst-git.patch
Normal file
12
dyninst-git.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up dyninst-7.99/dyninst/make.config.git dyninst-7.99/dyninst/make.config
|
||||
--- dyninst-7.99/dyninst/make.config.git 2012-06-19 14:04:19.849002895 -0400
|
||||
+++ dyninst-7.99/dyninst/make.config 2012-06-19 14:04:38.971000002 -0400
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
SUITE_NAME = Paradyn
|
||||
-RELEASE_NUM = 8.0
|
||||
+RELEASE_NUM = 7.99
|
||||
|
||||
# ***** EXTERNAL SOFTWARE CONFIGURATION *****
|
||||
|
12
dyninst-notest.patch
Normal file
12
dyninst-notest.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up dyninst-8.0/dyninst/Makefile.notest dyninst-8.0/dyninst/Makefile
|
||||
--- dyninst-8.0/dyninst/Makefile.notest 2012-06-12 16:43:01.409000013 -0400
|
||||
+++ dyninst-8.0/dyninst/Makefile 2012-06-12 16:43:20.417998282 -0400
|
||||
@@ -44,7 +44,7 @@ $(Everything_install) $(Everything_tests
|
||||
$(Test_targets):
|
||||
@$(MAKE) -C testsuite/$(PLATFORM) $(@:%_testsuite=%)
|
||||
|
||||
-install: intro ready $(fullSystem_install) testsuite_install
|
||||
+install: intro ready $(fullSystem_install)
|
||||
|
||||
world: intro $(fullSystem)
|
||||
depend:
|
148
dyninst-vers.patch
Normal file
148
dyninst-vers.patch
Normal file
@ -0,0 +1,148 @@
|
||||
diff --git a/common/make.module.tmpl dyninst/common/make.module.tmpl
|
||||
index bbb653f..1a5504d 100644
|
||||
--- a/common/make.module.tmpl
|
||||
+++ dyninst/common/make.module.tmpl
|
||||
@@ -42,7 +42,7 @@ endif
|
||||
LDFLAGS += $(LIBDIR)
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared $(G_PTHREAD_LD)
|
||||
+LDFLAGS += -shared $(G_PTHREAD_LD) -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS +=
|
||||
CXXFLAGS += $(G_PTHREAD)
|
||||
else
|
||||
diff --git a/dynC_API/make.module.tmpl dyninst/dynC_API/make.module.tmpl
|
||||
index 4877486..a016ece 100644
|
||||
--- a/dynC_API/make.module.tmpl
|
||||
+++ dyninst/dynC_API/make.module.tmpl
|
||||
@@ -22,7 +22,7 @@ LDFLAGS += -L../../common/$(PLATFORM) -L../../symtabAPI/$(PLATFORM) -L../../dyni
|
||||
LDFLAGS += $(LIBDIR)
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared $(G_PTHREAD_LD)
|
||||
+LDFLAGS += -shared $(G_PTHREAD_LD) -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS += -fPIC
|
||||
CXXFLAGS += -fPIC $(G_PTHREAD)
|
||||
else
|
||||
diff --git a/dyninstAPI/make.module.tmpl dyninst/dyninstAPI/make.module.tmpl
|
||||
index fabb448..378fea7 100644
|
||||
--- a/dyninstAPI/make.module.tmpl
|
||||
+++ dyninst/dyninstAPI/make.module.tmpl
|
||||
@@ -54,7 +54,7 @@ LDFLAGS += -L../../stackwalk/$(PLATFORM)
|
||||
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared $(G_PTHREAD_LD)
|
||||
+LDFLAGS += -shared $(G_PTHREAD_LD) -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS += -fPIC
|
||||
CXXFLAGS += -fPIC $(G_PTHREAD)
|
||||
else
|
||||
diff --git a/dyninstAPI_RT/i386-unknown-linux2.4/Makefile dyninst/dyninstAPI_RT/i386-unknown-linux2.4/Makefile
|
||||
index aa39e22..4f4619a 100644
|
||||
--- a/dyninstAPI_RT/i386-unknown-linux2.4/Makefile
|
||||
+++ dyninst/dyninstAPI_RT/i386-unknown-linux2.4/Makefile
|
||||
@@ -18,7 +18,7 @@ endif
|
||||
|
||||
# Now make any necessary architecture specific changes to variables:
|
||||
LD = $(GCC)
|
||||
-LDFLAGS += -shared
|
||||
+LDFLAGS += -shared -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS += -O2
|
||||
|
||||
# if we want to produce a shared object...
|
||||
diff --git a/dyninstAPI_RT/x86_64-unknown-linux2.4/Makefile dyninst/dyninstAPI_RT/x86_64-unknown-linux2.4/Makefile
|
||||
index 3f72429..12eec29 100644
|
||||
--- a/dyninstAPI_RT/x86_64-unknown-linux2.4/Makefile
|
||||
+++ dyninst/dyninstAPI_RT/x86_64-unknown-linux2.4/Makefile
|
||||
@@ -17,7 +17,7 @@ endif
|
||||
|
||||
# Now make any necessary architecture specific changes to variables:
|
||||
LD = $(GCC)
|
||||
-LDFLAGS += -shared
|
||||
+LDFLAGS += -shared -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
LDFLAGS += -m64
|
||||
CFLAGS += -Wall -m64 -DMUTATEE64
|
||||
|
||||
@@ -64,7 +64,7 @@ VOUCHER_32 = V_$(XTARGET_32)
|
||||
OBJS_32 = $(patsubst %.c, %_m32.o, $(filter %.c,$(notdir $(SRCS))))
|
||||
ASM_OBJS_32 = $(patsubst %.S, %_m32.o, $(filter %.S,$(notdir $(ASM_SRCS_32))))
|
||||
CFLAGS_32 = $(subst -DMUTATEE64,-DMUTATEE_32,$(CFLAGS))
|
||||
-LDFLAGS_32 = $(LDFLAGS)
|
||||
+LDFLAGS_32 = $(subst $(TARGET),$(TARGET_32_SO),$(subst -m64,-m32,$(LDFLAGS)))
|
||||
LIBS_32 = -L/usr/lib $(LIBS)
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ $(VOUCHER_32):
|
||||
$(TARGET_32_SO): $(OBJS_32) $(ASM_OBJS_32)
|
||||
$(HIDE_COMP)$(RM) $(TARGET_32_SO)
|
||||
$(HIDE_COMP)$(MAKE) $(VOUCHER_32)
|
||||
- $(HIDE_COMP)$(LD) $(subst -m64,-m32,$(LDFLAGS_32)) -o $(TARGET_32_SO) $(VOUCHER_32).o $(OBJS_32) $(ASM_OBJS_32) $(LIBS_32)
|
||||
+ $(HIDE_COMP)$(LD) $(LDFLAGS_32) -o $(TARGET_32_SO) $(VOUCHER_32).o $(OBJS_32) $(ASM_OBJS_32) $(LIBS_32)
|
||||
RTspace.o: ../src/RTspace.S
|
||||
@echo "Compiling RTspace"
|
||||
$(HIDE_COMP)$(CC) $(CFLAGS) -c $< -o $@
|
||||
diff --git a/instructionAPI/make.module.tmpl dyninst/instructionAPI/make.module.tmpl
|
||||
index 34d4bdc..f8fe036 100644
|
||||
--- a/instructionAPI/make.module.tmpl
|
||||
+++ dyninst/instructionAPI/make.module.tmpl
|
||||
@@ -21,7 +21,7 @@ LDFLAGS += -lcommon
|
||||
LDFLAGS += -L../../common/$(PLATFORM)
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared $(G_PTHREAD_LD)
|
||||
+LDFLAGS += -shared $(G_PTHREAD_LD) -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS += -fPIC -g
|
||||
CXXFLAGS += -fPIC $(G_PTHREAD) -felide-constructors -g
|
||||
else
|
||||
diff --git a/parseAPI/make.module.tmpl dyninst/parseAPI/make.module.tmpl
|
||||
index ee27ef6..59bb98d 100644
|
||||
--- a/parseAPI/make.module.tmpl
|
||||
+++ dyninst/parseAPI/make.module.tmpl
|
||||
@@ -19,7 +19,7 @@ LDFLAGS += -L../../common/$(PLATFORM) -L../../symtabAPI/$(PLATFORM) -lcommon -ls
|
||||
LDFLAGS += $(LIBDIR)
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared $(G_PTHREAD_LD)
|
||||
+LDFLAGS += -shared $(G_PTHREAD_LD) -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS += -fPIC
|
||||
CXXFLAGS += -fPIC $(G_PTHREAD)
|
||||
else
|
||||
diff --git a/proccontrol/make.module.tmpl dyninst/proccontrol/make.module.tmpl
|
||||
index 10522ac..d0cc6ed 100644
|
||||
--- a/proccontrol/make.module.tmpl
|
||||
+++ dyninst/proccontrol/make.module.tmpl
|
||||
@@ -39,7 +39,7 @@ LDFLAGS += -L../../common/$(PLATFORM)
|
||||
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared
|
||||
+LDFLAGS += -shared -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
else
|
||||
diff --git a/stackwalk/make.module.tmpl dyninst/stackwalk/make.module.tmpl
|
||||
index 16e7c07..f68eab7 100644
|
||||
--- a/stackwalk/make.module.tmpl
|
||||
+++ dyninst/stackwalk/make.module.tmpl
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
LDFLAGS += -L$(TO_CORE)/common/$(PLATFORM) -L$(LIBRARY_DEST)
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared
|
||||
+LDFLAGS += -shared -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
else
|
||||
diff --git a/symtabAPI/make.module.tmpl dyninst/symtabAPI/make.module.tmpl
|
||||
index e922497..3c24e17 100644
|
||||
--- a/symtabAPI/make.module.tmpl
|
||||
+++ dyninst/symtabAPI/make.module.tmpl
|
||||
@@ -57,7 +57,7 @@ endif
|
||||
|
||||
ifndef USES_NATIVE_CC
|
||||
LD = $(GXX)
|
||||
-LDFLAGS += -shared $(G_PTHREAD_LD)
|
||||
+LDFLAGS += -shared $(G_PTHREAD_LD) -Wl,-soname,$(TARGET).$(RELEASE_NUM)
|
||||
CFLAGS +=
|
||||
CXXFLAGS += $(G_PTHREAD)
|
||||
else
|
152
dyninst.spec
Normal file
152
dyninst.spec
Normal file
@ -0,0 +1,152 @@
|
||||
%define version 7.99
|
||||
|
||||
Summary: An API for Run-time Code Generation
|
||||
License: LGPLv2+
|
||||
Name: dyninst
|
||||
Group: Development/Libraries
|
||||
Release: 0.12%{?dist}
|
||||
URL: http://www.dyninst.org
|
||||
Version: %version
|
||||
Exclusiveos: linux
|
||||
#Right now dyninst does not know about the following architectures
|
||||
ExcludeArch: s390 s390x %{arm}
|
||||
|
||||
# The source for this package was pulled from upstream's vcs. Use the
|
||||
# following commands to generate the tarball:
|
||||
# git clone http://git.dyninst.org/dyninst.git; cd dyninst
|
||||
# git archive --format=tar.gz --prefix=dyninst/ e3ed0acc46dcecb88db6a884fe8cdcc0bf4fde9d > dyninst-7.99.tar.gz
|
||||
# git clone http://git.dyninst.org/docs.git; cd docs
|
||||
# git archive --format=tar.gz fe92e5b28804791ecadc893e469bc2215dbc3066 > dyninst-docs-7.99.tar.gz
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}-docs-%{version}.tar.gz
|
||||
Patch1: dyninst-notest.patch
|
||||
Patch2: dyninst-vers.patch
|
||||
# Change version number so official dyninst 8.0 will replace it
|
||||
Patch3: dyninst-git.patch
|
||||
BuildRequires: libxml2-devel >= 2.7.8
|
||||
BuildRequires: libdwarf-devel
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
BuildRequires: boost-devel
|
||||
|
||||
%description
|
||||
|
||||
Dyninst is an Application Program Interface (API) to permit the insertion of
|
||||
code into a running program. The API also permits changing or removing
|
||||
subroutine calls from the application program. Run-time code changes are
|
||||
useful to support a variety of applications including debugging, performance
|
||||
monitoring, and to support composing applications out of existing packages.
|
||||
The goal of this API is to provide a machine independent interface to permit
|
||||
the creation of tools and applications that use run-time code patching.
|
||||
|
||||
%package devel
|
||||
Summary: Header files for the compiling programs with Dyninst
|
||||
Group: Development/System
|
||||
Requires: dyninst = %{version}-%{release}
|
||||
%description devel
|
||||
Dyninst-devel includes the C header files that specify the Dyninst user-space
|
||||
libraries and interfaces. This is required for rebuilding any program
|
||||
that uses Dyninst.
|
||||
|
||||
%package static
|
||||
Summary: Static libraries for the compiling programs with Dyninst
|
||||
Group: Development/System
|
||||
Requires: dyninst = %{version}-%{release}
|
||||
%description static
|
||||
dyninst-static includes the static versions of the library files for
|
||||
the dyninst user-space libraries and interfaces.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version} -c
|
||||
%setup -q -T -D -a 1
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p0 -b .vers
|
||||
%patch3 -p1 -b .git
|
||||
|
||||
%build
|
||||
|
||||
cd dyninst
|
||||
|
||||
%configure
|
||||
make \
|
||||
DONT_BUILD_NEWTESTSUITE=1 \
|
||||
all StackwalkerAPI
|
||||
|
||||
%install
|
||||
|
||||
cd dyninst
|
||||
make \
|
||||
LIBRARY_DEST=%{buildroot}/%{_libdir}/dyninst \
|
||||
PROGRAM_DEST=%{buildroot}/usr/bin \
|
||||
INCLUDE_DEST=%{buildroot}/usr/include/dyninst \
|
||||
DONT_BUILD_NEWTESTSUITE=1 \
|
||||
install
|
||||
|
||||
mkdir -p %{buildroot}/etc/ld.so.conf.d
|
||||
echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
# Ugly hack to fix permissions
|
||||
chmod 644 %{buildroot}%{_includedir}/dyninst/*
|
||||
chmod 644 %{buildroot}%{_libdir}/dyninst/*.a
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
# FIXME parseThat is not part of normal build
|
||||
#%{_bindir}/parseThat
|
||||
%{_libdir}/dyninst/*.so.*
|
||||
|
||||
# The README also contains the license information
|
||||
#%doc LICENSE
|
||||
%doc dyninst/dyninstAPI/README
|
||||
|
||||
%doc depGraphAPI.pdf
|
||||
%doc dynC_API.pdf
|
||||
%doc dyninstProgGuide.pdf
|
||||
%doc symtabAPI/symtabProgGuide.pdf
|
||||
%doc instructionProgGuide.pdf
|
||||
%doc parseapi.pdf
|
||||
%doc ProcControlAPI.pdf
|
||||
%doc stackwalk/stackwalker.pdf
|
||||
%doc dynC_API.pdf
|
||||
|
||||
%config(noreplace) /etc/ld.so.conf.d/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/dyninst
|
||||
%{_libdir}/dyninst/*.so
|
||||
|
||||
%files static
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/dyninst/*.a
|
||||
|
||||
%changelog
|
||||
* Tue Jun 19 2012 William Cohen <wcohen@redhat.com> - 7.99-0.12
|
||||
- Fix static library and header file permissions.
|
||||
- Use sources from the dyninst git repositories.
|
||||
- Fix 32-bit library versioning for libdyninstAPI_RT_m32.so.
|
||||
|
||||
* Wed Jun 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.11
|
||||
- Fix library versioning.
|
||||
- Move .so links to dyninst-devel.
|
||||
- Remove unneded clean section.
|
||||
|
||||
* Fri May 11 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.9
|
||||
- Clean up Makefile rules.
|
||||
|
||||
* Wed May 5 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.8
|
||||
- Clean up spec file.
|
||||
|
||||
* Wed May 2 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.7
|
||||
- Use "make install" and do staged build.
|
||||
- Use rpm configure macro.
|
||||
|
||||
* Thu Mar 15 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.5
|
||||
- Nuke the bundled boost files and use the boost-devel rpm instead.
|
||||
|
||||
* Mon Mar 12 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.4
|
||||
- Initial submission of dyninst spec file.
|
Loading…
Reference in New Issue
Block a user