From d51159afe7881e5216f5fd68aacb112071b33311 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 18 Dec 2019 10:06:18 -0700 Subject: [PATCH 01/26] Update to latest git snapshot. Add -giaDeep patch to fix build failure. --- abc-build.patch | 6 +- abc-format.patch | 142 +++++++++++++++++----------------------------- abc-giaDeep.patch | 10 ++++ abc.1 | 3 + abc.rpmlintrc | 5 ++ abc.spec | 20 ++++--- sources | 2 +- 7 files changed, 86 insertions(+), 102 deletions(-) create mode 100644 abc-giaDeep.patch create mode 100644 abc.rpmlintrc diff --git a/abc-build.patch b/abc-build.patch index e4a0c99..7952074 100644 --- a/abc-build.patch +++ b/abc-build.patch @@ -1,11 +1,11 @@ ---- CMakeLists.txt.orig 2019-05-30 20:27:31.000000000 -0600 -+++ CMakeLists.txt 2019-06-04 09:41:14.524445396 -0600 +--- CMakeLists.txt.orig 2019-12-17 15:57:46.000000000 -0700 ++++ CMakeLists.txt 2019-12-18 09:13:25.779458679 -0700 @@ -53,7 +53,7 @@ execute_process( make ${ABC_READLINE_FLAGS} ${ABC_USE_NAMESPACE_FLAGS} - ARCHFLAGS_EXE=${CMAKE_CURRENT_BINARY_DIR}/abc_arch_flags_program.exe -+ ABC_USE_STDINT_H=1 ++ ABC_USE_STDINT_H=1 ABC_MAKE_NO_DEPS=1 CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} diff --git a/abc-format.patch b/abc-format.patch index bf00519..8ba0e49 100644 --- a/abc-format.patch +++ b/abc-format.patch @@ -1,34 +1,27 @@ ---- src/aig/aig/aigUtil.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/aig/aig/aigUtil.c 2019-06-04 09:42:11.236444258 -0600 -@@ -725,7 +725,7 @@ void Aig_ManPrintVerbose( Aig_Man_t * p, - void Aig_ManDump( Aig_Man_t * p ) - { - static int Counter = 0; -- char FileName[20]; -+ char FileName[24]; - // dump the logic into a file - sprintf( FileName, "aigbug\\%03d.blif", ++Counter ); - Aig_ManDumpBlif( p, FileName, NULL, NULL ); ---- src/aig/gia/giaScript.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/aig/gia/giaScript.c 2019-06-04 09:42:11.237444240 -0600 -@@ -610,10 +610,10 @@ void Gia_ManPerformFlow( int fIsMapped, - void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fMinAve, int fUseMfs, int fVerbose ) +--- src/aig/miniaig/ndr.h.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/aig/miniaig/ndr.h 2019-12-18 09:47:14.076891270 -0700 +@@ -496,8 +496,16 @@ static inline void Ndr_WriteVerilog( cha { - char Comm1[100], Comm2[100], Comm3[100], Comm4[100]; -- sprintf( Comm1, "&synch2 -K %d -C 500; &if -m%s -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -- sprintf( Comm2, "&dch -C 500; &if -m%s -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -- sprintf( Comm3, "&synch2 -K %d -C 500; &lf -m%s -E 5 -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -- sprintf( Comm4, "&dch -C 500; &lf -m%sk -E 5 -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm1, 100U, "&synch2 -K %d -C 500; &if -m%s -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm2, 100U, "&dch -C 500; &if -m%s -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm3, 100U, "&synch2 -K %d -C 500; &lf -m%s -E 5 -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm4, 100U, "&dch -C 500; &lf -m%sk -E 5 -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); + Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int Mod; - // perform synthesis - if ( fVerbose ) ---- src/base/abci/abcMiter.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/abci/abcMiter.c 2019-06-04 09:42:11.238444223 -0600 -@@ -860,7 +860,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFr +- FILE * pFile = pFileName ? fopen( pFileName, "wb" ) : stdout; +- if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } ++ FILE * pFile; ++ if (pFileName) ++ { ++ pFile = fopen( pFileName, "wb" ); ++ if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } ++ } ++ else ++ { ++ pFile = stdout; ++ } + + Ndr_DesForEachMod( p, Mod ) + Ndr_WriteVerilogModule( pFile, p, Mod, pNames ); +--- src/base/abci/abcMiter.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/base/abci/abcMiter.c 2019-12-18 09:44:30.567338848 -0700 +@@ -863,7 +863,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFr { int fVerbose = 0; int NodeBef = Abc_NtkNodeNum(pNtkFrames); @@ -37,8 +30,17 @@ Abc_Obj_t * pNode, * pLatch; int i; // create the prefix to be added to the node names ---- src/base/io/ioReadBlifMv.c.orig 2019-06-04 09:40:32.232191985 -0600 -+++ src/base/io/ioReadBlifMv.c 2019-06-04 09:42:11.239444205 -0600 +--- src/base/io/ioReadBlifMv.c.orig 2019-12-18 09:43:13.388550105 -0700 ++++ src/base/io/ioReadBlifMv.c 2019-12-18 09:43:30.483503314 -0700 +@@ -1626,7 +1626,7 @@ static int Io_MvParseLineMv( Io_MvMod_t + ***********************************************************************/ + static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc ) + { +- char Buffer[10]; ++ char Buffer[12]; + Abc_Obj_t * pFanin; + int i; + // add the fanin number of values @@ -1656,7 +1656,7 @@ static int Io_MvWriteValues( Abc_Obj_t * ***********************************************************************/ static int Io_MvParseLiteralMv( Io_MvMod_t * p, Abc_Obj_t * pNode, char * pToken, Vec_Str_t * vFunc, int iLit ) @@ -48,20 +50,9 @@ Io_MvVar_t * pVar; Abc_Obj_t * pFanin, * pNet; char * pCur, * pNext; ---- src/base/ver/verCore.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/ver/verCore.c 2019-06-04 09:42:11.240444188 -0600 -@@ -1171,7 +1171,7 @@ int Ver_ParseAssign( Ver_Man_t * pMan, A - pNode = Abc_NtkCreateNodeBuf( pNtk, pNet ); - - // get the fanout net -- sprintf( Buffer2, "%s[%d]", Buffer, Bit ); -+ snprintf( Buffer2, 1000U, "%s[%d]", Buffer, Bit ); - pNet = Ver_ParseFindNet( pNtk, Buffer2 ); - if ( pNet == NULL ) - { ---- src/base/wlc/wlcNdr.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/wlc/wlcNdr.c 2019-06-04 09:42:11.241444170 -0600 -@@ -478,7 +478,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData +--- src/base/wlc/wlcNdr.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/base/wlc/wlcNdr.c 2019-12-18 08:43:25.865457806 -0700 +@@ -487,7 +487,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); for ( i = 1; i <= NameIdMax; i++ ) { @@ -70,8 +61,8 @@ NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); assert( !fFound && i == NameId ); } ---- src/base/wln/wlnNdr.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/wln/wlnNdr.c 2019-06-04 09:42:11.242444152 -0600 +--- src/base/wln/wlnNdr.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/base/wln/wlnNdr.c 2019-12-18 08:43:25.866457804 -0700 @@ -256,7 +256,7 @@ Wln_Ntk_t * Wln_NtkFromNdr( void * pData pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); for ( i = 1; i <= NameIdMax; i++ ) @@ -81,28 +72,8 @@ NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); assert( !fFound && i == NameId ); } ---- src/bdd/cas/casCore.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/bdd/cas/casCore.c 2019-06-04 09:42:11.243444135 -0600 -@@ -259,7 +259,7 @@ int Abc_CascadeExperiment( char * pFileG - if ( fCheck ) - { - char Command[200]; -- sprintf( Command, "cec %s %s", FileNameIni, FileNameFin ); -+ snprintf( Command, 200U, "cec %s %s", FileNameIni, FileNameFin ); - Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command ); - } - ---- src/opt/dau/dauMerge.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/opt/dau/dauMerge.c 2019-06-04 09:42:11.243444135 -0600 -@@ -661,7 +661,7 @@ printf( "%s\n", pDsd1 ); - nVarsShared = Dau_DsdMergeFindShared(pDsd0, pDsd1, pMatches0, pMatches1, pVarPres); - if ( nVarsShared == 0 ) - { -- sprintf( pRes, "(%s%s)", pDsd0, pDsd1 ); -+ snprintf( pRes, DAU_MAX_STR, "(%s%s)", pDsd0, pDsd1 ); - if ( fVerbose ) - printf( "Disjoint:\n" ); - if ( fVerbose ) +--- src/opt/dau/dauMerge.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/opt/dau/dauMerge.c 2019-12-18 09:48:48.630632559 -0700 @@ -715,7 +715,7 @@ Dau_DsdMergeStorePrintDefs( pS ); // create new function @@ -112,25 +83,14 @@ pTruth = Dau_DsdToTruth( pS->pOutput, nVarsTotal ); Status = Dau_DsdDecompose( pTruth, nVarsTotal, 0, 1, pS->pOutput ); //printf( "%d ", Status ); ---- src/proof/fra/fraCore.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/proof/fra/fraCore.c 2019-06-04 09:42:11.243444135 -0600 -@@ -156,7 +156,7 @@ int Fra_FraigMiterAssertedOutput( Aig_Ma - static inline void Fra_FraigNodeSpeculate( Fra_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pObjFraig, Aig_Obj_t * pObjReprFraig ) - { - static int Counter = 0; -- char FileName[20]; -+ char FileName[24]; - Aig_Man_t * pTemp; - Aig_Obj_t * pNode; - int i; ---- src/sat/bmc/bmcMaj.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/bmc/bmcMaj.c 2019-06-04 09:42:11.243444135 -0600 -@@ -585,7 +585,7 @@ void Exa_ManDumpBlif( Exa_Man_t * p, int - Extra_PrintHexadecimalString( Buffer, (unsigned *)p->pTruth, p->nVars ); - if ( fCompl ) - Abc_TtNot( p->pTruth, p->nWords ); -- sprintf( FileName, "%s_%d_%d.blif", Buffer, 2, p->nNodes ); -+ snprintf( FileName, 1000U, "%s_%d_%d.blif", Buffer, 2, p->nNodes ); - pFile = fopen( FileName, "wb" ); - fprintf( pFile, "# Realization of the %d-input function %s using %d two-input gates:\n", p->nVars, Buffer, p->nNodes ); - fprintf( pFile, ".model %s_%d_%d\n", Buffer, 2, p->nNodes ); +--- src/proof/fra/fraCore.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/proof/fra/fraCore.c 2019-12-18 09:50:22.838375767 -0700 +@@ -163,7 +163,7 @@ static inline void Fra_FraigNodeSpeculat + // create manager with the logic for these two nodes + pTemp = Aig_ManExtractMiter( p->pManFraig, pObjFraig, pObjReprFraig ); + // dump the logic into a file +- sprintf( FileName, "aig\\%03d.blif", ++Counter ); ++ snprintf( FileName, 20U, "aig\\%03d.blif", ++Counter ); + Aig_ManDumpBlif( pTemp, FileName, NULL, NULL ); + printf( "Speculation cone with %d nodes was written into file \"%s\".\n", Aig_ManNodeNum(pTemp), FileName ); + // clean up diff --git a/abc-giaDeep.patch b/abc-giaDeep.patch new file mode 100644 index 0000000..3dba0cc --- /dev/null +++ b/abc-giaDeep.patch @@ -0,0 +1,10 @@ +--- src/aig/gia/module.make.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/aig/gia/module.make 2019-12-18 09:15:32.619098847 -0700 +@@ -16,6 +16,7 @@ SRC += src/aig/gia/giaAig.c \ + src/aig/gia/giaCSat2.c \ + src/aig/gia/giaCTas.c \ + src/aig/gia/giaCut.c \ ++ src/aig/gia/giaDeep.c \ + src/aig/gia/giaDfs.c \ + src/aig/gia/giaDup.c \ + src/aig/gia/giaEdge.c \ diff --git a/abc.1 b/abc.1 index f21dbce..cb64b7f 100644 --- a/abc.1 +++ b/abc.1 @@ -28,6 +28,9 @@ Execute commands \fICMD\fP quietly. \fB\-C\fP \fICMD\fP Execute commands \fICMD\fP, then continue in interactive mode. .TP +\fB\-Q\fP \fICMD\fP +Execute commands \fICMD\fP quietly, then continue in interactive mode. +.TP \fB\-F\fP \fISCRIPT\fP Execute commands from script file \fISCRIPT\fP and echo commands. .TP diff --git a/abc.rpmlintrc b/abc.rpmlintrc new file mode 100644 index 0000000..735aa47 --- /dev/null +++ b/abc.rpmlintrc @@ -0,0 +1,5 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# There is no documentation to include +addFilter(r'^abc-(devel|libs)\.[^:]+: W: no-documentation') diff --git a/abc.spec b/abc.spec index ac1d1fd..09777f2 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 35280f30504ad16f1d0ab005905883bee883747c +%global gittag 02393a2a7af6b45766830f111923cb2f56f28dad %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20190608 +%global gitdate 20191217 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -20,7 +20,7 @@ Name: abc Version: 1.01 -Release: 23.git%{gitdate}%{?dist} +Release: 24.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -39,12 +39,14 @@ Patch2: %{name}-header.patch Patch3: %{name}-build.patch # Fix sprintf calls that can overflow their buffers Patch4: %{name}-format.patch +# Fix undefined symbols due to not compiling giaDeep.c +Patch5: %{name}-giaDeep.patch -BuildRequires: bzip2-devel BuildRequires: cmake BuildRequires: gcc-c++ -BuildRequires: readline-devel -BuildRequires: zlib-devel +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(readline) +BuildRequires: pkgconfig(zlib) Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -89,7 +91,7 @@ sed 's/@VERSION@/%{version} (%{gitdate})/' %{SOURCE1} > %{name}.1 touch -r %{SOURCE1} %{name}.1 %build -export CFLAGS="%{optflags} -DNDEBUG -I%{_includedir}/cudd" +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 @@ -130,6 +132,10 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Dec 18 2019 Jerry James - 1.01-24.git20191217 +- Update to latest git snapshot +- Add -giaDeep patch to fix build failure + * Wed Jul 24 2019 Fedora Release Engineering - 1.01-23.git20190608 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index f866bda..02405d2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-35280f3.tar.gz) = d18c6509ad0efa2c98cbd3aa5d22d3b302147bad34fa438100b603febded2df7ea16040c766ebc17b6ac35b84a41bf453907560885c26d5a47a76440b097c3fa +SHA512 (abc-02393a2.tar.gz) = 3bdd03f6d3bb0e0c3e43aff4ed67fc981935541bc8b334785390993e8b29f99ae930980f810e99a31263236e00d51750ee6d951ae17322615aea68c6074a6e07 From 183be959e38ae88609bfcd6c316cd6e2e5520fef Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 11:05:45 +0000 Subject: [PATCH 02/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 09777f2..f59b52f 100644 --- a/abc.spec +++ b/abc.spec @@ -20,7 +20,7 @@ Name: abc Version: 1.01 -Release: 24.git%{gitdate}%{?dist} +Release: 25.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -132,6 +132,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 1.01-25.git20191217 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Dec 18 2019 Jerry James - 1.01-24.git20191217 - Update to latest git snapshot - Add -giaDeep patch to fix build failure From 13f60c2eb9407b98e6f44d8ea4e77688b47f551a Mon Sep 17 00:00:00 2001 From: Gabriel Somlo Date: Wed, 29 Jan 2020 16:34:52 -0500 Subject: [PATCH 03/26] Update to latest git snapshot As of Jan. 11, 2020, yosys requires abc git snapshot 71f2b40 or newer. We can also drop the -giaDeep patch, which has been applied upstream. Signed-off-by: Gabriel Somlo --- abc-giaDeep.patch | 10 ---------- abc.spec | 11 ++++++----- 2 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 abc-giaDeep.patch diff --git a/abc-giaDeep.patch b/abc-giaDeep.patch deleted file mode 100644 index 3dba0cc..0000000 --- a/abc-giaDeep.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/aig/gia/module.make.orig 2019-12-17 15:57:46.000000000 -0700 -+++ src/aig/gia/module.make 2019-12-18 09:15:32.619098847 -0700 -@@ -16,6 +16,7 @@ SRC += src/aig/gia/giaAig.c \ - src/aig/gia/giaCSat2.c \ - src/aig/gia/giaCTas.c \ - src/aig/gia/giaCut.c \ -+ src/aig/gia/giaDeep.c \ - src/aig/gia/giaDfs.c \ - src/aig/gia/giaDup.c \ - src/aig/gia/giaEdge.c \ diff --git a/abc.spec b/abc.spec index f59b52f..83cdd80 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 02393a2a7af6b45766830f111923cb2f56f28dad +%global gittag 8eb6aed5d116afc0933b49c6973af08cf2eff471 %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20191217 +%global gitdate 20200127 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -20,7 +20,7 @@ Name: abc Version: 1.01 -Release: 25.git%{gitdate}%{?dist} +Release: 26.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -39,8 +39,6 @@ Patch2: %{name}-header.patch Patch3: %{name}-build.patch # Fix sprintf calls that can overflow their buffers Patch4: %{name}-format.patch -# Fix undefined symbols due to not compiling giaDeep.c -Patch5: %{name}-giaDeep.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -132,6 +130,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Mon Jan 27 2020 Gabriel Somlo - 1.01-25.git8eb6aed +- Update to latest git snapshot + * Tue Jan 28 2020 Fedora Release Engineering - 1.01-25.git20191217 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 4b954d244bf1ddbcff89adbff4daec643368d085 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 31 Jan 2020 09:38:30 -0700 Subject: [PATCH 04/26] Upload the new sources. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 02405d2..d90af9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-02393a2.tar.gz) = 3bdd03f6d3bb0e0c3e43aff4ed67fc981935541bc8b334785390993e8b29f99ae930980f810e99a31263236e00d51750ee6d951ae17322615aea68c6074a6e07 +SHA512 (abc-8eb6aed.tar.gz) = 9f137d0d107a7d202bcdc950ee7daefda7992bbeaf79cfc5fb23c5e7d0f0ef1b391ea6c9769d29fcf98d439400b075210565842172d44b1b3d0bc9923488f1ae From 56f6af592e765e281ecdf0a767ce62fcdb46b17b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 31 Jan 2020 09:39:29 -0700 Subject: [PATCH 05/26] Update changelog line to keep chronological order. --- abc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 83cdd80..1d1c44e 100644 --- a/abc.spec +++ b/abc.spec @@ -130,7 +130,7 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog -* Mon Jan 27 2020 Gabriel Somlo - 1.01-25.git8eb6aed +* Fri Jan 31 2020 Gabriel Somlo - 1.01-26.git8eb6aed - Update to latest git snapshot * Tue Jan 28 2020 Fedora Release Engineering - 1.01-25.git20191217 From eb86ff73c166dd9d09f4e8888f4da31ecd1ca7bb Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 31 Jan 2020 09:50:39 -0700 Subject: [PATCH 06/26] Update changelog again to match the spec file version. --- abc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 1d1c44e..0cc3d6f 100644 --- a/abc.spec +++ b/abc.spec @@ -130,7 +130,7 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog -* Fri Jan 31 2020 Gabriel Somlo - 1.01-26.git8eb6aed +* Fri Jan 31 2020 Gabriel Somlo - 1.01-26.git20200127 - Update to latest git snapshot * Tue Jan 28 2020 Fedora Release Engineering - 1.01-25.git20191217 From 6d18eb5c4e50fab579c94c5bfaee24217f7fa64c Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 31 Jan 2020 11:45:01 -0700 Subject: [PATCH 07/26] Update instructions for using abipkgdiff. --- abc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/abc.spec b/abc.spec index 0cc3d6f..1c2c82a 100644 --- a/abc.spec +++ b/abc.spec @@ -9,7 +9,9 @@ # old and new binary and debuginfo packages to detect abi changes that would # require bumping the shared library version, e.g., # abipkgdiff --d1 abc-libs-debuginfo-.rpm \ +# --d1 abc-debuginfo-.rpm \ # --d2 abc-libs-debuginfo-.rpm \ +# --d2 abc-debuginfo-.rpm \ # --devel1 abc-devel-.rpm \ # --devel2 abc-devel-.rpm \ # abc-libs-.rpm abc-libs-.rpm From f88cec85083f7fdfc82b20c4a4f7d6572e314940 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 11:38:44 +0000 Subject: [PATCH 08/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 1c2c82a..9a3f7c7 100644 --- a/abc.spec +++ b/abc.spec @@ -22,7 +22,7 @@ Name: abc Version: 1.01 -Release: 26.git%{gitdate}%{?dist} +Release: 27.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -132,6 +132,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 1.01-27.git20200127 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jan 31 2020 Gabriel Somlo - 1.01-26.git20200127 - Update to latest git snapshot From 147ead9a532d5554dc4798de76a3cfa27bdfec56 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 27 Jul 2020 10:58:23 -0600 Subject: [PATCH 09/26] Update to latest git snapshot. - Add -gia patch to fix crash. - Adapt to cmake changes in Rawhide. --- abc-gia.patch | 11 +++++++++++ abc.spec | 46 +++++++++++++++++++++++++++++++--------------- sources | 2 +- 3 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 abc-gia.patch 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 From 73525c910bd2282186e8ee7f160cf7d17cb5e8f7 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 9 Nov 2020 10:46:08 -0700 Subject: [PATCH 10/26] Explicitly BR make. --- abc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 61ead3f..16babf3 100644 --- a/abc.spec +++ b/abc.spec @@ -47,6 +47,7 @@ Patch5: %{name}-gia.patch BuildRequires: cmake BuildRequires: gcc-c++ +BuildRequires: make BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(readline) BuildRequires: pkgconfig(zlib) @@ -109,7 +110,7 @@ export ABC_USE_STDINT_H=1 # %%cmake_install does not install anything. Install by hand. # Install the binary -cd %{__cmake_builddir} +cd %{_vpath_builddir} mkdir -p %{buildroot}%{_bindir} install -p -m 0755 %{name} %{buildroot}%{_bindir} From 40787df0ebbba68503361fb6f59ab246223c0f38 Mon Sep 17 00:00:00 2001 From: Gabriel Somlo Date: Fri, 27 Nov 2020 07:35:15 -0500 Subject: [PATCH 11/26] update to latest snapshot; update header, bundlelib patches for new snapshot --- abc-bundlelib.patch | 11 +++++++++++ abc-header.patch | 10 ++++++++++ abc.spec | 9 ++++++--- sources | 2 +- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/abc-bundlelib.patch b/abc-bundlelib.patch index 64b0479..cfb044b 100644 --- a/abc-bundlelib.patch +++ b/abc-bundlelib.patch @@ -111,3 +111,14 @@ ABC_NAMESPACE_CXX_HEADER_START +--- src/sat/glucose2/ParseUtils.h.orig ++++ src/sat/glucose2/ParseUtils.h +@@ -25,7 +25,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR + #include + #include + +-#include "misc/zlib/zlib.h" ++#include + + ABC_NAMESPACE_CXX_HEADER_START + diff --git a/abc-header.patch b/abc-header.patch index 4a52250..aa5ce97 100644 --- a/abc-header.patch +++ b/abc-header.patch @@ -8,3 +8,13 @@ ABC_NAMESPACE_IMPL_START +--- src/sat/glucose2/Glucose2.cpp.orig ++++ src/sat/glucose2/Glucose2.cpp +@@ -34,6 +34,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR + #include "sat/glucose2/Solver.h" + + #include "sat/glucose2/CGlucose.h" ++#include "misc/util/abc_global.h" + + ABC_NAMESPACE_IMPL_START + diff --git a/abc.spec b/abc.spec index 16babf3..f2f6b1c 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 448f26344325cc78942d576740457036671b0976 +%global gittag d4fb192575cd319de68764eac5b7e049f575f43e %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20200720 +%global gitdate 20201126 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -22,7 +22,7 @@ Name: abc Version: 1.01 -Release: 27.git%{gitdate}%{?dist} +Release: 28.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -144,6 +144,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Thu Nov 26 2020 Gabriel Somlo - 1.01-28.git20201126 +- Update to latest git snapshot + * Mon Jul 27 2020 Jerry James - 1.01-27.git20200720 - Update to latest git snapshot - Add -gia patch to fix crash diff --git a/sources b/sources index 9f5e922..ea7e794 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-448f263.tar.gz) = bb8805d10031150d1f967da31f01c6ed314689efade008b97d16f984f08132f9672507bafd0bcb518f28f6a3ce332541f312229b7dcfdf6b247ca420540caf07 +SHA512 (abc-d4fb192.tar.gz) = be33bac2854172c01eee1ffe15cf9395fa8fd981efab3ca7ae64a72af3ab7272f8d8c06c63ae9a706691df6838bcfe859f056069f7c94bf030b9a5deeac1d977 From 0baefabaccd809e19c764a968f405db6c4b46b25 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 25 Jan 2021 23:42:43 +0000 Subject: [PATCH 12/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index f2f6b1c..d0d44ec 100644 --- a/abc.spec +++ b/abc.spec @@ -22,7 +22,7 @@ Name: abc Version: 1.01 -Release: 28.git%{gitdate}%{?dist} +Release: 29.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -144,6 +144,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Mon Jan 25 2021 Fedora Release Engineering - 1.01-29.git20201126 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Nov 26 2020 Gabriel Somlo - 1.01-28.git20201126 - Update to latest git snapshot From c3b63ec8c9e46ffa7d34e46d63abfb99e55458cf Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 1 Apr 2021 09:05:43 -0600 Subject: [PATCH 13/26] Update to latest git snapshot. - Add patches: -strict-aliasing, -overflow. - Avoid bogus rpaths. --- abc-format.patch | 158 ++++++++++++++++++++++++++++++++++---- abc-overflow.patch | 11 +++ abc-strict-aliasing.patch | 17 ++++ abc.spec | 20 ++++- sources | 2 +- 5 files changed, 189 insertions(+), 19 deletions(-) create mode 100644 abc-overflow.patch create mode 100644 abc-strict-aliasing.patch diff --git a/abc-format.patch b/abc-format.patch index 8ba0e49..5e8dc15 100644 --- a/abc-format.patch +++ b/abc-format.patch @@ -1,5 +1,5 @@ ---- src/aig/miniaig/ndr.h.orig 2019-12-17 15:57:46.000000000 -0700 -+++ src/aig/miniaig/ndr.h 2019-12-18 09:47:14.076891270 -0700 +--- src/aig/miniaig/ndr.h.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/aig/miniaig/ndr.h 2021-03-31 09:29:26.418031142 -0600 @@ -496,8 +496,16 @@ static inline void Ndr_WriteVerilog( cha { Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int Mod; @@ -19,8 +19,51 @@ Ndr_DesForEachMod( p, Mod ) Ndr_WriteVerilogModule( pFile, p, Mod, pNames ); ---- src/base/abci/abcMiter.c.orig 2019-12-17 15:57:46.000000000 -0700 -+++ src/base/abci/abcMiter.c 2019-12-18 09:44:30.567338848 -0700 +--- src/aig/saig/saigIoa.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/aig/saig/saigIoa.c 2021-03-31 09:36:36.926608970 -0600 +@@ -47,15 +47,15 @@ char * Saig_ObjName( Aig_Man_t * p, Aig_ + { + static char Buffer[16]; + if ( Aig_ObjIsNode(pObj) || Aig_ObjIsConst1(pObj) ) +- sprintf( Buffer, "n%0*d", Abc_Base10Log(Aig_ManObjNumMax(p)), Aig_ObjId(pObj) ); ++ snprintf( Buffer, 16, "n%0*d", Abc_Base10Log(Aig_ManObjNumMax(p)), Aig_ObjId(pObj) ); + else if ( Saig_ObjIsPi(p, pObj) ) +- sprintf( Buffer, "pi%0*d", Abc_Base10Log(Saig_ManPiNum(p)), Aig_ObjCioId(pObj) ); ++ snprintf( Buffer, 16, "pi%0*d", Abc_Base10Log(Saig_ManPiNum(p)), Aig_ObjCioId(pObj) ); + else if ( Saig_ObjIsPo(p, pObj) ) +- sprintf( Buffer, "po%0*d", Abc_Base10Log(Saig_ManPoNum(p)), Aig_ObjCioId(pObj) ); ++ snprintf( Buffer, 16, "po%0*d", Abc_Base10Log(Saig_ManPoNum(p)), Aig_ObjCioId(pObj) ); + else if ( Saig_ObjIsLo(p, pObj) ) +- sprintf( Buffer, "lo%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPiNum(p) ); ++ snprintf( Buffer, 16, "lo%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPiNum(p) ); + else if ( Saig_ObjIsLi(p, pObj) ) +- sprintf( Buffer, "li%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPoNum(p) ); ++ snprintf( Buffer, 16, "li%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPoNum(p) ); + else + assert( 0 ); + return Buffer; +--- src/base/abci/abc.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/base/abci/abc.c 2021-03-31 09:33:02.855819044 -0600 +@@ -30623,7 +30623,7 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pA + else + { + assert( i >= Abc_NtkPoNum(pNtk) ); +- sprintf( pSuffix, "_li%0*d", nDigits, i-Abc_NtkPoNum(pNtk) ); ++ snprintf( pSuffix, 100, "_li%0*d", nDigits, i-Abc_NtkPoNum(pNtk) ); + Abc_ObjAssignName( pObj, (char *)Vec_PtrEntry(pAbc->pGia->vNamesOut, i), pSuffix ); + } + } +@@ -42868,7 +42868,7 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * p + Gia_ManForEachPo( pAbc->pGia, pObj, i ) + { + Gia_Man_t * pOne = Gia_ManDupDfsCone( pAbc->pGia, pObj ); +- sprintf( Buffer, "%s_%0*d.aig", Extra_FileNameGeneric(pAbc->pGia->pSpec), nDigits, i ); ++ snprintf( Buffer, 1000, "%s_%0*d.aig", Extra_FileNameGeneric(pAbc->pGia->pSpec), nDigits, i ); + Gia_AigerWrite( pOne, Buffer, 0, 0, 0 ); + Gia_ManStop( pOne ); + } +--- src/base/abci/abcMiter.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/base/abci/abcMiter.c 2021-03-31 09:29:26.419031141 -0600 @@ -863,7 +863,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFr { int fVerbose = 0; @@ -30,8 +73,8 @@ Abc_Obj_t * pNode, * pLatch; int i; // create the prefix to be added to the node names ---- src/base/io/ioReadBlifMv.c.orig 2019-12-18 09:43:13.388550105 -0700 -+++ src/base/io/ioReadBlifMv.c 2019-12-18 09:43:30.483503314 -0700 +--- src/base/io/ioReadBlifMv.c.orig 2021-03-31 09:51:35.257716654 -0600 ++++ src/base/io/ioReadBlifMv.c 2021-03-31 09:51:55.691695924 -0600 @@ -1626,7 +1626,7 @@ static int Io_MvParseLineMv( Io_MvMod_t ***********************************************************************/ static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc ) @@ -50,8 +93,28 @@ Io_MvVar_t * pVar; Abc_Obj_t * pFanin, * pNet; char * pCur, * pNext; ---- src/base/wlc/wlcNdr.c.orig 2019-12-17 15:57:46.000000000 -0700 -+++ src/base/wlc/wlcNdr.c 2019-12-18 08:43:25.865457806 -0700 +--- src/base/io/ioReadPla.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/base/io/ioReadPla.c 2021-03-31 09:32:18.454862614 -0600 +@@ -448,7 +448,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_Fil + nDigits = Abc_Base10Log( nInputs ); + for ( i = 0; i < nInputs; i++ ) + { +- sprintf( Buffer, "x%0*d", nDigits, i ); ++ snprintf( Buffer, 100, "x%0*d", nDigits, i ); + Io_ReadCreatePi( pNtk, Buffer ); + } + } +@@ -465,7 +465,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_Fil + nDigits = Abc_Base10Log( nOutputs ); + for ( i = 0; i < nOutputs; i++ ) + { +- sprintf( Buffer, "z%0*d", nDigits, i ); ++ snprintf( Buffer, 100, "z%0*d", nDigits, i ); + Io_ReadCreatePo( pNtk, Buffer ); + } + } +--- src/base/wlc/wlcNdr.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/base/wlc/wlcNdr.c 2021-03-31 09:29:26.420031140 -0600 @@ -487,7 +487,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); for ( i = 1; i <= NameIdMax; i++ ) @@ -61,8 +124,53 @@ NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); assert( !fFound && i == NameId ); } ---- src/base/wln/wlnNdr.c.orig 2019-12-17 15:57:46.000000000 -0700 -+++ src/base/wln/wlnNdr.c 2019-12-18 08:43:25.866457804 -0700 +--- src/base/wlc/wlcNtk.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/base/wlc/wlcNtk.c 2021-03-31 09:34:20.110743240 -0600 +@@ -1300,7 +1300,7 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) + { + if ( Wlc_ObjIsPo(pObj) ) + continue; +- sprintf( pBuffer, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) ); ++ snprintf( pBuffer, 100, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) ); + NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); + Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); + } +@@ -1308,21 +1308,21 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) + { + if ( Wlc_ObjIsPi(pObj) ) + continue; +- sprintf( pBuffer, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) ); ++ snprintf( pBuffer, 100, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) ); + NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); + Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); + } + nDigits = Abc_Base10Log( Wlc_NtkPoNum(p) ); + Wlc_NtkForEachPo( p, pObj, i ) + { +- sprintf( pBuffer, "%s%0*d", "po", nDigits, i ); ++ snprintf( pBuffer, 100, "%s%0*d", "po", nDigits, i ); + NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); + Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); + } + nDigits = Abc_Base10Log( Wlc_NtkPiNum(p) ); + Wlc_NtkForEachPi( p, pObj, i ) + { +- sprintf( pBuffer, "%s%0*d", "pi", nDigits, i ); ++ snprintf( pBuffer, 100, "%s%0*d", "pi", nDigits, i ); + NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); + Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); + } +@@ -1331,7 +1331,7 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) + { + if ( Wlc_ObjIsCi(pObj) || Wlc_ObjIsCo(pObj) ) + continue; +- sprintf( pBuffer, "%s%0*d", "n", nDigits, i ); ++ snprintf( pBuffer, 100, "%s%0*d", "n", nDigits, i ); + NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); + Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); + } +--- src/base/wln/wlnNdr.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/base/wln/wlnNdr.c 2021-03-31 09:29:26.420031140 -0600 @@ -256,7 +256,7 @@ Wln_Ntk_t * Wln_NtkFromNdr( void * pData pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); for ( i = 1; i <= NameIdMax; i++ ) @@ -72,8 +180,30 @@ NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); assert( !fFound && i == NameId ); } ---- src/opt/dau/dauMerge.c.orig 2019-12-17 15:57:46.000000000 -0700 -+++ src/opt/dau/dauMerge.c 2019-12-18 09:48:48.630632559 -0700 +--- src/map/mio/mioUtils.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/map/mio/mioUtils.c 2021-03-31 09:34:48.486715391 -0600 +@@ -1711,7 +1711,7 @@ void Mio_LibraryShortNames( Mio_Library_ + Mio_LibraryForEachGate( pLib, pGate ) + { + ABC_FREE( pGate->pName ); +- sprintf( Buffer, "g%0*d", nDigits, ++c ); ++ snprintf( Buffer, 10000, "g%0*d", nDigits, ++c ); + pGate->pName = Abc_UtilStrsav( Buffer ); + // update formula + Mio_LibraryShortFormula( pGate, pGate->pForm, Buffer ); +--- src/map/scl/sclLibUtil.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/map/scl/sclLibUtil.c 2021-03-31 09:35:12.574691754 -0600 +@@ -203,7 +203,7 @@ void Abc_SclShortNames( SC_Lib * p ) + SC_RingForEachCell( pClass, pCell, k ) + { + ABC_FREE( pCell->pName ); +- sprintf( Buffer, "g%0*d_%0*d", nDigits, i, nDigits2, k ); ++ snprintf( Buffer, 10000, "g%0*d_%0*d", nDigits, i, nDigits2, k ); + pCell->pName = Abc_UtilStrsav( Buffer ); + // formula + SC_CellForEachPinOut( pCell, pPin, n ) +--- src/opt/dau/dauMerge.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/opt/dau/dauMerge.c 2021-03-31 09:29:26.421031139 -0600 @@ -715,7 +715,7 @@ Dau_DsdMergeStorePrintDefs( pS ); // create new function @@ -83,8 +213,8 @@ pTruth = Dau_DsdToTruth( pS->pOutput, nVarsTotal ); Status = Dau_DsdDecompose( pTruth, nVarsTotal, 0, 1, pS->pOutput ); //printf( "%d ", Status ); ---- src/proof/fra/fraCore.c.orig 2019-12-17 15:57:46.000000000 -0700 -+++ src/proof/fra/fraCore.c 2019-12-18 09:50:22.838375767 -0700 +--- src/proof/fra/fraCore.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/proof/fra/fraCore.c 2021-03-31 09:29:26.421031139 -0600 @@ -163,7 +163,7 @@ static inline void Fra_FraigNodeSpeculat // create manager with the logic for these two nodes pTemp = Aig_ManExtractMiter( p->pManFraig, pObjFraig, pObjReprFraig ); diff --git a/abc-overflow.patch b/abc-overflow.patch new file mode 100644 index 0000000..96a1d6f --- /dev/null +++ b/abc-overflow.patch @@ -0,0 +1,11 @@ +--- src/map/if/ifDsd.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/map/if/ifDsd.c 2021-03-31 09:50:14.911798180 -0600 +@@ -91,7 +91,7 @@ struct If_DsdMan_t_ + Vec_Mem_t * vTtMem[IF_MAX_FUNC_LUTSIZE+1]; // truth table memory and hash table + Vec_Ptr_t * vTtDecs[IF_MAX_FUNC_LUTSIZE+1]; // truth table decompositions + Vec_Wec_t * vIsops[IF_MAX_FUNC_LUTSIZE+1]; // ISOP for each function +- int * pSched[IF_MAX_FUNC_LUTSIZE]; // grey code schedules ++ int * pSched[IF_MAX_FUNC_LUTSIZE+1]; // grey code schedules + int nTtBits; // the number of truth table bits + int nConfigWords; // the number of words for config data per node + Vec_Wrd_t * vConfigs; // permutations diff --git a/abc-strict-aliasing.patch b/abc-strict-aliasing.patch new file mode 100644 index 0000000..ad2673b --- /dev/null +++ b/abc-strict-aliasing.patch @@ -0,0 +1,17 @@ +--- src/aig/gia/giaUtil.c.orig 2021-03-28 19:40:27.000000000 -0600 ++++ src/aig/gia/giaUtil.c 2021-03-31 09:24:59.453286422 -0600 +@@ -2109,11 +2109,13 @@ void Gia_AigerWriteLut( Gia_Man_t * p, c + Gia_ManForEachObj( p, pObj, i ) + if ( i && Gia_ObjIsLut(p, i) ) + { ++ word truth; + pLuts[iLut].Type = 3; + Gia_LutForEachFanin( p, i, iFan, k ) + pLuts[iLut].pFans[k] = Gia_ManObj(p, iFan)->Value; + pLuts[iLut].nFans = k; +- *(word *)pLuts[iLut].pTruth = Gia_LutComputeTruth6(p, i, vTruths); ++ truth = Gia_LutComputeTruth6(p, i, vTruths); ++ memcpy( pLuts[iLut].pTruth, &truth, sizeof(word) ); + pObj->Value = pLuts[iLut].Out = Abc_Var2Lit( iLut, 0 ); + iLut++; + } diff --git a/abc.spec b/abc.spec index d0d44ec..45cc8c1 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 d4fb192575cd319de68764eac5b7e049f575f43e +%global gittag 9145a5c20d5fe85523364d7fe2727b8d83c90aaa %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20201126 +%global gitdate 20210328 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -22,7 +22,7 @@ Name: abc Version: 1.01 -Release: 29.git%{gitdate}%{?dist} +Release: 30.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -44,6 +44,10 @@ 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 +# Fix some code that violates strict aliasing rules +Patch6: %{name}-strict-aliasing.patch +# Prevent a possible buffer overflow +Patch7: %{name}-overflow.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -100,10 +104,13 @@ sed -i 's/ -O//' Makefile %build export CFLAGS="%{optflags} -DNDEBUG" +%ifarch s390x +CFLAGS="$CFLAGS -DEPD_BIG_ENDIAN" +%endif export CXXFLAGS="$CFLAGS" export ABC_MAKE_VERBOSE=1 export ABC_USE_STDINT_H=1 -%cmake +%cmake -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES %cmake_build %install @@ -144,6 +151,11 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Mar 31 2021 Jerry James - 1.01-30.git20210328 +- Update to latest git snapshot +- Add patches: -strict-aliasing, -overflow +- Avoid bogus rpaths + * Mon Jan 25 2021 Fedora Release Engineering - 1.01-29.git20201126 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index ea7e794..5176329 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-d4fb192.tar.gz) = be33bac2854172c01eee1ffe15cf9395fa8fd981efab3ca7ae64a72af3ab7272f8d8c06c63ae9a706691df6838bcfe859f056069f7c94bf030b9a5deeac1d977 +SHA512 (abc-9145a5c.tar.gz) = 9390afee0dadee8947114e0927a77a43d6d0e8dca2eb2d15390079db39ff32ca6685c20d60e7cb60f5e695f683a3ccb7e6420dc1e6755aa4deb7f2a1272570e5 From af4fe5b2e1eb0b0786cf753b2ad9622f2214d836 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 12:14:33 +0000 Subject: [PATCH 14/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From f090b9fb747ae9c9ff2f2a1d03fcc649452910ae Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 17:09:37 +0000 Subject: [PATCH 15/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 45cc8c1..746b09e 100644 --- a/abc.spec +++ b/abc.spec @@ -22,7 +22,7 @@ Name: abc Version: 1.01 -Release: 30.git%{gitdate}%{?dist} +Release: 31.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -151,6 +151,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 1.01-31.git20210328 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Mar 31 2021 Jerry James - 1.01-30.git20210328 - Update to latest git snapshot - Add patches: -strict-aliasing, -overflow From 55247e191ce265e7d4bf28a18de376b4edc64b8f Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 17 Jan 2022 09:01:35 -0700 Subject: [PATCH 16/26] Update to latest git snapshot. Drop upstreamed -strict-aliasing patch. --- README.md | 14 +++++ abc-format.patch | 105 ++++++++------------------------------ abc-strict-aliasing.patch | 17 ------ abc.rpmlintrc | 5 -- abc.spec | 18 ++++--- sources | 2 +- 6 files changed, 46 insertions(+), 115 deletions(-) create mode 100644 README.md delete mode 100644 abc-strict-aliasing.patch delete mode 100644 abc.rpmlintrc diff --git a/README.md b/README.md new file mode 100644 index 0000000..5de4bf3 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# abc + +[ABC](https://people.eecs.berkeley.edu/~alanmi/abc/abc.htm) is a growing +software system for synthesis and verification of binary sequential logic +circuits appearing in synchronous hardware designs. ABC combines scalable +logic optimization based on And-Inverter Graphs (AIGs), optimal-delay +DAG-based technology mapping for look-up tables and standard cells, and +innovative algorithms for sequential synthesis and verification. + +ABC provides an experimental implementation of these algorithms and a +programming environment for building similar applications. Future development will +focus on improving the algorithms and making most of the packages stand-alone. +This will allow the user to customize ABC for their needs as if it were a toolbox +rather than a complete tool. diff --git a/abc-format.patch b/abc-format.patch index 5e8dc15..2db66ba 100644 --- a/abc-format.patch +++ b/abc-format.patch @@ -1,26 +1,5 @@ ---- src/aig/miniaig/ndr.h.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/aig/miniaig/ndr.h 2021-03-31 09:29:26.418031142 -0600 -@@ -496,8 +496,16 @@ static inline void Ndr_WriteVerilog( cha - { - Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int Mod; - -- FILE * pFile = pFileName ? fopen( pFileName, "wb" ) : stdout; -- if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } -+ FILE * pFile; -+ if (pFileName) -+ { -+ pFile = fopen( pFileName, "wb" ); -+ if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } -+ } -+ else -+ { -+ pFile = stdout; -+ } - - Ndr_DesForEachMod( p, Mod ) - Ndr_WriteVerilogModule( pFile, p, Mod, pNames ); ---- src/aig/saig/saigIoa.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/aig/saig/saigIoa.c 2021-03-31 09:36:36.926608970 -0600 +--- src/aig/saig/saigIoa.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/aig/saig/saigIoa.c 2022-01-17 08:22:16.506371575 -0700 @@ -47,15 +47,15 @@ char * Saig_ObjName( Aig_Man_t * p, Aig_ { static char Buffer[16]; @@ -42,9 +21,9 @@ else assert( 0 ); return Buffer; ---- src/base/abci/abc.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/base/abci/abc.c 2021-03-31 09:33:02.855819044 -0600 -@@ -30623,7 +30623,7 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pA +--- src/base/abci/abc.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/base/abci/abc.c 2022-01-17 08:22:16.510371570 -0700 +@@ -30577,7 +30577,7 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pA else { assert( i >= Abc_NtkPoNum(pNtk) ); @@ -53,7 +32,7 @@ Abc_ObjAssignName( pObj, (char *)Vec_PtrEntry(pAbc->pGia->vNamesOut, i), pSuffix ); } } -@@ -42868,7 +42868,7 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * p +@@ -43889,7 +43889,7 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * p Gia_ManForEachPo( pAbc->pGia, pObj, i ) { Gia_Man_t * pOne = Gia_ManDupDfsCone( pAbc->pGia, pObj ); @@ -62,20 +41,9 @@ Gia_AigerWrite( pOne, Buffer, 0, 0, 0 ); Gia_ManStop( pOne ); } ---- src/base/abci/abcMiter.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/base/abci/abcMiter.c 2021-03-31 09:29:26.419031141 -0600 -@@ -863,7 +863,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFr - { - int fVerbose = 0; - int NodeBef = Abc_NtkNodeNum(pNtkFrames); -- char Buffer[10]; -+ char Buffer[12]; - Abc_Obj_t * pNode, * pLatch; - int i; - // create the prefix to be added to the node names ---- src/base/io/ioReadBlifMv.c.orig 2021-03-31 09:51:35.257716654 -0600 -+++ src/base/io/ioReadBlifMv.c 2021-03-31 09:51:55.691695924 -0600 -@@ -1626,7 +1626,7 @@ static int Io_MvParseLineMv( Io_MvMod_t +--- src/base/io/ioReadBlifMv.c.orig 2022-01-17 08:21:48.617409341 -0700 ++++ src/base/io/ioReadBlifMv.c 2022-01-17 08:22:16.511371568 -0700 +@@ -1627,7 +1627,7 @@ static int Io_MvParseLineMv( Io_MvMod_t ***********************************************************************/ static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc ) { @@ -84,17 +52,8 @@ Abc_Obj_t * pFanin; int i; // add the fanin number of values -@@ -1656,7 +1656,7 @@ static int Io_MvWriteValues( Abc_Obj_t * - ***********************************************************************/ - static int Io_MvParseLiteralMv( Io_MvMod_t * p, Abc_Obj_t * pNode, char * pToken, Vec_Str_t * vFunc, int iLit ) - { -- char Buffer[10]; -+ char Buffer[12]; - Io_MvVar_t * pVar; - Abc_Obj_t * pFanin, * pNet; - char * pCur, * pNext; ---- src/base/io/ioReadPla.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/base/io/ioReadPla.c 2021-03-31 09:32:18.454862614 -0600 +--- src/base/io/ioReadPla.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/base/io/ioReadPla.c 2022-01-17 08:22:16.511371568 -0700 @@ -448,7 +448,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_Fil nDigits = Abc_Base10Log( nInputs ); for ( i = 0; i < nInputs; i++ ) @@ -113,19 +72,8 @@ Io_ReadCreatePo( pNtk, Buffer ); } } ---- src/base/wlc/wlcNdr.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/base/wlc/wlcNdr.c 2021-03-31 09:29:26.420031140 -0600 -@@ -487,7 +487,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData - pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); - for ( i = 1; i <= NameIdMax; i++ ) - { -- char pName[20]; sprintf( pName, "s%0*d", nDigits, i ); -+ char pName[20]; snprintf( pName, 20U, "s%0*d", nDigits, i ); - NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); - assert( !fFound && i == NameId ); - } ---- src/base/wlc/wlcNtk.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/base/wlc/wlcNtk.c 2021-03-31 09:34:20.110743240 -0600 +--- src/base/wlc/wlcNtk.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/base/wlc/wlcNtk.c 2022-01-17 08:22:16.512371567 -0700 @@ -1300,7 +1300,7 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) { if ( Wlc_ObjIsPo(pObj) ) @@ -169,19 +117,8 @@ NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); } ---- src/base/wln/wlnNdr.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/base/wln/wlnNdr.c 2021-03-31 09:29:26.420031140 -0600 -@@ -256,7 +256,7 @@ Wln_Ntk_t * Wln_NtkFromNdr( void * pData - pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); - for ( i = 1; i <= NameIdMax; i++ ) - { -- char pName[20]; sprintf( pName, "s%0*d", nDigits, i ); -+ char pName[20]; snprintf( pName, 20U, "s%0*d", nDigits, i ); - NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); - assert( !fFound && i == NameId ); - } ---- src/map/mio/mioUtils.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/map/mio/mioUtils.c 2021-03-31 09:34:48.486715391 -0600 +--- src/map/mio/mioUtils.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/map/mio/mioUtils.c 2022-01-17 08:22:16.513371566 -0700 @@ -1711,7 +1711,7 @@ void Mio_LibraryShortNames( Mio_Library_ Mio_LibraryForEachGate( pLib, pGate ) { @@ -191,8 +128,8 @@ pGate->pName = Abc_UtilStrsav( Buffer ); // update formula Mio_LibraryShortFormula( pGate, pGate->pForm, Buffer ); ---- src/map/scl/sclLibUtil.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/map/scl/sclLibUtil.c 2021-03-31 09:35:12.574691754 -0600 +--- src/map/scl/sclLibUtil.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/map/scl/sclLibUtil.c 2022-01-17 08:22:16.513371566 -0700 @@ -203,7 +203,7 @@ void Abc_SclShortNames( SC_Lib * p ) SC_RingForEachCell( pClass, pCell, k ) { @@ -202,8 +139,8 @@ pCell->pName = Abc_UtilStrsav( Buffer ); // formula SC_CellForEachPinOut( pCell, pPin, n ) ---- src/opt/dau/dauMerge.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/opt/dau/dauMerge.c 2021-03-31 09:29:26.421031139 -0600 +--- src/opt/dau/dauMerge.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/opt/dau/dauMerge.c 2022-01-17 08:22:16.513371566 -0700 @@ -715,7 +715,7 @@ Dau_DsdMergeStorePrintDefs( pS ); // create new function @@ -213,8 +150,8 @@ pTruth = Dau_DsdToTruth( pS->pOutput, nVarsTotal ); Status = Dau_DsdDecompose( pTruth, nVarsTotal, 0, 1, pS->pOutput ); //printf( "%d ", Status ); ---- src/proof/fra/fraCore.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/proof/fra/fraCore.c 2021-03-31 09:29:26.421031139 -0600 +--- src/proof/fra/fraCore.c.orig 2021-12-29 14:08:32.000000000 -0700 ++++ src/proof/fra/fraCore.c 2022-01-17 08:22:16.513371566 -0700 @@ -163,7 +163,7 @@ static inline void Fra_FraigNodeSpeculat // create manager with the logic for these two nodes pTemp = Aig_ManExtractMiter( p->pManFraig, pObjFraig, pObjReprFraig ); diff --git a/abc-strict-aliasing.patch b/abc-strict-aliasing.patch deleted file mode 100644 index ad2673b..0000000 --- a/abc-strict-aliasing.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- src/aig/gia/giaUtil.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/aig/gia/giaUtil.c 2021-03-31 09:24:59.453286422 -0600 -@@ -2109,11 +2109,13 @@ void Gia_AigerWriteLut( Gia_Man_t * p, c - Gia_ManForEachObj( p, pObj, i ) - if ( i && Gia_ObjIsLut(p, i) ) - { -+ word truth; - pLuts[iLut].Type = 3; - Gia_LutForEachFanin( p, i, iFan, k ) - pLuts[iLut].pFans[k] = Gia_ManObj(p, iFan)->Value; - pLuts[iLut].nFans = k; -- *(word *)pLuts[iLut].pTruth = Gia_LutComputeTruth6(p, i, vTruths); -+ truth = Gia_LutComputeTruth6(p, i, vTruths); -+ memcpy( pLuts[iLut].pTruth, &truth, sizeof(word) ); - pObj->Value = pLuts[iLut].Out = Abc_Var2Lit( iLut, 0 ); - iLut++; - } diff --git a/abc.rpmlintrc b/abc.rpmlintrc deleted file mode 100644 index 735aa47..0000000 --- a/abc.rpmlintrc +++ /dev/null @@ -1,5 +0,0 @@ -# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON -# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors - -# There is no documentation to include -addFilter(r'^abc-(devel|libs)\.[^:]+: W: no-documentation') diff --git a/abc.spec b/abc.spec index 746b09e..26c4d00 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 9145a5c20d5fe85523364d7fe2727b8d83c90aaa +%global gittag 48498af8189ef321ee876065d8947875cf711294 %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20210328 +%global gitdate 20211229 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -22,11 +22,11 @@ Name: abc Version: 1.01 -Release: 31.git%{gitdate}%{?dist} +Release: 32.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT -URL: http://www.eecs.berkeley.edu/~alanmi/abc/abc.htm +URL: https://people.eecs.berkeley.edu/~alanmi/abc/abc.htm Source0: https://github.com/%{owner}/%{name}/archive/%{gittag}/%{name}-%{shorttag}.tar.gz # Man page created by Jerry James using upstream text; hence, it is covered by # the same copyright and license as the code. @@ -44,10 +44,8 @@ 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 -# Fix some code that violates strict aliasing rules -Patch6: %{name}-strict-aliasing.patch # Prevent a possible buffer overflow -Patch7: %{name}-overflow.patch +Patch6: %{name}-overflow.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -103,7 +101,7 @@ touch -r %{SOURCE1} %{name}.1 sed -i 's/ -O//' Makefile %build -export CFLAGS="%{optflags} -DNDEBUG" +export CFLAGS="%{build_cflags} -DNDEBUG" %ifarch s390x CFLAGS="$CFLAGS -DEPD_BIG_ENDIAN" %endif @@ -151,6 +149,10 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Mon Jan 17 2022 Jerry James - 1.01-32.git20211229 +- Update to latest git snapshot +- Drop upstreamed -strict-aliasing patch + * Wed Jul 21 2021 Fedora Release Engineering - 1.01-31.git20210328 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 5176329..462ab38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-9145a5c.tar.gz) = 9390afee0dadee8947114e0927a77a43d6d0e8dca2eb2d15390079db39ff32ca6685c20d60e7cb60f5e695f683a3ccb7e6420dc1e6755aa4deb7f2a1272570e5 +SHA512 (abc-48498af.tar.gz) = 97e143e981b2503854b9d5de6a7292060bcb36f374879a58909a7f385a371647a8b46f4a400f54f72be83499bef5d63fb173ae57387e83d103766da8e2362af5 From b74fe3b954b8ce7bc54fc87f293316a2c52afa66 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 20:49:24 +0000 Subject: [PATCH 17/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 26c4d00..7e3b718 100644 --- a/abc.spec +++ b/abc.spec @@ -22,7 +22,7 @@ Name: abc Version: 1.01 -Release: 32.git%{gitdate}%{?dist} +Release: 33.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -149,6 +149,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 1.01-33.git20211229 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Jan 17 2022 Jerry James - 1.01-32.git20211229 - Update to latest git snapshot - Drop upstreamed -strict-aliasing patch From 63afdfd13767d63000c8bee0f873e826ceed1795 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 20:20:06 +0000 Subject: [PATCH 18/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 7e3b718..4107528 100644 --- a/abc.spec +++ b/abc.spec @@ -22,7 +22,7 @@ Name: abc Version: 1.01 -Release: 33.git%{gitdate}%{?dist} +Release: 34.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -149,6 +149,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 1.01-34.git20211229 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jan 19 2022 Fedora Release Engineering - 1.01-33.git20211229 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From c41443bda367e14b1abef9601b0486e087a46171 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 1 Aug 2022 15:33:30 -0600 Subject: [PATCH 19/26] Update to latest git snapshot. --- abc.spec | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/abc.spec b/abc.spec index 4107528..001dfa2 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 48498af8189ef321ee876065d8947875cf711294 +%global gittag a9237f50ea01efdd62f86d334a38ffbe80a3d141 %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20211229 +%global gitdate 20220731 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -22,10 +22,15 @@ Name: abc Version: 1.01 -Release: 34.git%{gitdate}%{?dist} +Release: 35.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification -License: MIT +# The ABC code itself is MIT-Modern-Variant. +# The bundled CUDD code is BSD-3-Clause. +# The bundled glucose code is MIT. +# The bundled minisat code is MIT. +# The bundled satoko code is BSD-2-Clause +License: MIT-Modern-Variant AND MIT AND BSD-2-Clause AND BSD-3-Clause URL: https://people.eecs.berkeley.edu/~alanmi/abc/abc.htm Source0: https://github.com/%{owner}/%{name}/archive/%{gittag}/%{name}-%{shorttag}.tar.gz # Man page created by Jerry James using upstream text; hence, it is covered by @@ -76,6 +81,12 @@ Summary: Library for sequential synthesis and verification # 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 +# ABC includes a bundled and modified version of glucose (which version?) +Provides: bundled(glucose) +# ABC includes a bundled and modified version of minisat (which version?). +Provides: bundled(minisat2) +# ABC includes a bundled and modified version of satoko (which version?). +Provides: bundled(satoko) %description libs This package contains the core functionality of ABC as a shared library. @@ -90,7 +101,7 @@ Headers and libraries for developing applications that use ABC. %prep %autosetup -p0 -n %{name}-%{gittag} -# Do not use the bundled libraries +# Do not use the bundled bzip2, zlib, or Windows libraries rm -fr lib src/misc/{bzlib,zlib} # Set the version number in the man page @@ -149,6 +160,10 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Mon Aug 1 2022 Jerry James - 1.01-35.git20220731 +- Update to latest git snapshot +- Convert License field to SPDX + * Wed Jul 20 2022 Fedora Release Engineering - 1.01-34.git20211229 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 788a145c2e373b8b755dae4ee9d711eaa57ff417 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 1 Aug 2022 15:46:54 -0600 Subject: [PATCH 20/26] Actually upload the new file. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 462ab38..b9139dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-48498af.tar.gz) = 97e143e981b2503854b9d5de6a7292060bcb36f374879a58909a7f385a371647a8b46f4a400f54f72be83499bef5d63fb173ae57387e83d103766da8e2362af5 +SHA512 (abc-a9237f5.tar.gz) = bfad8fdd23fe869df6cf86dc3a1a4e9058a23487a6237043e3466f728b2830010e842ad3d3811352371f3dfbe1cd4c7d32999a8507aeae7d758f2ff52e2397b2 From 0eca8cf4f27da24250048a132850cf74ecc295e8 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 17 Jan 2023 14:09:20 -0700 Subject: [PATCH 21/26] Update to latest git snapshot. - Add -use-after-free, -null-fprintf, and -weaken-assert patches. - Minor spec file cleanups. --- abc-null-fprintf.patch | 11 +++++++++++ abc-use-after-free.patch | 23 +++++++++++++++++++++++ abc-weaken-assert.patch | 11 +++++++++++ abc.spec | 36 +++++++++++++++++++++++++----------- sources | 2 +- 5 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 abc-null-fprintf.patch create mode 100644 abc-use-after-free.patch create mode 100644 abc-weaken-assert.patch diff --git a/abc-null-fprintf.patch b/abc-null-fprintf.patch new file mode 100644 index 0000000..1bfd75d --- /dev/null +++ b/abc-null-fprintf.patch @@ -0,0 +1,11 @@ +--- src/base/exor/exorUtil.c.orig 2022-10-19 06:05:56.000000000 -0600 ++++ src/base/exor/exorUtil.c 2022-11-16 11:40:26.252322689 -0700 +@@ -189,7 +189,7 @@ int WriteResultIntoFile( char * pFileNam + pFile = fopen( pFileName, "w" ); + if ( pFile == NULL ) + { +- fprintf( pFile, "\n\nCannot open the output file\n" ); ++ fprintf( stderr, "\n\nCannot open the output file\n" ); + return 1; + } + diff --git a/abc-use-after-free.patch b/abc-use-after-free.patch new file mode 100644 index 0000000..6c4ee43 --- /dev/null +++ b/abc-use-after-free.patch @@ -0,0 +1,23 @@ +--- src/base/cmd/cmdLoad.c.orig 2022-10-19 06:05:56.000000000 -0600 ++++ src/base/cmd/cmdLoad.c 2022-11-16 11:26:13.394889017 -0700 +@@ -58,8 +58,8 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, + // check if there is the binary + if ( (pFile = fopen( Vec_StrArray(vCommand), "r" )) == NULL ) + { +- Vec_StrFree( vCommand ); + Abc_Print( -1, "Cannot run the binary \"%s\".\n\n", Vec_StrArray(vCommand) ); ++ Vec_StrFree( vCommand ); + return 1; + } + fclose( pFile ); +@@ -74,9 +74,9 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, + // run the command line + if ( Util_SignalSystem( Vec_StrArray(vCommand) ) ) + { +- Vec_StrFree( vCommand ); + Abc_Print( -1, "The following command has returned non-zero exit status:\n" ); + Abc_Print( -1, "\"%s\"\n", Vec_StrArray(vCommand) ); ++ Vec_StrFree( vCommand ); + return 1; + } + Vec_StrFree( vCommand ); diff --git a/abc-weaken-assert.patch b/abc-weaken-assert.patch new file mode 100644 index 0000000..57ca3e8 --- /dev/null +++ b/abc-weaken-assert.patch @@ -0,0 +1,11 @@ +--- src/base/io/ioWritePla.c.orig 2022-10-19 06:05:56.000000000 -0600 ++++ src/base/io/ioWritePla.c 2022-11-21 11:18:23.452898568 -0700 +@@ -174,7 +174,7 @@ int Io_WritePla( Abc_Ntk_t * pNtk, char + FILE * pFile; + + assert( Abc_NtkIsSopNetlist(pNtk) ); +- assert( Abc_NtkLevel(pNtk) == 1 ); ++ assert( Abc_NtkLevel(pNtk) <= 1 ); + + pFile = fopen( pFileName, "w" ); + if ( pFile == NULL ) diff --git a/abc.spec b/abc.spec index 001dfa2..f6d8af9 100644 --- a/abc.spec +++ b/abc.spec @@ -1,8 +1,7 @@ # Upstream doesn't make releases. We have to check the code out of git. -%global owner berkeley-abc -%global gittag a9237f50ea01efdd62f86d334a38ffbe80a3d141 +%global gittag 66a5fe7aecd88d3fb0a70cc87aacc642b2d67c8c %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20220731 +%global gitdate 20221229 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -22,7 +21,7 @@ Name: abc Version: 1.01 -Release: 35.git%{gitdate}%{?dist} +Release: 36.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification # The ABC code itself is MIT-Modern-Variant. @@ -32,7 +31,7 @@ Summary: Sequential logic synthesis and formal verification # The bundled satoko code is BSD-2-Clause License: MIT-Modern-Variant AND MIT AND BSD-2-Clause AND BSD-3-Clause URL: https://people.eecs.berkeley.edu/~alanmi/abc/abc.htm -Source0: https://github.com/%{owner}/%{name}/archive/%{gittag}/%{name}-%{shorttag}.tar.gz +Source0: https://github.com/berkeley-abc/abc/archive/%{gittag}/%{name}-%{shorttag}.tar.gz # Man page created by Jerry James using upstream text; hence, it is covered by # the same copyright and license as the code. Source1: %{name}.1 @@ -51,6 +50,15 @@ Patch4: %{name}-format.patch Patch5: %{name}-gia.patch # Prevent a possible buffer overflow Patch6: %{name}-overflow.patch +# Fix two cases of use-after-free +# https://github.com/berkeley-abc/abc/pull/193 +Patch7: %{name}-use-after-free.patch +# Do not pass NULL to fprintf +# https://github.com/berkeley-abc/abc/pull/194 +Patch8: %{name}-null-fprintf.patch +# Weaken an overzealous assert +# https://bitbucket.org/alanmi/abc/issue/27/assertion-failure-in-write_pla-command +Patch9: %{name}-weaken-assert.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -101,7 +109,7 @@ Headers and libraries for developing applications that use ABC. %prep %autosetup -p0 -n %{name}-%{gittag} -# Do not use the bundled bzip2, zlib, or Windows libraries +# Do not use the bundled bzip2 or zlib libraries rm -fr lib src/misc/{bzlib,zlib} # Set the version number in the man page @@ -112,11 +120,12 @@ touch -r %{SOURCE1} %{name}.1 sed -i 's/ -O//' Makefile %build -export CFLAGS="%{build_cflags} -DNDEBUG" +export CFLAGS='%{build_cflags} -DNDEBUG' +export CXXFLAGS='%{build_cxxflags} -DNDEBUG' %ifarch s390x CFLAGS="$CFLAGS -DEPD_BIG_ENDIAN" +CXXFLAGS="$CXXFLAGS -DEPD_BIG_ENDIAN" %endif -export CXXFLAGS="$CFLAGS" export ABC_MAKE_VERBOSE=1 export ABC_USE_STDINT_H=1 %cmake -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES @@ -138,8 +147,8 @@ cd - # Install the header files cd src mkdir -p %{buildroot}%{_includedir}/%{name} -tar -cBf - $(find -O3 . -name \*.h) | \ - (cd %{buildroot}%{_includedir}/%{name}; tar -xBf -) +tar -cf - $(find -O3 . -name \*.h) | \ + (cd %{buildroot}%{_includedir}/%{name}; tar -xf -) cd - # Install the man page @@ -153,13 +162,18 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %files libs %license copyright.txt -%{_libdir}/lib%{name}.so.* +%{_libdir}/lib%{name}.so.0* %files devel %{_includedir}/%{name}/ %{_libdir}/lib%{name}.so %changelog +* Tue Jan 17 2023 Jerry James - 1.01-36.git20221229 +- Update to latest git snapshot +- Add -use-after-free, -null-fprintf, and -weaken-assert patches +- Minor spec file cleanups + * Mon Aug 1 2022 Jerry James - 1.01-35.git20220731 - Update to latest git snapshot - Convert License field to SPDX diff --git a/sources b/sources index b9139dd..97fbc0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-a9237f5.tar.gz) = bfad8fdd23fe869df6cf86dc3a1a4e9058a23487a6237043e3466f728b2830010e842ad3d3811352371f3dfbe1cd4c7d32999a8507aeae7d758f2ff52e2397b2 +SHA512 (abc-66a5fe7.tar.gz) = 1bd28a063e4d30727ca911f47f5fe8ecea1c08feecefcc459c1839b5b6df83c3f6393de8379195481171aa137150a847d4cef052fbfaba194dd7cb428c433254 From 6f8567df21a5aaf15b5ef68ebf1bb17ed56ef8da Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 21:17:45 +0000 Subject: [PATCH 22/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index f6d8af9..ba3ef1e 100644 --- a/abc.spec +++ b/abc.spec @@ -21,7 +21,7 @@ Name: abc Version: 1.01 -Release: 36.git%{gitdate}%{?dist} +Release: 37.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification # The ABC code itself is MIT-Modern-Variant. @@ -169,6 +169,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 1.01-37.git20221229 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Jan 17 2023 Jerry James - 1.01-36.git20221229 - Update to latest git snapshot - Add -use-after-free, -null-fprintf, and -weaken-assert patches From b9a9aef6cb5556b29c0307abe25f6c8af547ac72 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 14 Jul 2023 11:18:48 -0600 Subject: [PATCH 23/26] Update to latest git snapshot Drop upstreamed patches: overflow, use-after-free --- abc-format.patch | 105 ++++++++++++--------------------------- abc-gia.patch | 10 ++-- abc-overflow.patch | 11 ---- abc-use-after-free.patch | 23 --------- abc.spec | 19 ++++--- sources | 2 +- 6 files changed, 46 insertions(+), 124 deletions(-) delete mode 100644 abc-overflow.patch delete mode 100644 abc-use-after-free.patch diff --git a/abc-format.patch b/abc-format.patch index 2db66ba..c71498d 100644 --- a/abc-format.patch +++ b/abc-format.patch @@ -1,38 +1,15 @@ ---- src/aig/saig/saigIoa.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/aig/saig/saigIoa.c 2022-01-17 08:22:16.506371575 -0700 -@@ -47,15 +47,15 @@ char * Saig_ObjName( Aig_Man_t * p, Aig_ - { - static char Buffer[16]; - if ( Aig_ObjIsNode(pObj) || Aig_ObjIsConst1(pObj) ) -- sprintf( Buffer, "n%0*d", Abc_Base10Log(Aig_ManObjNumMax(p)), Aig_ObjId(pObj) ); -+ snprintf( Buffer, 16, "n%0*d", Abc_Base10Log(Aig_ManObjNumMax(p)), Aig_ObjId(pObj) ); - else if ( Saig_ObjIsPi(p, pObj) ) -- sprintf( Buffer, "pi%0*d", Abc_Base10Log(Saig_ManPiNum(p)), Aig_ObjCioId(pObj) ); -+ snprintf( Buffer, 16, "pi%0*d", Abc_Base10Log(Saig_ManPiNum(p)), Aig_ObjCioId(pObj) ); - else if ( Saig_ObjIsPo(p, pObj) ) -- sprintf( Buffer, "po%0*d", Abc_Base10Log(Saig_ManPoNum(p)), Aig_ObjCioId(pObj) ); -+ snprintf( Buffer, 16, "po%0*d", Abc_Base10Log(Saig_ManPoNum(p)), Aig_ObjCioId(pObj) ); - else if ( Saig_ObjIsLo(p, pObj) ) -- sprintf( Buffer, "lo%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPiNum(p) ); -+ snprintf( Buffer, 16, "lo%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPiNum(p) ); - else if ( Saig_ObjIsLi(p, pObj) ) -- sprintf( Buffer, "li%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPoNum(p) ); -+ snprintf( Buffer, 16, "li%0*d", Abc_Base10Log(Saig_ManRegNum(p)), Aig_ObjCioId(pObj) - Saig_ManPoNum(p) ); - else - assert( 0 ); - return Buffer; ---- src/base/abci/abc.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/base/abci/abc.c 2022-01-17 08:22:16.510371570 -0700 -@@ -30577,7 +30577,7 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pA - else - { - assert( i >= Abc_NtkPoNum(pNtk) ); -- sprintf( pSuffix, "_li%0*d", nDigits, i-Abc_NtkPoNum(pNtk) ); -+ snprintf( pSuffix, 100, "_li%0*d", nDigits, i-Abc_NtkPoNum(pNtk) ); - Abc_ObjAssignName( pObj, (char *)Vec_PtrEntry(pAbc->pGia->vNamesOut, i), pSuffix ); - } - } -@@ -43889,7 +43889,7 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * p +--- src/base/abci/abc.c.orig 2023-07-08 11:18:18.000000000 -0600 ++++ src/base/abci/abc.c 2023-07-14 11:14:10.263628991 -0600 +@@ -23905,7 +23905,7 @@ int Abc_CommandSymFun( Abc_Frame_t * pAb + printf( "%s\n", pTruth ); + // read the truth table to be the current network in ABC + pCommand = ABC_CALLOC( char, strlen(pTruth) + 100 ); +- sprintf( pCommand, "read_truth %s", pTruth ); ++ snprintf( pCommand, strlen(pTruth) + 100, "read_truth %s", pTruth ); + Cmd_CommandExecute( pAbc, pCommand ); + ABC_FREE( pCommand ); + ABC_FREE( pTruth ); +@@ -45189,7 +45189,7 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * p Gia_ManForEachPo( pAbc->pGia, pObj, i ) { Gia_Man_t * pOne = Gia_ManDupDfsCone( pAbc->pGia, pObj ); @@ -41,8 +18,8 @@ Gia_AigerWrite( pOne, Buffer, 0, 0, 0 ); Gia_ManStop( pOne ); } ---- src/base/io/ioReadBlifMv.c.orig 2022-01-17 08:21:48.617409341 -0700 -+++ src/base/io/ioReadBlifMv.c 2022-01-17 08:22:16.511371568 -0700 +--- src/base/io/ioReadBlifMv.c.orig 2023-07-14 11:12:54.591767465 -0600 ++++ src/base/io/ioReadBlifMv.c 2023-07-14 11:13:13.259486615 -0600 @@ -1627,7 +1627,7 @@ static int Io_MvParseLineMv( Io_MvMod_t ***********************************************************************/ static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc ) @@ -52,34 +29,14 @@ Abc_Obj_t * pFanin; int i; // add the fanin number of values ---- src/base/io/ioReadPla.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/base/io/ioReadPla.c 2022-01-17 08:22:16.511371568 -0700 -@@ -448,7 +448,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_Fil - nDigits = Abc_Base10Log( nInputs ); - for ( i = 0; i < nInputs; i++ ) - { -- sprintf( Buffer, "x%0*d", nDigits, i ); -+ snprintf( Buffer, 100, "x%0*d", nDigits, i ); - Io_ReadCreatePi( pNtk, Buffer ); - } - } -@@ -465,7 +465,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_Fil - nDigits = Abc_Base10Log( nOutputs ); - for ( i = 0; i < nOutputs; i++ ) - { -- sprintf( Buffer, "z%0*d", nDigits, i ); -+ snprintf( Buffer, 100, "z%0*d", nDigits, i ); - Io_ReadCreatePo( pNtk, Buffer ); - } - } ---- src/base/wlc/wlcNtk.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/base/wlc/wlcNtk.c 2022-01-17 08:22:16.512371567 -0700 +--- src/base/wlc/wlcNtk.c.orig 2023-07-08 11:18:18.000000000 -0600 ++++ src/base/wlc/wlcNtk.c 2023-07-14 10:51:19.721294579 -0600 @@ -1300,7 +1300,7 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) { if ( Wlc_ObjIsPo(pObj) ) continue; - sprintf( pBuffer, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) ); -+ snprintf( pBuffer, 100, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) ); ++ snprintf( pBuffer, 1000, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) ); NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); } @@ -88,7 +45,7 @@ if ( Wlc_ObjIsPi(pObj) ) continue; - sprintf( pBuffer, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) ); -+ snprintf( pBuffer, 100, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) ); ++ snprintf( pBuffer, 1000, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) ); NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); } @@ -96,7 +53,7 @@ Wlc_NtkForEachPo( p, pObj, i ) { - sprintf( pBuffer, "%s%0*d", "po", nDigits, i ); -+ snprintf( pBuffer, 100, "%s%0*d", "po", nDigits, i ); ++ snprintf( pBuffer, 1000, "%s%0*d", "po", nDigits, i ); NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); } @@ -104,7 +61,7 @@ Wlc_NtkForEachPi( p, pObj, i ) { - sprintf( pBuffer, "%s%0*d", "pi", nDigits, i ); -+ snprintf( pBuffer, 100, "%s%0*d", "pi", nDigits, i ); ++ snprintf( pBuffer, 1000, "%s%0*d", "pi", nDigits, i ); NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); } @@ -113,13 +70,13 @@ if ( Wlc_ObjIsCi(pObj) || Wlc_ObjIsCo(pObj) ) continue; - sprintf( pBuffer, "%s%0*d", "n", nDigits, i ); -+ snprintf( pBuffer, 100, "%s%0*d", "n", nDigits, i ); ++ snprintf( pBuffer, 1000, "%s%0*d", "n", nDigits, i ); NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); } ---- src/map/mio/mioUtils.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/map/mio/mioUtils.c 2022-01-17 08:22:16.513371566 -0700 -@@ -1711,7 +1711,7 @@ void Mio_LibraryShortNames( Mio_Library_ +--- src/map/mio/mioUtils.c.orig 2023-07-08 11:18:18.000000000 -0600 ++++ src/map/mio/mioUtils.c 2023-07-14 10:47:26.983819441 -0600 +@@ -1716,7 +1716,7 @@ void Mio_LibraryShortNames( Mio_Library_ Mio_LibraryForEachGate( pLib, pGate ) { ABC_FREE( pGate->pName ); @@ -128,9 +85,9 @@ pGate->pName = Abc_UtilStrsav( Buffer ); // update formula Mio_LibraryShortFormula( pGate, pGate->pForm, Buffer ); ---- src/map/scl/sclLibUtil.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/map/scl/sclLibUtil.c 2022-01-17 08:22:16.513371566 -0700 -@@ -203,7 +203,7 @@ void Abc_SclShortNames( SC_Lib * p ) +--- src/map/scl/sclLibUtil.c.orig 2023-07-08 11:18:18.000000000 -0600 ++++ src/map/scl/sclLibUtil.c 2023-07-14 10:47:26.983819441 -0600 +@@ -205,7 +205,7 @@ void Abc_SclShortNames( SC_Lib * p ) SC_RingForEachCell( pClass, pCell, k ) { ABC_FREE( pCell->pName ); @@ -139,8 +96,8 @@ pCell->pName = Abc_UtilStrsav( Buffer ); // formula SC_CellForEachPinOut( pCell, pPin, n ) ---- src/opt/dau/dauMerge.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/opt/dau/dauMerge.c 2022-01-17 08:22:16.513371566 -0700 +--- src/opt/dau/dauMerge.c.orig 2023-07-08 11:18:18.000000000 -0600 ++++ src/opt/dau/dauMerge.c 2023-07-14 10:47:26.983819441 -0600 @@ -715,7 +715,7 @@ Dau_DsdMergeStorePrintDefs( pS ); // create new function @@ -150,8 +107,8 @@ pTruth = Dau_DsdToTruth( pS->pOutput, nVarsTotal ); Status = Dau_DsdDecompose( pTruth, nVarsTotal, 0, 1, pS->pOutput ); //printf( "%d ", Status ); ---- src/proof/fra/fraCore.c.orig 2021-12-29 14:08:32.000000000 -0700 -+++ src/proof/fra/fraCore.c 2022-01-17 08:22:16.513371566 -0700 +--- src/proof/fra/fraCore.c.orig 2023-07-08 11:18:18.000000000 -0600 ++++ src/proof/fra/fraCore.c 2023-07-14 10:47:26.983819441 -0600 @@ -163,7 +163,7 @@ static inline void Fra_FraigNodeSpeculat // create manager with the logic for these two nodes pTemp = Aig_ManExtractMiter( p->pManFraig, pObjFraig, pObjReprFraig ); diff --git a/abc-gia.patch b/abc-gia.patch index 9988b05..8e09872 100644 --- a/abc-gia.patch +++ b/abc-gia.patch @@ -1,11 +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( +--- src/aig/gia/gia.h.orig 2023-07-14 10:53:06.361679474 -0600 ++++ src/aig/gia/gia.h 2023-07-14 10:54:12.069684316 -0600 +@@ -1142,7 +1142,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_LutForEachFaninIndex( p, i, iFan, k, Index ) \ + for ( k = 0; k < Gia_ObjLutSize(p,i) && (Index = Vec_IntEntry(p->vMapping, i)+1+k) && ((iFan = Vec_IntEntry(p->vMapping, Index)),1); k++ ) #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-overflow.patch b/abc-overflow.patch deleted file mode 100644 index 96a1d6f..0000000 --- a/abc-overflow.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/map/if/ifDsd.c.orig 2021-03-28 19:40:27.000000000 -0600 -+++ src/map/if/ifDsd.c 2021-03-31 09:50:14.911798180 -0600 -@@ -91,7 +91,7 @@ struct If_DsdMan_t_ - Vec_Mem_t * vTtMem[IF_MAX_FUNC_LUTSIZE+1]; // truth table memory and hash table - Vec_Ptr_t * vTtDecs[IF_MAX_FUNC_LUTSIZE+1]; // truth table decompositions - Vec_Wec_t * vIsops[IF_MAX_FUNC_LUTSIZE+1]; // ISOP for each function -- int * pSched[IF_MAX_FUNC_LUTSIZE]; // grey code schedules -+ int * pSched[IF_MAX_FUNC_LUTSIZE+1]; // grey code schedules - int nTtBits; // the number of truth table bits - int nConfigWords; // the number of words for config data per node - Vec_Wrd_t * vConfigs; // permutations diff --git a/abc-use-after-free.patch b/abc-use-after-free.patch deleted file mode 100644 index 6c4ee43..0000000 --- a/abc-use-after-free.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- src/base/cmd/cmdLoad.c.orig 2022-10-19 06:05:56.000000000 -0600 -+++ src/base/cmd/cmdLoad.c 2022-11-16 11:26:13.394889017 -0700 -@@ -58,8 +58,8 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, - // check if there is the binary - if ( (pFile = fopen( Vec_StrArray(vCommand), "r" )) == NULL ) - { -- Vec_StrFree( vCommand ); - Abc_Print( -1, "Cannot run the binary \"%s\".\n\n", Vec_StrArray(vCommand) ); -+ Vec_StrFree( vCommand ); - return 1; - } - fclose( pFile ); -@@ -74,9 +74,9 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, - // run the command line - if ( Util_SignalSystem( Vec_StrArray(vCommand) ) ) - { -- Vec_StrFree( vCommand ); - Abc_Print( -1, "The following command has returned non-zero exit status:\n" ); - Abc_Print( -1, "\"%s\"\n", Vec_StrArray(vCommand) ); -+ Vec_StrFree( vCommand ); - return 1; - } - Vec_StrFree( vCommand ); diff --git a/abc.spec b/abc.spec index ba3ef1e..031a715 100644 --- a/abc.spec +++ b/abc.spec @@ -1,7 +1,7 @@ # Upstream doesn't make releases. We have to check the code out of git. -%global gittag 66a5fe7aecd88d3fb0a70cc87aacc642b2d67c8c +%global gittag e61194bbed8c2ba8aac1f2720ebe513a571ee664 %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20221229 +%global gitdate 20230708 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -21,7 +21,7 @@ Name: abc Version: 1.01 -Release: 37.git%{gitdate}%{?dist} +Release: 38.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification # The ABC code itself is MIT-Modern-Variant. @@ -48,17 +48,12 @@ 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 -# Prevent a possible buffer overflow -Patch6: %{name}-overflow.patch -# Fix two cases of use-after-free -# https://github.com/berkeley-abc/abc/pull/193 -Patch7: %{name}-use-after-free.patch # Do not pass NULL to fprintf # https://github.com/berkeley-abc/abc/pull/194 -Patch8: %{name}-null-fprintf.patch +Patch6: %{name}-null-fprintf.patch # Weaken an overzealous assert # https://bitbucket.org/alanmi/abc/issue/27/assertion-failure-in-write_pla-command -Patch9: %{name}-weaken-assert.patch +Patch7: %{name}-weaken-assert.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -169,6 +164,10 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Fri Jul 14 2023 Jerry James - 1.01-38.git20230708 +- Update to latest git snapshot +- Drop upstreamed patches: overflow, use-after-free + * Wed Jan 18 2023 Fedora Release Engineering - 1.01-37.git20221229 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 97fbc0b..d6e0d0c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-66a5fe7.tar.gz) = 1bd28a063e4d30727ca911f47f5fe8ecea1c08feecefcc459c1839b5b6df83c3f6393de8379195481171aa137150a847d4cef052fbfaba194dd7cb428c433254 +SHA512 (abc-e61194b.tar.gz) = cd8b524b90f543ed1f6ecb6597ebedd78b7a6c0c8e65c078d655b213f1752397fdab111be3eb6828c3a758782127d0abe60cfe2729358d3bef8f97b17bfebe90 From 1d12f9fd9f3e4b92b31c0791ca029be74af95cf4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 12:47:37 +0000 Subject: [PATCH 24/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abc.spec b/abc.spec index 031a715..731552d 100644 --- a/abc.spec +++ b/abc.spec @@ -21,7 +21,7 @@ Name: abc Version: 1.01 -Release: 38.git%{gitdate}%{?dist} +Release: 39.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification # The ABC code itself is MIT-Modern-Variant. @@ -164,6 +164,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 1.01-39.git20230708 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jul 14 2023 Jerry James - 1.01-38.git20230708 - Update to latest git snapshot - Drop upstreamed patches: overflow, use-after-free From 428f7044fd533b19cc31ac7f5f374946aab6b669 Mon Sep 17 00:00:00 2001 From: Gabriel Somlo Date: Wed, 2 Aug 2023 12:33:26 -0400 Subject: [PATCH 25/26] Apply patch from yosyshq to fix yosys FTBFS (#2226521) --- abc-yosys-segfault.patch | 22 ++++++++++++++++++++++ abc.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 abc-yosys-segfault.patch diff --git a/abc-yosys-segfault.patch b/abc-yosys-segfault.patch new file mode 100644 index 0000000..602c820 --- /dev/null +++ b/abc-yosys-segfault.patch @@ -0,0 +1,22 @@ +From 1de4eafb0da0639199bd97f2fa98471e76327a6b Mon Sep 17 00:00:00 2001 +From: Miodrag Milanovic +Date: Tue, 6 Jun 2023 13:59:30 +0200 +Subject: [PATCH] fix segfault + +--- + src/base/io/ioWriteVerilog.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/base/io/ioWriteVerilog.c src/base/io/ioWriteVerilog.c +index 48b15b559..3d9f8fa38 100644 +--- src/base/io/ioWriteVerilog.c ++++ src/base/io/ioWriteVerilog.c +@@ -561,7 +561,7 @@ void Io_WriteVerilogObjects( FILE * pFile, Abc_Ntk_t * pNtk, int fOnlyAnds ) + vLevels = Vec_VecAlloc( 10 ); + Abc_NtkForEachNode( pNtk, pObj, i ) + { +- if ( Abc_ObjFaninNum(pObj) == 1 || Abc_ObjIsCo(Abc_ObjFanout0(Abc_ObjFanout0(pObj))) ) ++ if ( Abc_ObjFaninNum(pObj) == 1 && Abc_ObjIsCo(Abc_ObjFanout0(Abc_ObjFanout0(pObj))) ) + { + int iLit = Abc_Var2Lit( Abc_ObjId( Abc_ObjFanin0(Abc_ObjFanin0(pObj)) ), Abc_NodeIsInv(pObj) ); + int iObj = Vec_IntEntry( vMap, iLit ); diff --git a/abc.spec b/abc.spec index 731552d..1934b6c 100644 --- a/abc.spec +++ b/abc.spec @@ -21,7 +21,7 @@ Name: abc Version: 1.01 -Release: 39.git%{gitdate}%{?dist} +Release: 40.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification # The ABC code itself is MIT-Modern-Variant. @@ -54,6 +54,8 @@ Patch6: %{name}-null-fprintf.patch # Weaken an overzealous assert # https://bitbucket.org/alanmi/abc/issue/27/assertion-failure-in-write_pla-command Patch7: %{name}-weaken-assert.patch +# yosys aiger segfault (yosyshq downstream commit): +Patch8: abc-yosys-segfault.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -164,6 +166,9 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Sun Jul 30 2023 Gabriel Somlo - 1.01-40.git20230708 +- Apply patch from yosyshq to fix yosys FTBFS (#2226521) + * Wed Jul 19 2023 Fedora Release Engineering - 1.01-39.git20230708 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From d85b87737a47f79efc2971927b8a01db942498b2 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 9 Aug 2023 14:25:24 -0600 Subject: [PATCH 26/26] Superseded by yosyshq-abc --- .gitignore | 2 - README.md | 14 -- abc-build.patch | 26 ---- abc-bundlelib.patch | 124 ---------------- abc-format.patch | 120 --------------- abc-gia.patch | 11 -- abc-header.patch | 20 --- abc-null-fprintf.patch | 11 -- abc-sharedlib.patch | 22 --- abc-weaken-assert.patch | 11 -- abc-yosys-segfault.patch | 22 --- abc.1 | 102 ------------- abc.spec | 307 --------------------------------------- dead.package | 1 + sources | 1 - 15 files changed, 1 insertion(+), 793 deletions(-) delete mode 100644 .gitignore delete mode 100644 README.md delete mode 100644 abc-build.patch delete mode 100644 abc-bundlelib.patch delete mode 100644 abc-format.patch delete mode 100644 abc-gia.patch delete mode 100644 abc-header.patch delete mode 100644 abc-null-fprintf.patch delete mode 100644 abc-sharedlib.patch delete mode 100644 abc-weaken-assert.patch delete mode 100644 abc-yosys-segfault.patch delete mode 100644 abc.1 delete mode 100644 abc.spec create mode 100644 dead.package delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 17af48f..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/*.zip -/abc-*.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 5de4bf3..0000000 --- a/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# abc - -[ABC](https://people.eecs.berkeley.edu/~alanmi/abc/abc.htm) is a growing -software system for synthesis and verification of binary sequential logic -circuits appearing in synchronous hardware designs. ABC combines scalable -logic optimization based on And-Inverter Graphs (AIGs), optimal-delay -DAG-based technology mapping for look-up tables and standard cells, and -innovative algorithms for sequential synthesis and verification. - -ABC provides an experimental implementation of these algorithms and a -programming environment for building similar applications. Future development will -focus on improving the algorithms and making most of the packages stand-alone. -This will allow the user to customize ABC for their needs as if it were a toolbox -rather than a complete tool. diff --git a/abc-build.patch b/abc-build.patch deleted file mode 100644 index 7952074..0000000 --- a/abc-build.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- CMakeLists.txt.orig 2019-12-17 15:57:46.000000000 -0700 -+++ CMakeLists.txt 2019-12-18 09:13:25.779458679 -0700 -@@ -53,7 +53,7 @@ execute_process( - make - ${ABC_READLINE_FLAGS} - ${ABC_USE_NAMESPACE_FLAGS} -- ARCHFLAGS_EXE=${CMAKE_CURRENT_BINARY_DIR}/abc_arch_flags_program.exe -+ ABC_USE_STDINT_H=1 - ABC_MAKE_NO_DEPS=1 - CC=${CMAKE_C_COMPILER} - CXX=${CMAKE_CXX_COMPILER} -@@ -94,6 +94,8 @@ list(REMOVE_ITEM ABC_SRC ${ABC_MAIN_SRC} - add_library(libabc EXCLUDE_FROM_ALL ${ABC_SRC}) - abc_properties(libabc PUBLIC) - set_property(TARGET libabc PROPERTY OUTPUT_NAME abc) -+set_property(TARGET libabc PROPERTY VERSION "0.0.0") -+set_property(TARGET libabc PROPERTY SOVERSION 0) - - add_executable(abc ${ABC_MAIN_SRC}) - target_link_libraries(abc PRIVATE libabc) -@@ -103,3 +105,5 @@ add_library(libabc-pic EXCLUDE_FROM_ALL - abc_properties(libabc-pic PUBLIC) - set_property(TARGET libabc-pic PROPERTY POSITION_INDEPENDENT_CODE ON) - set_property(TARGET libabc-pic PROPERTY OUTPUT_NAME abc-pic) -+set_property(TARGET libabc-pic PROPERTY VERSION "0.0.0") -+set_property(TARGET libabc-pic PROPERTY SOVERSION 0) diff --git a/abc-bundlelib.patch b/abc-bundlelib.patch deleted file mode 100644 index cfb044b..0000000 --- a/abc-bundlelib.patch +++ /dev/null @@ -1,124 +0,0 @@ ---- Makefile.orig 2019-05-30 20:27:31.000000000 -0600 -+++ Makefile 2019-06-04 09:40:32.212192338 -0600 -@@ -20,7 +20,7 @@ MODULES := \ - src/map/mapper src/map/mio src/map/super src/map/if \ - src/map/amap src/map/cov src/map/scl src/map/mpm \ - src/misc/extra src/misc/mvc src/misc/st src/misc/util src/misc/nm \ -- src/misc/vec src/misc/hash src/misc/tim src/misc/bzlib src/misc/zlib \ -+ src/misc/vec src/misc/hash src/misc/tim \ - src/misc/mem src/misc/bar src/misc/bbl src/misc/parse \ - src/opt/cut src/opt/fxu src/opt/fxch src/opt/rwr src/opt/mfs src/opt/sim \ - src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \ -@@ -42,6 +42,7 @@ $(ARCHFLAGS_EXE) : arch_flags.c - $(CC) arch_flags.c -o $(ARCHFLAGS_EXE) - - INCLUDES += -I$(ABCSRC)/src -+LIBS=-lbz2 -lz - - # Use C99 stdint.h header for platform-dependent types - ifdef ABC_USE_STDINT_H ---- src/base/io/ioReadAiger.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/io/ioReadAiger.c 2019-06-04 09:40:32.231192003 -0600 -@@ -26,8 +26,8 @@ - #include - #include - --#include "misc/bzlib/bzlib.h" --#include "misc/zlib/zlib.h" -+#include -+#include - #include "ioAbc.h" - - ABC_NAMESPACE_IMPL_START ---- src/base/io/ioReadBlifMv.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/io/ioReadBlifMv.c 2019-06-04 09:40:32.232191985 -0600 -@@ -18,8 +18,8 @@ - - ***********************************************************************/ - --#include "misc/zlib/zlib.h" --#include "misc/bzlib/bzlib.h" -+#include -+#include - #include "base/abc/abc.h" - #include "misc/vec/vecPtr.h" - #include "ioAbc.h" ---- src/base/io/ioWriteAiger.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/io/ioWriteAiger.c 2019-06-04 09:40:32.233191967 -0600 -@@ -26,8 +26,8 @@ - #include - #include - --#include "misc/bzlib/bzlib.h" --#include "misc/zlib/zlib.h" -+#include -+#include - #include "ioAbc.h" - - ---- src/sat/bsat2/MainSat.cpp.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/bsat2/MainSat.cpp 2019-06-04 09:40:32.234191950 -0600 -@@ -21,7 +21,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR - #include - - #include --#include "misc/zlib/zlib.h" -+#include - - #include "System.h" - #include "ParseUtils.h" ---- src/sat/bsat2/MainSimp.cpp.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/bsat2/MainSimp.cpp 2019-06-04 09:40:32.234191950 -0600 -@@ -21,7 +21,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR - #include - - #include --#include "misc/zlib/zlib.h" -+#include - - #ifndef _WIN32 - #include ---- src/sat/bsat2/ParseUtils.h.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/bsat2/ParseUtils.h 2019-06-04 09:40:32.235191932 -0600 -@@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR - #include - #include - --#include "misc/zlib/zlib.h" -+#include - - namespace Minisat { - ---- src/sat/cnf/cnfMan.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/cnf/cnfMan.c 2019-06-04 09:40:32.235191932 -0600 -@@ -21,7 +21,7 @@ - #include "cnf.h" - #include "sat/bsat/satSolver.h" - #include "sat/bsat/satSolver2.h" --#include "misc/zlib/zlib.h" -+#include - - ABC_NAMESPACE_IMPL_START - ---- src/sat/glucose/ParseUtils.h.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/glucose/ParseUtils.h 2019-06-04 09:40:32.236191914 -0600 -@@ -25,7 +25,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR - #include - #include - --#include "misc/zlib/zlib.h" -+#include - - ABC_NAMESPACE_CXX_HEADER_START - ---- src/sat/glucose2/ParseUtils.h.orig -+++ src/sat/glucose2/ParseUtils.h -@@ -25,7 +25,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR - #include - #include - --#include "misc/zlib/zlib.h" -+#include - - ABC_NAMESPACE_CXX_HEADER_START - diff --git a/abc-format.patch b/abc-format.patch deleted file mode 100644 index c71498d..0000000 --- a/abc-format.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- src/base/abci/abc.c.orig 2023-07-08 11:18:18.000000000 -0600 -+++ src/base/abci/abc.c 2023-07-14 11:14:10.263628991 -0600 -@@ -23905,7 +23905,7 @@ int Abc_CommandSymFun( Abc_Frame_t * pAb - printf( "%s\n", pTruth ); - // read the truth table to be the current network in ABC - pCommand = ABC_CALLOC( char, strlen(pTruth) + 100 ); -- sprintf( pCommand, "read_truth %s", pTruth ); -+ snprintf( pCommand, strlen(pTruth) + 100, "read_truth %s", pTruth ); - Cmd_CommandExecute( pAbc, pCommand ); - ABC_FREE( pCommand ); - ABC_FREE( pTruth ); -@@ -45189,7 +45189,7 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * p - Gia_ManForEachPo( pAbc->pGia, pObj, i ) - { - Gia_Man_t * pOne = Gia_ManDupDfsCone( pAbc->pGia, pObj ); -- sprintf( Buffer, "%s_%0*d.aig", Extra_FileNameGeneric(pAbc->pGia->pSpec), nDigits, i ); -+ snprintf( Buffer, 1000, "%s_%0*d.aig", Extra_FileNameGeneric(pAbc->pGia->pSpec), nDigits, i ); - Gia_AigerWrite( pOne, Buffer, 0, 0, 0 ); - Gia_ManStop( pOne ); - } ---- src/base/io/ioReadBlifMv.c.orig 2023-07-14 11:12:54.591767465 -0600 -+++ src/base/io/ioReadBlifMv.c 2023-07-14 11:13:13.259486615 -0600 -@@ -1627,7 +1627,7 @@ static int Io_MvParseLineMv( Io_MvMod_t - ***********************************************************************/ - static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc ) - { -- char Buffer[10]; -+ char Buffer[12]; - Abc_Obj_t * pFanin; - int i; - // add the fanin number of values ---- src/base/wlc/wlcNtk.c.orig 2023-07-08 11:18:18.000000000 -0600 -+++ src/base/wlc/wlcNtk.c 2023-07-14 10:51:19.721294579 -0600 -@@ -1300,7 +1300,7 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) - { - if ( Wlc_ObjIsPo(pObj) ) - continue; -- sprintf( pBuffer, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) ); -+ snprintf( pBuffer, 1000, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) ); - NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); - Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); - } -@@ -1308,21 +1308,21 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) - { - if ( Wlc_ObjIsPi(pObj) ) - continue; -- sprintf( pBuffer, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) ); -+ snprintf( pBuffer, 1000, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) ); - NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); - Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); - } - nDigits = Abc_Base10Log( Wlc_NtkPoNum(p) ); - Wlc_NtkForEachPo( p, pObj, i ) - { -- sprintf( pBuffer, "%s%0*d", "po", nDigits, i ); -+ snprintf( pBuffer, 1000, "%s%0*d", "po", nDigits, i ); - NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); - Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); - } - nDigits = Abc_Base10Log( Wlc_NtkPiNum(p) ); - Wlc_NtkForEachPi( p, pObj, i ) - { -- sprintf( pBuffer, "%s%0*d", "pi", nDigits, i ); -+ snprintf( pBuffer, 1000, "%s%0*d", "pi", nDigits, i ); - NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); - Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); - } -@@ -1331,7 +1331,7 @@ void Wlc_NtkShortNames( Wlc_Ntk_t * p ) - { - if ( Wlc_ObjIsCi(pObj) || Wlc_ObjIsCo(pObj) ) - continue; -- sprintf( pBuffer, "%s%0*d", "n", nDigits, i ); -+ snprintf( pBuffer, 1000, "%s%0*d", "n", nDigits, i ); - NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound ); - Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId ); - } ---- src/map/mio/mioUtils.c.orig 2023-07-08 11:18:18.000000000 -0600 -+++ src/map/mio/mioUtils.c 2023-07-14 10:47:26.983819441 -0600 -@@ -1716,7 +1716,7 @@ void Mio_LibraryShortNames( Mio_Library_ - Mio_LibraryForEachGate( pLib, pGate ) - { - ABC_FREE( pGate->pName ); -- sprintf( Buffer, "g%0*d", nDigits, ++c ); -+ snprintf( Buffer, 10000, "g%0*d", nDigits, ++c ); - pGate->pName = Abc_UtilStrsav( Buffer ); - // update formula - Mio_LibraryShortFormula( pGate, pGate->pForm, Buffer ); ---- src/map/scl/sclLibUtil.c.orig 2023-07-08 11:18:18.000000000 -0600 -+++ src/map/scl/sclLibUtil.c 2023-07-14 10:47:26.983819441 -0600 -@@ -205,7 +205,7 @@ void Abc_SclShortNames( SC_Lib * p ) - SC_RingForEachCell( pClass, pCell, k ) - { - ABC_FREE( pCell->pName ); -- sprintf( Buffer, "g%0*d_%0*d", nDigits, i, nDigits2, k ); -+ snprintf( Buffer, 10000, "g%0*d_%0*d", nDigits, i, nDigits2, k ); - pCell->pName = Abc_UtilStrsav( Buffer ); - // formula - SC_CellForEachPinOut( pCell, pPin, n ) ---- src/opt/dau/dauMerge.c.orig 2023-07-08 11:18:18.000000000 -0600 -+++ src/opt/dau/dauMerge.c 2023-07-14 10:47:26.983819441 -0600 -@@ -715,7 +715,7 @@ Dau_DsdMergeStorePrintDefs( pS ); - - // create new function - // assert( nVarsTotal <= 6 ); -- sprintf( pS->pOutput, "(%s%s)", pDsd0, pDsd1 ); -+ snprintf( pS->pOutput, DAU_MAX_STR, "(%s%s)", pDsd0, pDsd1 ); - pTruth = Dau_DsdToTruth( pS->pOutput, nVarsTotal ); - Status = Dau_DsdDecompose( pTruth, nVarsTotal, 0, 1, pS->pOutput ); - //printf( "%d ", Status ); ---- src/proof/fra/fraCore.c.orig 2023-07-08 11:18:18.000000000 -0600 -+++ src/proof/fra/fraCore.c 2023-07-14 10:47:26.983819441 -0600 -@@ -163,7 +163,7 @@ static inline void Fra_FraigNodeSpeculat - // create manager with the logic for these two nodes - pTemp = Aig_ManExtractMiter( p->pManFraig, pObjFraig, pObjReprFraig ); - // dump the logic into a file -- sprintf( FileName, "aig\\%03d.blif", ++Counter ); -+ snprintf( FileName, 20U, "aig\\%03d.blif", ++Counter ); - Aig_ManDumpBlif( pTemp, FileName, NULL, NULL ); - printf( "Speculation cone with %d nodes was written into file \"%s\".\n", Aig_ManNodeNum(pTemp), FileName ); - // clean up diff --git a/abc-gia.patch b/abc-gia.patch deleted file mode 100644 index 8e09872..0000000 --- a/abc-gia.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/aig/gia/gia.h.orig 2023-07-14 10:53:06.361679474 -0600 -+++ src/aig/gia/gia.h 2023-07-14 10:54:12.069684316 -0600 -@@ -1142,7 +1142,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_LutForEachFaninIndex( p, i, iFan, k, Index ) \ - for ( k = 0; k < Gia_ObjLutSize(p,i) && (Index = Vec_IntEntry(p->vMapping, i)+1+k) && ((iFan = Vec_IntEntry(p->vMapping, Index)),1); k++ ) - #define Gia_LutForEachFaninObj( p, i, pFanin, k ) \ diff --git a/abc-header.patch b/abc-header.patch deleted file mode 100644 index aa5ce97..0000000 --- a/abc-header.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- src/sat/glucose/Glucose.cpp.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/glucose/Glucose.cpp 2019-06-04 09:41:02.469658200 -0600 -@@ -33,6 +33,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR - #include "sat/glucose/Solver.h" - #include "sat/glucose/Constants.h" - #include "sat/glucose/System.h" -+#include "misc/util/abc_global.h" - - ABC_NAMESPACE_IMPL_START - ---- src/sat/glucose2/Glucose2.cpp.orig -+++ src/sat/glucose2/Glucose2.cpp -@@ -34,6 +34,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR - #include "sat/glucose2/Solver.h" - - #include "sat/glucose2/CGlucose.h" -+#include "misc/util/abc_global.h" - - ABC_NAMESPACE_IMPL_START - diff --git a/abc-null-fprintf.patch b/abc-null-fprintf.patch deleted file mode 100644 index 1bfd75d..0000000 --- a/abc-null-fprintf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/base/exor/exorUtil.c.orig 2022-10-19 06:05:56.000000000 -0600 -+++ src/base/exor/exorUtil.c 2022-11-16 11:40:26.252322689 -0700 -@@ -189,7 +189,7 @@ int WriteResultIntoFile( char * pFileNam - pFile = fopen( pFileName, "w" ); - if ( pFile == NULL ) - { -- fprintf( pFile, "\n\nCannot open the output file\n" ); -+ fprintf( stderr, "\n\nCannot open the output file\n" ); - return 1; - } - diff --git a/abc-sharedlib.patch b/abc-sharedlib.patch deleted file mode 100644 index 92fa915..0000000 --- a/abc-sharedlib.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- Makefile.orig 2019-06-04 09:40:32.212192338 -0600 -+++ Makefile 2019-06-04 09:40:51.291855524 -0600 -@@ -55,7 +55,7 @@ ARCHFLAGS := $(ARCHFLAGS) - - OPTFLAGS ?= -g -O - --CFLAGS += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(ARCHFLAGS) -+CFLAGS += -Wno-unused-function $(OPTFLAGS) $(ARCHFLAGS) -Isrc - ifneq ($(findstring arm,$(shell uname -m)),) - CFLAGS += -DABC_MEMALIGN=4 - endif -@@ -221,7 +221,9 @@ lib$(PROG).a: $(LIBOBJ) - - lib$(PROG).so: $(LIBOBJ) - @echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@) -- $(VERBOSE)$(CXX) -shared -o $@ $^ $(LIBS) -+ $(VERBOSE)$(CXX) -shared -Wl,-h,lib$(PROG).so.0 -o lib$(PROG).so.0.0.0 $^ $(LIBS) -+ $(VERBOSE)ln -s lib$(PROG).so.0.0.0 lib$(PROG).so.0 -+ $(VERBOSE)ln -s lib$(PROG).so.0 $@ - - docs: - @echo "$(MSG_PREFIX)\`\` Building documentation." $(notdir $@) diff --git a/abc-weaken-assert.patch b/abc-weaken-assert.patch deleted file mode 100644 index 57ca3e8..0000000 --- a/abc-weaken-assert.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/base/io/ioWritePla.c.orig 2022-10-19 06:05:56.000000000 -0600 -+++ src/base/io/ioWritePla.c 2022-11-21 11:18:23.452898568 -0700 -@@ -174,7 +174,7 @@ int Io_WritePla( Abc_Ntk_t * pNtk, char - FILE * pFile; - - assert( Abc_NtkIsSopNetlist(pNtk) ); -- assert( Abc_NtkLevel(pNtk) == 1 ); -+ assert( Abc_NtkLevel(pNtk) <= 1 ); - - pFile = fopen( pFileName, "w" ); - if ( pFile == NULL ) diff --git a/abc-yosys-segfault.patch b/abc-yosys-segfault.patch deleted file mode 100644 index 602c820..0000000 --- a/abc-yosys-segfault.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 1de4eafb0da0639199bd97f2fa98471e76327a6b Mon Sep 17 00:00:00 2001 -From: Miodrag Milanovic -Date: Tue, 6 Jun 2023 13:59:30 +0200 -Subject: [PATCH] fix segfault - ---- - src/base/io/ioWriteVerilog.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git src/base/io/ioWriteVerilog.c src/base/io/ioWriteVerilog.c -index 48b15b559..3d9f8fa38 100644 ---- src/base/io/ioWriteVerilog.c -+++ src/base/io/ioWriteVerilog.c -@@ -561,7 +561,7 @@ void Io_WriteVerilogObjects( FILE * pFile, Abc_Ntk_t * pNtk, int fOnlyAnds ) - vLevels = Vec_VecAlloc( 10 ); - Abc_NtkForEachNode( pNtk, pObj, i ) - { -- if ( Abc_ObjFaninNum(pObj) == 1 || Abc_ObjIsCo(Abc_ObjFanout0(Abc_ObjFanout0(pObj))) ) -+ if ( Abc_ObjFaninNum(pObj) == 1 && Abc_ObjIsCo(Abc_ObjFanout0(Abc_ObjFanout0(pObj))) ) - { - int iLit = Abc_Var2Lit( Abc_ObjId( Abc_ObjFanin0(Abc_ObjFanin0(pObj)) ), Abc_NodeIsInv(pObj) ); - int iObj = Vec_IntEntry( vMap, iLit ); diff --git a/abc.1 b/abc.1 deleted file mode 100644 index cb64b7f..0000000 --- a/abc.1 +++ /dev/null @@ -1,102 +0,0 @@ -.TH "ABC" "1" "@VERSION@" "ABC" "User Commands" -.SH "NAME" -abc \- sequential logic synthesis and formal verification -.SH "SYNOPSIS" -.B abc -[\fIOPTIONS\fP] \fIFILE\fP -.SH "DESCRIPTION" -.PP -ABC is a growing software system for synthesis and verification of binary -sequential logic circuits appearing in synchronous hardware designs. ABC -combines scalable logic optimization based on And-Inverter Graphs (AIGs), -optimal-delay DAG-based technology mapping for look-up tables and standard -cells, and innovative algorithms for sequential synthesis and verification. -.PP -ABC provides an experimental implementation of these algorithms and a -programming environment for building similar applications. Future development -will focus on improving the algorithms and making most of the packages -stand-alone. This will allow the user to customize ABC for their needs as if -it were a toolbox rather than a complete tool. -.SH "OPTIONS" -.TP -\fB\-c\fP \fICMD\fP -Execute commands \fICMD\fP. -.TP -\fB\-q\fP \fICMD\fP -Execute commands \fICMD\fP quietly. -.TP -\fB\-C\fP \fICMD\fP -Execute commands \fICMD\fP, then continue in interactive mode. -.TP -\fB\-Q\fP \fICMD\fP -Execute commands \fICMD\fP quietly, then continue in interactive mode. -.TP -\fB\-F\fP \fISCRIPT\fP -Execute commands from script file \fISCRIPT\fP and echo commands. -.TP -\fB\-f\fP \fISCRIPT\fP -Execute commands from script file \fISCRIPT\fP. -.TP -\fB\-h\fP -Print command usage. -.TP -\fB\-o\fP \fIFILE\fP -Store the result in \fIFILE\fP. -.TP -\fB\-s\fP -Do not read any initialization file. -.TP -\fB\-t\fP \fITYPE\fP -Specify the input type, one of \fIblif_mv\fP, \fIblif_mvs\fP, \fIblif\fP, or -\fInone\fP. The default is \fIblif_mv\fP. -.TP -\fB\-T\fP \fITYPE\fP -Specify the output type, one of \fIblif_mv\fP, \fIblif_mvs\fP, \fIblif\fP, or -\fInone\fP. The default is \fIblif_mv\fP. -.TP -\fB\-x\fP -Equivalent to \fI-t none -T none\fP. -.TP -\fB\-b\fP -Run in bridge mode. -.SH "INTRODUCTION" -.PP -Data structures and algorithms at the heart of a software system determine its -capabilities in processing data and its efficiency as a programming -environment for building new applications. Extensive experience of developing -and using SIS, VIS, and MVSIS, makes it clear that these systems do not -provide a flexible programming environment to implement recent innovations, -such as integration of technology mapping and retiming. Specifically, the SIS -environment is outdated and rather inefficient when handling large circuits. -VIS, designed as a formal verification tool for multi-valued specifications, -does not provide enough flexibility for binary synthesis. MVSIS was developed -and extensively used by us in the recent years for implementing new synthesis -algorithms for both multi-valued and binary networks. Finally, we became -convinced that (a) the basic data structures and algorithms of MVSIS can be -made considerably simpler and easier to use by assuming binary networks, and -(b) a central place in the new system should be given to a new data structure, -AIGs (multi-level logic networks composed of two-input ANDs and inverters), -which promises improvements in quality and runtime of synthesis and -verification. -.PP -This understanding motivates us to redevelop the core packages of MVSIS -resulting in a new programming environment named ABC. As the name suggests, -the primary goal is to keep data structures simple and flexible for a wide -range of applications. The “philosophy of ABC” has several basic premises. -One of them is allowing for a variety of functional representations, such as -BDDs and SOPs, to solve specialized tasks, while defaulting to AIGs for the -mainstream network manipulation. Representing logic using AIGs leads to a -remarkable uniformity in computation and efficient interfacing with CNF-based -SAT solvers for handing Boolean reasoning problems. Another fundamental -premise of ABC is the synergy between synthesis and verification using -efficient SAT-based Boolean reasoning on the AIG for combinational and -sequential equivalence checking. -.PP -The goal of the ABC project is to provide a public-domain implementation of -the state-of-the-art combinational and sequential synthesis algorithms and, at -the same time, create an open-source environment, in which such applications -can be developed and compared. The current version of ABC can -optimize/map/retime industrial gate-level designs with 100K gates and 10K -sequential elements for optimal delay and heuristically minimized area in -about one minute of CPU time on a modern computer. The runtime of the -combinational synthesis, mapping, and verification is typically faster. diff --git a/abc.spec b/abc.spec deleted file mode 100644 index 1934b6c..0000000 --- a/abc.spec +++ /dev/null @@ -1,307 +0,0 @@ -# Upstream doesn't make releases. We have to check the code out of git. -%global gittag e61194bbed8c2ba8aac1f2720ebe513a571ee664 -%global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20230708 - -# WARNING: When updating to a newer snapshot, because upstream doesn't do -# shared library versioning, run abipkgdiff (from libabigail) against the -# old and new binary and debuginfo packages to detect abi changes that would -# require bumping the shared library version, e.g., -# abipkgdiff --d1 abc-libs-debuginfo-.rpm \ -# --d1 abc-debuginfo-.rpm \ -# --d2 abc-libs-debuginfo-.rpm \ -# --d2 abc-debuginfo-.rpm \ -# --devel1 abc-devel-.rpm \ -# --devel2 abc-devel-.rpm \ -# abc-libs-.rpm abc-libs-.rpm -# If the shared library version is bumped, remember to rebuild dependent -# packages, finding them using e.g. -# repoquery --whatrequires abc-libs -# This should be done for each branch in which abc-libs will be updated. - -Name: abc -Version: 1.01 -Release: 40.git%{gitdate}%{?dist} -Summary: Sequential logic synthesis and formal verification - -# The ABC code itself is MIT-Modern-Variant. -# The bundled CUDD code is BSD-3-Clause. -# The bundled glucose code is MIT. -# The bundled minisat code is MIT. -# The bundled satoko code is BSD-2-Clause -License: MIT-Modern-Variant AND MIT AND BSD-2-Clause AND BSD-3-Clause -URL: https://people.eecs.berkeley.edu/~alanmi/abc/abc.htm -Source0: https://github.com/berkeley-abc/abc/archive/%{gittag}/%{name}-%{shorttag}.tar.gz -# Man page created by Jerry James using upstream text; hence, it is covered by -# the same copyright and license as the code. -Source1: %{name}.1 -# Fedora-specific patch: do not use the bundled libraries -Patch0: %{name}-bundlelib.patch -# Fedora-specific patch: build a shared library instead of a static library -Patch1: %{name}-sharedlib.patch -# Fix a minor header issue -Patch2: %{name}-header.patch -# Set an soname on the library -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 -# Do not pass NULL to fprintf -# https://github.com/berkeley-abc/abc/pull/194 -Patch6: %{name}-null-fprintf.patch -# Weaken an overzealous assert -# https://bitbucket.org/alanmi/abc/issue/27/assertion-failure-in-write_pla-command -Patch7: %{name}-weaken-assert.patch -# yosys aiger segfault (yosyshq downstream commit): -Patch8: abc-yosys-segfault.patch - -BuildRequires: cmake -BuildRequires: gcc-c++ -BuildRequires: make -BuildRequires: pkgconfig(bzip2) -BuildRequires: pkgconfig(readline) -BuildRequires: pkgconfig(zlib) - -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -%description -ABC is a growing software system for synthesis and verification of -binary sequential logic circuits appearing in synchronous hardware -designs. ABC combines scalable logic optimization based on And-Inverter -Graphs (AIGs), optimal-delay DAG-based technology mapping for look-up -tables and standard cells, and innovative algorithms for sequential -synthesis and verification. - -ABC provides an experimental implementation of these algorithms and a -programming environment for building similar applications. Future -development will focus on improving the algorithms and making most of -the packages stand-alone. This will allow the user to customize ABC for -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. 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 -# ABC includes a bundled and modified version of glucose (which version?) -Provides: bundled(glucose) -# ABC includes a bundled and modified version of minisat (which version?). -Provides: bundled(minisat2) -# ABC includes a bundled and modified version of satoko (which version?). -Provides: bundled(satoko) - -%description libs -This package contains the core functionality of ABC as a shared library. - -%package devel -Summary: Headers and libraries for developing with ABC -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -%description devel -Headers and libraries for developing applications that use ABC. - -%prep -%autosetup -p0 -n %{name}-%{gittag} - -# Do not use the bundled bzip2 or zlib libraries -rm -fr lib src/misc/{bzlib,zlib} - -# Set the version number in the man page -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='%{build_cflags} -DNDEBUG' -export CXXFLAGS='%{build_cxxflags} -DNDEBUG' -%ifarch s390x -CFLAGS="$CFLAGS -DEPD_BIG_ENDIAN" -CXXFLAGS="$CXXFLAGS -DEPD_BIG_ENDIAN" -%endif -export ABC_MAKE_VERBOSE=1 -export ABC_USE_STDINT_H=1 -%cmake -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES -%cmake_build - -%install -# %%cmake_install does not install anything. Install by hand. - -# Install the binary -cd %{_vpath_builddir} -mkdir -p %{buildroot}%{_bindir} -install -p -m 0755 %{name} %{buildroot}%{_bindir} - -# Install the library -mkdir -p %{buildroot}%{_libdir} -cp -pd lib%{name}.so* %{buildroot}%{_libdir} -cd - - -# Install the header files -cd src -mkdir -p %{buildroot}%{_includedir}/%{name} -tar -cf - $(find -O3 . -name \*.h) | \ - (cd %{buildroot}%{_includedir}/%{name}; tar -xf -) -cd - - -# Install the man page -mkdir -p %{buildroot}%{_mandir}/man1 -install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 - -%files -%doc README.md readmeaig -%{_bindir}/%{name} -%{_mandir}/man1/%{name}* - -%files libs -%license copyright.txt -%{_libdir}/lib%{name}.so.0* - -%files devel -%{_includedir}/%{name}/ -%{_libdir}/lib%{name}.so - -%changelog -* Sun Jul 30 2023 Gabriel Somlo - 1.01-40.git20230708 -- Apply patch from yosyshq to fix yosys FTBFS (#2226521) - -* Wed Jul 19 2023 Fedora Release Engineering - 1.01-39.git20230708 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jul 14 2023 Jerry James - 1.01-38.git20230708 -- Update to latest git snapshot -- Drop upstreamed patches: overflow, use-after-free - -* Wed Jan 18 2023 Fedora Release Engineering - 1.01-37.git20221229 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Jan 17 2023 Jerry James - 1.01-36.git20221229 -- Update to latest git snapshot -- Add -use-after-free, -null-fprintf, and -weaken-assert patches -- Minor spec file cleanups - -* Mon Aug 1 2022 Jerry James - 1.01-35.git20220731 -- Update to latest git snapshot -- Convert License field to SPDX - -* Wed Jul 20 2022 Fedora Release Engineering - 1.01-34.git20211229 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 19 2022 Fedora Release Engineering - 1.01-33.git20211229 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Jan 17 2022 Jerry James - 1.01-32.git20211229 -- Update to latest git snapshot -- Drop upstreamed -strict-aliasing patch - -* Wed Jul 21 2021 Fedora Release Engineering - 1.01-31.git20210328 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Mar 31 2021 Jerry James - 1.01-30.git20210328 -- Update to latest git snapshot -- Add patches: -strict-aliasing, -overflow -- Avoid bogus rpaths - -* Mon Jan 25 2021 Fedora Release Engineering - 1.01-29.git20201126 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Thu Nov 26 2020 Gabriel Somlo - 1.01-28.git20201126 -- Update to latest git snapshot - -* 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 - -* Fri Jan 31 2020 Gabriel Somlo - 1.01-26.git20200127 -- Update to latest git snapshot - -* Tue Jan 28 2020 Fedora Release Engineering - 1.01-25.git20191217 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Dec 18 2019 Jerry James - 1.01-24.git20191217 -- Update to latest git snapshot -- Add -giaDeep patch to fix build failure - -* Wed Jul 24 2019 Fedora Release Engineering - 1.01-23.git20190608 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Jun 12 2019 Jerry James - 1.01-22.git20190608 -- Update to latest git snapshot -- Add -build and -format patches -- Build with cmake -- Enable CUDD support - -* Sun Feb 17 2019 Igor Gnatenko - 1.01-21.git20181121 -- Rebuild for readline 8.0 - -* Thu Jan 31 2019 Fedora Release Engineering - 1.01-20.git20181121 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Nov 26 2018 Jerry James - 1.01-19.git20181121 -- Update to latest git snapshot - -* Thu Jul 12 2018 Fedora Release Engineering - 1.01-18.git20180708 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jul 10 2018 Jerry James - 1.01-17.git20180708 -- Update to latest git snapshot - -* Sat Mar 3 2018 Jerry James - 1.01-16.hg20180228 -- Update to latest mercurial snapshot -- BR gcc-c++ instead of gcc - -* Wed Feb 07 2018 Fedora Release Engineering - 1.01-15.hg20180129 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Fri Feb 2 2018 Jerry James - 1.01-14.hg20180129 -- Update to latest mercurial snapshot - -* Wed Aug 02 2017 Fedora Release Engineering - 1.01-13.hg20160905 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.01-12.hg20160905 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1.01-11.hg20160905 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 12 2017 Igor Gnatenko - 1.01-10.hg20160905 -- Rebuild for readline 7.x - -* Sat Sep 10 2016 Eric Smith - 1.01-9.hg20160905 -- Update to latest mercurial snapshot - -* Fri Feb 5 2016 Jerry James - 1.01-8.hg20160203 -- Update to latest mercurial snapshot -- Drop the python2 subpackage; upstream moved support to a separate project - -* Wed Feb 03 2016 Fedora Release Engineering - 1.01-7.hg20150306 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jun 16 2015 Fedora Release Engineering - 1.01-6.hg20150306 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat May 02 2015 Kalev Lember - 1.01-5.hg20150306 -- Rebuilt for GCC 5 C++11 ABI change - -* Sat Mar 7 2015 Jerry James - 1.01-4.hg20150306 -- Update to latest mercurial snapshot - -* Thu Jan 1 2015 Jerry James - 1.01-3.hg20150101 -- Update to latest mercurial snapshot -- Fix installation of header files - -* Wed Dec 3 2014 Jerry James - 1.01-2.hg20141130 -- Drop unnecessary jquery Provides -- Fix file permissions - -* Mon Dec 1 2014 Jerry James - 1.01-1.hg20141130 -- Initial RPM diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..581d82a --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Superseded by yosyshq-abc diff --git a/sources b/sources deleted file mode 100644 index d6e0d0c..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (abc-e61194b.tar.gz) = cd8b524b90f543ed1f6ecb6597ebedd78b7a6c0c8e65c078d655b213f1752397fdab111be3eb6828c3a758782127d0abe60cfe2729358d3bef8f97b17bfebe90