diff --git a/abc-gia.patch b/abc-gia.patch new file mode 100644 index 0000000..9988b05 --- /dev/null +++ b/abc-gia.patch @@ -0,0 +1,11 @@ +--- src/aig/gia/gia.h.orig 2020-07-20 20:56:06.000000000 -0600 ++++ src/aig/gia/gia.h 2020-07-24 15:13:12.699364636 -0600 +@@ -1118,7 +1118,7 @@ static inline int Gia_ObjCellId( + #define Gia_ManForEachLutReverse( p, i ) \ + for ( i = Gia_ManObjNum(p) - 1; i > 0; i-- ) if ( !Gia_ObjIsLut(p, i) ) {} else + #define Gia_LutForEachFanin( p, i, iFan, k ) \ +- for ( k = 0; k < Gia_ObjLutSize(p,i) && ((iFan = Gia_ObjLutFanins(p,i)[k]),1); k++ ) ++ for ( k = 0; k < Gia_ObjLutSize(p,i) && ((iFan = Gia_ObjLutFanins(p,i)[k]),1); k++ ) if (iFan >= 0) + #define Gia_LutForEachFaninObj( p, i, pFanin, k ) \ + for ( k = 0; k < Gia_ObjLutSize(p,i) && ((pFanin = Gia_ManObj(p, Gia_ObjLutFanins(p,i)[k])),1); k++ ) + diff --git a/abc.spec b/abc.spec index 9a3f7c7..61ead3f 100644 --- a/abc.spec +++ b/abc.spec @@ -1,8 +1,8 @@ # Upstream doesn't make releases. We have to check the code out of git. %global owner berkeley-abc -%global gittag 8eb6aed5d116afc0933b49c6973af08cf2eff471 +%global gittag 448f26344325cc78942d576740457036671b0976 %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20200127 +%global gitdate 20200720 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -41,6 +41,9 @@ Patch2: %{name}-header.patch Patch3: %{name}-build.patch # Fix sprintf calls that can overflow their buffers Patch4: %{name}-format.patch +# Fix an out-of-bounds array access in the gia code +# https://github.com/berkeley-abc/abc/pull/89 +Patch5: %{name}-gia.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -66,8 +69,9 @@ their needs as if it were a toolbox rather than a complete tool. %package libs Summary: Library for sequential synthesis and verification -# ABC includes a bundled and modified version of CUDD 2.4.2, which is -# incompatible with the Fedora-provided CUDD 3.0.0. +# ABC includes a bundled and modified version of CUDD 2.4.2. The CUDD package +# is no longer available from Fedora since the disappearance of the upstream +# web site (and the last released version was 3.0.0). Provides: bundled(cudd) = 2.4.2 %description libs @@ -90,29 +94,36 @@ rm -fr lib src/misc/{bzlib,zlib} sed 's/@VERSION@/%{version} (%{gitdate})/' %{SOURCE1} > %{name}.1 touch -r %{SOURCE1} %{name}.1 +# Do not override Fedora optimization flags +sed -i 's/ -O//' Makefile + %build export CFLAGS="%{optflags} -DNDEBUG" export CXXFLAGS="$CFLAGS" -%cmake -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES . -%make_build ABC_MAKE_VERBOSE=1 ABC_USE_STDINT_H=1 +export ABC_MAKE_VERBOSE=1 +export ABC_USE_STDINT_H=1 +%cmake +%cmake_build %install +# %%cmake_install does not install anything. Install by hand. + +# Install the binary +cd %{__cmake_builddir} +mkdir -p %{buildroot}%{_bindir} +install -p -m 0755 %{name} %{buildroot}%{_bindir} + # Install the library mkdir -p %{buildroot}%{_libdir} -install -p -m 0755 lib%{name}.so.0.0.0 %{buildroot}%{_libdir} -ln -s lib%{name}.so.0.0.0 %{buildroot}%{_libdir}/lib%{name}.so.0 -ln -s lib%{name}.so.0 %{buildroot}%{_libdir}/lib%{name}.so +cp -pd lib%{name}.so* %{buildroot}%{_libdir} +cd - # Install the header files -pushd src +cd src mkdir -p %{buildroot}%{_includedir}/%{name} tar -cBf - $(find -O3 . -name \*.h) | \ (cd %{buildroot}%{_includedir}/%{name}; tar -xBf -) -popd - -# Install the binary -mkdir -p %{buildroot}%{_bindir} -install -p -m 0755 %{name} %{buildroot}%{_bindir} +cd - # Install the man page mkdir -p %{buildroot}%{_mandir}/man1 @@ -132,6 +143,11 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Mon Jul 27 2020 Jerry James - 1.01-27.git20200720 +- Update to latest git snapshot +- Add -gia patch to fix crash +- Adapt to cmake changes in Rawhide + * Mon Jul 27 2020 Fedora Release Engineering - 1.01-27.git20200127 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index d90af9c..9f5e922 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-8eb6aed.tar.gz) = 9f137d0d107a7d202bcdc950ee7daefda7992bbeaf79cfc5fb23c5e7d0f0ef1b391ea6c9769d29fcf98d439400b075210565842172d44b1b3d0bc9923488f1ae +SHA512 (abc-448f263.tar.gz) = bb8805d10031150d1f967da31f01c6ed314689efade008b97d16f984f08132f9672507bafd0bcb518f28f6a3ce332541f312229b7dcfdf6b247ca420540caf07