[csmith] Initial release
Shakthi Kannan
shakthimaan at fedoraproject.org
Wed Nov 21 03:46:30 UTC 2012
commit 300f6fe4aee27ba5d1c1330341cfb48ace8e8c80
Author: Shakthi Kannan <skannan at redhat.com>
Date: Wed Nov 21 09:08:38 2012 +0530
Initial release
.gitignore | 1 +
csmith-2.1.0-fix-powerpc64-build.patch | 12 ++++
csmith-2.1.0-remove-custom-headers.patch | 42 ++++++++++++++
csmith.spec | 92 ++++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 148 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5887c19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/csmith-2.1.0.tar.gz
diff --git a/csmith-2.1.0-fix-powerpc64-build.patch b/csmith-2.1.0-fix-powerpc64-build.patch
new file mode 100644
index 0000000..172e560
--- /dev/null
+++ b/csmith-2.1.0-fix-powerpc64-build.patch
@@ -0,0 +1,12 @@
+diff -up csmith-2.1.0/src/platform.cpp.ppc64 csmith-2.1.0/src/platform.cpp
+--- csmith-2.1.0/src/platform.cpp.ppc64 2011-11-26 08:51:18.432924849 +0530
++++ csmith-2.1.0/src/platform.cpp 2011-11-26 08:52:04.750345802 +0530
+@@ -44,7 +44,7 @@
+
+ #include "platform.h"
+
+-#if (TARGET_CPU_powerpc == 1)
++#if (TARGET_CPU_powerpc == 1 || TARGET_CPU_powerpc64 == 1)
+ /*For PPC, got from:
+ http://lists.ozlabs.org/pipermail/linuxppc-dev/1999-October/003889.html
+ */
diff --git a/csmith-2.1.0-remove-custom-headers.patch b/csmith-2.1.0-remove-custom-headers.patch
new file mode 100644
index 0000000..b80520f
--- /dev/null
+++ b/csmith-2.1.0-remove-custom-headers.patch
@@ -0,0 +1,42 @@
+diff -up csmith-2.1.0/runtime/Makefile.am.fix csmith-2.1.0/runtime/Makefile.am
+--- csmith-2.1.0/runtime/Makefile.am.fix 2012-06-02 11:02:42.455528133 +0530
++++ csmith-2.1.0/runtime/Makefile.am 2012-06-02 11:03:44.471529558 +0530
+@@ -61,17 +61,11 @@ libcsmith_a_includedir = \
+ nobase_libcsmith_a_include_HEADERS = \
+ csmith.h \
+ csmith_minimal.h \
+- custom_limits.h \
+- custom_stdint_x86.h \
+ platform_avr.h \
+ platform_generic.h \
+ platform_msp430.h \
+ random_inc.h \
+ safe_abbrev.h \
+- stdint_avr.h \
+- stdint_ia32.h \
+- stdint_ia64.h \
+- stdint_msp430.h \
+ windows/stdint.h \
+ volatile_runtime.c \
+ volatile_runtime.h
+diff -up csmith-2.1.0/runtime/Makefile.in.fix csmith-2.1.0/runtime/Makefile.in
+--- csmith-2.1.0/runtime/Makefile.in.fix 2012-06-02 11:02:46.111528214 +0530
++++ csmith-2.1.0/runtime/Makefile.in 2012-06-02 11:03:55.775529803 +0530
+@@ -258,17 +258,11 @@ libcsmith_a_includedir = \
+ nobase_libcsmith_a_include_HEADERS = \
+ csmith.h \
+ csmith_minimal.h \
+- custom_limits.h \
+- custom_stdint_x86.h \
+ platform_avr.h \
+ platform_generic.h \
+ platform_msp430.h \
+ random_inc.h \
+ safe_abbrev.h \
+- stdint_avr.h \
+- stdint_ia32.h \
+- stdint_ia64.h \
+- stdint_msp430.h \
+ windows/stdint.h \
+ volatile_runtime.c \
+ volatile_runtime.h
diff --git a/csmith.spec b/csmith.spec
new file mode 100644
index 0000000..f5b7ce1
--- /dev/null
+++ b/csmith.spec
@@ -0,0 +1,92 @@
+Name: csmith
+Version: 2.1.0
+Release: 6%{?dist}
+Summary: Tool to generate random C programs for compiler testing
+
+Group: Development/Tools
+# Most of the source code is under BSD while few header files are GPLv2+ and LGPLv2+
+License: BSD and GPLv2+ and LGPLv2+
+URL: http://embed.cs.utah.edu/csmith/
+Source0: http://embed.cs.utah.edu/csmith/%{name}-%{version}.tar.gz
+Patch0: csmith-2.1.0-fix-powerpc64-build.patch
+Patch1: csmith-2.1.0-remove-custom-headers.patch
+
+BuildRequires: m4
+
+%description
+Csmith is a tool that can generate random C programs that
+statically and dynamically conform to the C99 standard. It is
+useful for stress-testing compilers, static analyzers, and
+other tools that process C code
+
+%package devel
+Summary: Header files and libraries for Csmith development
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: pkgconfig
+
+%description devel
+The %{name}-devel package contains the header files
+and libraries for use with the Csmith package.
+
+%prep
+%setup -q
+%patch0 -p1 -b .ppc64
+%patch1 -p1 -b .fix
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+find %{buildroot} -name *.a -exec rm -f {} \;
+find %{buildroot} -name *.la -exec rm -f {} \;
+find %{buildroot} -name test_csmith.pl -exec rm -f {} \;
+rm -f %{buildroot}%{_bindir}/compiler_test.in
+rm -rf %{buildroot}%{_docdir}/%{name}
+
+%clean
+rm -rf %{buildroot}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING doc/probabilities.txt scripts/compiler_test.in
+%{_bindir}/compiler_test.pl
+%{_bindir}/csmith
+%{_bindir}/launchn.pl
+%{_libdir}/libcsmith.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/%{name}-%{version}
+%{_libdir}/libcsmith.so
+
+%changelog
+* Mon Nov 19 2012 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.0-6
+- Removed BuildRoot tag
+- Add multiple license comment
+- Remove /usr/share/doc/csmith directory
+
+* Mon Oct 29 2012 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.0-5
+- Update docdir
+
+* Sat Jun 02 2012 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.0-4
+- Use system header files.
+
+* Thu Dec 01 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.0-3
+- Removed test_csmith.pl from the package.
+
+* Sat Nov 26 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.0-2
+- Move compiler_test.in to doc.
+- Apply patch to build for ppc64.
+- Added licenses.
+
+* Wed Nov 23 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.0-1
+- Initial build.
+
diff --git a/sources b/sources
index e69de29..c0d01aa 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3170ce73f0347d82c1206cf145cb49c7 csmith-2.1.0.tar.gz
More information about the scm-commits
mailing list