New upstream version 1.7.3
- Use upstream make install target. - Build and install documentation. - Run test suite. - Fix perl-related Provides and Requires for -cilly. - Enable on arm and ppc (fixed by upstream ./configure). - Apply two upstream patches to test suite.
This commit is contained in:
parent
10d527af37
commit
bba9fbd600
|
@ -1,2 +1 @@
|
||||||
cil-1.3.7.tar.gz
|
/cil-*.tar.gz
|
||||||
/cil-1.4.0.tar.gz
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
From: Gabriel Kerneis <gabriel@kerneis.info>
|
||||||
|
Date: Thu, 29 Aug 2013 09:30:23 +0100
|
||||||
|
Subject: Fix testsuite on 32-bit machines
|
||||||
|
|
||||||
|
---
|
||||||
|
test/small1/arrsize.c | 2 +-
|
||||||
|
test/testcil.pl | 1 +
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/small1/arrsize.c b/test/small1/arrsize.c
|
||||||
|
index 6da8d0a..718b948 100755
|
||||||
|
--- a/test/small1/arrsize.c
|
||||||
|
+++ b/test/small1/arrsize.c
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#include "testharness.h"
|
||||||
|
|
||||||
|
-#define MAXINT (1ull << ((8 * sizeof(int)) - 1))
|
||||||
|
+#define MAXINT (1ull << ((8 * sizeof(int)) - 2))
|
||||||
|
|
||||||
|
int g1[ MAXINT / sizeof(int) ];
|
||||||
|
char g2[ MAXINT / sizeof(char) ];
|
||||||
|
diff --git a/test/testcil.pl b/test/testcil.pl
|
||||||
|
index 778dfa7..dd814ed 100644
|
||||||
|
--- a/test/testcil.pl
|
||||||
|
+++ b/test/testcil.pl
|
||||||
|
@@ -569,6 +569,7 @@ addTest("merge-ar ");
|
||||||
|
addTest("testrun/sizeof1");
|
||||||
|
addTest("testrun/sizeof2");
|
||||||
|
addTest("test/sizeof3");
|
||||||
|
+addBadComment("test/sizeof3", "Bug. Constant-folding of very large arrays does not work on 32-bit machines.");
|
||||||
|
addTest("test/outofmem ");
|
||||||
|
addTest("testrun/builtin ");
|
||||||
|
addTest("test/builtin2 ");
|
|
@ -0,0 +1,27 @@
|
||||||
|
From: Gabriel Kerneis <gabriel@kerneis.info>
|
||||||
|
Date: Thu, 29 Aug 2013 10:36:20 +0100
|
||||||
|
Subject: Do not fail testsuite on new gcc behaviour
|
||||||
|
|
||||||
|
Sometime between gcc 4.4 and gcc 4.7, the behaviour
|
||||||
|
of function attributes has changed such that
|
||||||
|
test/small2/regparm0.c does not compile anymore on 32-bit.
|
||||||
|
This is actually a good thing, since the previous behaviour
|
||||||
|
was quite confusing (although supported by CIL).
|
||||||
|
---
|
||||||
|
test/testcil.pl | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/testcil.pl b/test/testcil.pl
|
||||||
|
index dd814ed..560430a 100644
|
||||||
|
--- a/test/testcil.pl
|
||||||
|
+++ b/test/testcil.pl
|
||||||
|
@@ -620,7 +620,8 @@ addTest("scott/open $gcc");
|
||||||
|
addTest("scott/constfold");
|
||||||
|
addTest("scott/mode_sizes $gcc"); # mode(__QI__) stuff
|
||||||
|
addTest("scott-nolink/brlock $gcc");
|
||||||
|
-addTest("scott/regparm0 $gcc"); # this works, unfortunately... but the bug has been fixed nonetheless
|
||||||
|
+addTest("scott/regparm0 $gcc"); # this used to work, unfortunately... but the bug has been fixed in CIL (and now gcc)
|
||||||
|
+addBadComment("scott/regparm0", "Notbug. Not a bug if fails with gcc >= 4.7 on i386");
|
||||||
|
addTest("scott/unscomp"); # kernel/fs/buffer.c
|
||||||
|
addTest("scott/thing");
|
||||||
|
|
116
ocaml-cil.spec
116
ocaml-cil.spec
|
@ -1,26 +1,22 @@
|
||||||
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
# Prevent unwanted bytecode stripping by RPM.
|
|
||||||
%define __strip /bin/true
|
|
||||||
|
|
||||||
Name: ocaml-cil
|
Name: ocaml-cil
|
||||||
Version: 1.4.0
|
Version: 1.7.3
|
||||||
Release: 10%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: CIL - Infrastructure for C Program Analysis and Transformation
|
Summary: CIL - Infrastructure for C Program Analysis and Transformation
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://cil.sourceforge.net/
|
URL: http://cil.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/cil/cil-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/cil/cil-%{version}.tar.gz
|
||||||
|
|
||||||
ExcludeArch: armv7hl
|
|
||||||
ExcludeArch: ppc64
|
|
||||||
ExcludeArch: ppc
|
|
||||||
ExcludeArch: sparc64
|
ExcludeArch: sparc64
|
||||||
ExcludeArch: s390 s390x
|
ExcludeArch: s390 s390x
|
||||||
|
|
||||||
BuildRequires: ocaml, ocaml-findlib-devel, ocaml-ocamldoc
|
BuildRequires: ocaml, ocaml-findlib-devel, ocaml-ocamldoc
|
||||||
|
|
||||||
|
Patch0: 0001-Fix-testsuite-on-32-bit-machines.patch
|
||||||
|
Patch1: 0002-Do-not-fail-testsuite-on-new-gcc-behaviour.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
CIL (C Intermediate Language) is a high-level representation along
|
CIL (C Intermediate Language) is a high-level representation along
|
||||||
|
@ -63,6 +59,7 @@ developing applications that use %{name}.
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for %{name}
|
Summary: Documentation for %{name}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildRequires: tex(latex), hevea
|
||||||
|
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
|
@ -71,23 +68,24 @@ The %{name}-doc package contains documentation for users of %{name}.
|
||||||
|
|
||||||
%package cilly
|
%package cilly
|
||||||
Summary: Support programs for %{name}
|
Summary: Support programs for %{name}
|
||||||
# Run-time for tests
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
|
# test and doc use cilly: Requires must also be BuildRequires
|
||||||
BuildRequires: perl(Carp)
|
BuildRequires: perl(Carp)
|
||||||
BuildRequires: perl(Data::Dumper)
|
BuildRequires: perl(Data::Dumper)
|
||||||
|
BuildRequires: perl(File::Basename)
|
||||||
|
BuildRequires: perl(File::Copy)
|
||||||
BuildRequires: perl(File::Spec)
|
BuildRequires: perl(File::Spec)
|
||||||
|
BuildRequires: perl(File::Temp)
|
||||||
|
BuildRequires: perl(FindBin)
|
||||||
BuildRequires: perl(lib)
|
BuildRequires: perl(lib)
|
||||||
|
BuildRequires: perl(strict)
|
||||||
BuildRequires: perl(Text::ParseWords)
|
BuildRequires: perl(Text::ParseWords)
|
||||||
Requires: %{name} = %{version}-%{release}
|
# Some more dependencies used only for build and test
|
||||||
Provides: perl(CilConfig) = %{version}
|
BuildRequires: perl(Getopt::Long)
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||||
# Explicit requires because system-wide dependency generator is overriden in
|
# Filter out wrong Provides (automatically generated)
|
||||||
# this package
|
%global __provides_exclude perl\\(AR|GNUCC|MSLIB|MSLINK|MSVC\\)
|
||||||
Requires: perl(Carp)
|
|
||||||
Requires: perl(Data::Dumper)
|
|
||||||
Requires: perl(File::Spec)
|
|
||||||
Requires: perl(lib)
|
|
||||||
Requires: perl(Text::ParseWords)
|
|
||||||
|
|
||||||
|
|
||||||
%description cilly
|
%description cilly
|
||||||
The %{name}-cilly package contains the 'cilly' wrapper/replacement
|
The %{name}-cilly package contains the 'cilly' wrapper/replacement
|
||||||
|
@ -97,50 +95,43 @@ for gcc.
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n cil-%{version}
|
%setup -q -n cil-%{version}
|
||||||
|
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./configure --libdir=%{_libdir}
|
|
||||||
make RELEASE=1
|
|
||||||
make quicktest
|
|
||||||
|
|
||||||
archos=`ls obj`
|
export PERL_MM_OPT=INSTALLDIRS=vendor
|
||||||
|
|
||||||
rm -f bin/CilConfig.pm
|
%configure
|
||||||
cat > bin/CilConfig.pm <<EOF
|
# make -j is broken, do not use it
|
||||||
\$::archos = "$archos";
|
make all doc
|
||||||
\$::cc = "gcc";
|
# Force build of bytecode version even if ocamlopt is available
|
||||||
\$::cilhome = "%{_libexecdir}/cil";
|
make OCAMLBEST= bin/cilly.byte
|
||||||
\$::default_mode = "GNUCC";
|
|
||||||
EOF
|
|
||||||
|
|
||||||
#strip obj/$archos/cilly.byte.exe - NO! It removes the bytecode :-(
|
|
||||||
%if %opt
|
|
||||||
strip obj/$archos/cilly.asm.exe
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# This sets $archos to something like 'x86_LINUX':
|
|
||||||
archos=`ls obj`
|
|
||||||
|
|
||||||
export DESTDIR=$RPM_BUILD_ROOT
|
export DESTDIR=$RPM_BUILD_ROOT
|
||||||
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||||
|
|
||||||
# CIL's make install rule is totally borked.
|
|
||||||
mkdir -p $DESTDIR%{perl_vendorlib}
|
|
||||||
install -m 0644 lib/*.pm bin/CilConfig.pm $DESTDIR%{perl_vendorlib}
|
|
||||||
mkdir -p $OCAMLFIND_DESTDIR
|
mkdir -p $OCAMLFIND_DESTDIR
|
||||||
ocamlfind install cil META obj/$archos/*.{ml,mli,cmi,cmo,cmx,cma,cmxa,o,a} \
|
make DESTDIR=$DESTDIR install
|
||||||
src/*.mli
|
|
||||||
|
|
||||||
mkdir -p $DESTDIR%{_bindir}
|
# clean up .packlist
|
||||||
install -m 0755 bin/cilly $DESTDIR%{_bindir}
|
find $DESTDIR -name .packlist -type f -exec rm -f {} \;
|
||||||
|
|
||||||
mkdir -p $DESTDIR%{_libexecdir}/cil/obj/$archos
|
# make install does not install documentation
|
||||||
install -m 0755 obj/$archos/cilly.*.exe $DESTDIR%{_libexecdir}/cil/obj/$archos
|
# Copy documentation in doc/ocaml-cil, avoiding spurious files not cleaned up by
|
||||||
|
# CIL
|
||||||
mkdir -p $DESTDIR/etc/prelink.conf.d
|
mkdir -p doc/ocaml-cil/html
|
||||||
echo '-b /usr/libexec/cil' > $DESTDIR/etc/prelink.conf.d/ocaml-cil-cilly.conf
|
cp -r doc/html/cil/api doc/ocaml-cil/html
|
||||||
|
cp -r doc/html/cil/examples doc/ocaml-cil/html
|
||||||
|
cp doc/html/cil/*.gif doc/ocaml-cil/html/
|
||||||
|
cp doc/html/cil/*.html doc/ocaml-cil/html/
|
||||||
|
cp doc/html/cil/*.css doc/ocaml-cil/html/
|
||||||
|
cp doc/html/cil/CIL.pdf doc/ocaml-cil/cil-manual.pdf
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
@ -155,7 +146,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%exclude %{_libdir}/ocaml/cil/*.cmx
|
%exclude %{_libdir}/ocaml/cil/*.cmx
|
||||||
%endif
|
%endif
|
||||||
%exclude %{_libdir}/ocaml/cil/*.mli
|
%exclude %{_libdir}/ocaml/cil/*.mli
|
||||||
%exclude %{_libdir}/ocaml/cil/*.ml
|
|
||||||
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
@ -166,25 +156,29 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_libdir}/ocaml/cil/*.cmx
|
%{_libdir}/ocaml/cil/*.cmx
|
||||||
%endif
|
%endif
|
||||||
%{_libdir}/ocaml/cil/*.mli
|
%{_libdir}/ocaml/cil/*.mli
|
||||||
%{_libdir}/ocaml/cil/*.ml
|
|
||||||
|
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc README.md LICENSE doc/*
|
%doc README.md LICENSE doc/ocaml-cil/*
|
||||||
|
|
||||||
%files cilly
|
%files cilly
|
||||||
%doc README.md LICENSE
|
%doc README.md LICENSE
|
||||||
%{perl_vendorlib}/CilConfig.pm
|
%dir %{perl_vendorlib}/App
|
||||||
%{perl_vendorlib}/Cilly.pm
|
%{perl_vendorlib}/App/Cilly
|
||||||
%{perl_vendorlib}/KeptFile.pm
|
%{perl_vendorlib}/App/Cilly.pm
|
||||||
%{perl_vendorlib}/OutputFile.pm
|
%{_bindir}/cilly*
|
||||||
%{perl_vendorlib}/TempFile.pm
|
|
||||||
%{_bindir}/cilly
|
|
||||||
%{_libexecdir}/cil
|
|
||||||
%config(noreplace) /etc/prelink.conf.d/ocaml-cil-cilly.conf
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 30 2013 Gabriel Kerneis <gabriel@kerneis.info> - 1.7.3-1
|
||||||
|
- New upstream version 1.7.3.
|
||||||
|
- Use upstream make install target.
|
||||||
|
- Build and install documentation.
|
||||||
|
- Run test suite.
|
||||||
|
- Fix perl-related Provides and Requires for -cilly.
|
||||||
|
- Enable on arm and ppc (fixed by upstream ./configure).
|
||||||
|
- Apply two upstream patches to test suite.
|
||||||
|
|
||||||
* Sun Aug 4 2013 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-10
|
* Sun Aug 4 2013 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-10
|
||||||
- Disable on arm (not supported by upstream ./configure).
|
- Disable on arm (not supported by upstream ./configure).
|
||||||
- Modernize the spec file.
|
- Modernize the spec file.
|
||||||
|
|
Loading…
Reference in New Issue