[berkeley-abc] 01/01: Applying patches for jessie version of berkeley-abc

Ruben Undheim rubund-guest at moszumanska.debian.org
Sun Apr 5 07:46:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to branch master-jessie
in repository berkeley-abc.

commit 44e65a7e09eef337cbb9e72101a772f6ed5cf307
Author: Ruben Undheim <ruben.undheim at gmail.com>
Date:   Sun Apr 5 09:45:56 2015 +0200

    Applying patches for jessie version of berkeley-abc
---
 debian/patches/04_memory_alignment_fix.patch | 55 ++++++++++++++++++++++++++++
 debian/patches/abc-bugfix-20150403.diff      | 15 ++++++++
 debian/patches/reproducibility.patch         | 29 +++++++++++++++
 debian/patches/series                        |  4 ++
 debian/patches/writepla.patch                | 17 +++++++++
 5 files changed, 120 insertions(+)

diff --git a/debian/patches/04_memory_alignment_fix.patch b/debian/patches/04_memory_alignment_fix.patch
new file mode 100644
index 0000000..e1ba8d5
--- /dev/null
+++ b/debian/patches/04_memory_alignment_fix.patch
@@ -0,0 +1,55 @@
+Description: Backporting a fix which causes crashes on certain architectures.
+ There were some memory alignment problems
+Author: Clifford Wolf <clifford at clifford.at>
+Forwarded: Came from upstream - therefore no need
+Index: berkeley-abc/Makefile
+===================================================================
+--- berkeley-abc.orig/Makefile	2015-02-10 23:23:32.700004407 +0100
++++ berkeley-abc/Makefile	2015-02-10 23:24:35.040004937 +0100
+@@ -45,6 +45,9 @@
+ OPTFLAGS  ?= -g -O #-DABC_NAMESPACE=xxx
+ 
+ CFLAGS   += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(OPTFLAGS) $(ARCHFLAGS) -Isrc
++ifneq ($(findstring arm,$(shell uname -m)),)
++	CFLAGS += -DABC_MEMALIGN=4
++endif
+ 
+ # Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
+ ifneq ($(or $(findstring gcc,$(CC)),$(findstring g++,$(CC))),)
+Index: berkeley-abc/src/aig/aig/aigMem.c
+===================================================================
+--- berkeley-abc.orig/src/aig/aig/aigMem.c	2015-02-10 23:19:40.828002437 +0100
++++ berkeley-abc/src/aig/aig/aigMem.c	2015-02-10 23:26:39.164005992 +0100
+@@ -161,6 +161,10 @@
+ char * Aig_MmFixedEntryFetch( Aig_MmFixed_t * p )
+ {
+     char * pTemp;
++#ifdef ABC_MEMALIGN
++    // extend size to max alignment
++    nBytes += (ABC_MEMALIGN - nBytes % ABC_MEMALIGN) % ABC_MEMALIGN;
++#endif
+     int i;
+ 
+     // check if there are still free entries
+@@ -535,6 +539,10 @@
+ {
+     if ( nBytes == 0 )
+         return NULL;
++#ifdef ABC_MEMALIGN
++    // extend size to max alignment
++    nBytes += (ABC_MEMALIGN - nBytes % ABC_MEMALIGN) % ABC_MEMALIGN;
++#endif
+     if ( nBytes > p->nMapSize )
+     {
+         if ( p->nChunks == p->nChunksAlloc )
+@@ -564,6 +572,10 @@
+ {
+     if ( nBytes == 0 )
+         return;
++#ifdef ABC_MEMALIGN
++    // extend size to max alignment
++    nBytes += (ABC_MEMALIGN - nBytes % ABC_MEMALIGN) % ABC_MEMALIGN;
++#endif
+     if ( nBytes > p->nMapSize )
+     {
+ //        ABC_FREE( pEntry );
diff --git a/debian/patches/abc-bugfix-20150403.diff b/debian/patches/abc-bugfix-20150403.diff
new file mode 100644
index 0000000..3c2125e
--- /dev/null
+++ b/debian/patches/abc-bugfix-20150403.diff
@@ -0,0 +1,15 @@
+Comment: Fixes a segfault seen on Ubuntu 15.04
+Author: Clifford Wolf <clifford at clifford.at> 
+Index: berkeley-abc/src/opt/ret/retIncrem.c
+===================================================================
+--- berkeley-abc.orig/src/opt/ret/retIncrem.c	2015-04-03 18:36:00.361381237 +0200
++++ berkeley-abc/src/opt/ret/retIncrem.c	2015-04-03 18:36:00.357383236 +0200
+@@ -176,7 +176,7 @@
+         {
+             // this is an old latch 
+             // get its number in the original order
+-            if ( ! st__lookup( tLatches, (char *)pLatch, (char **)&Index ) )
++            if ( ! st__lookup_int( tLatches, (char *)pLatch, &Index ) )
+             {
+                 printf( "Abc_NtkRetimeFinalizeLatches(): Internal error.\n" );
+                 return 0;
diff --git a/debian/patches/reproducibility.patch b/debian/patches/reproducibility.patch
new file mode 100644
index 0000000..8423b4e
--- /dev/null
+++ b/debian/patches/reproducibility.patch
@@ -0,0 +1,29 @@
+Description: Remove the __TIME__ etc macros
+ Otherwise the debian package checking complains...
+Author: Johann Klammer <klammerj at a1.net>
+Index: berkeley-abc/src/base/cmd/cmdUtils.c
+===================================================================
+--- berkeley-abc.orig/src/base/cmd/cmdUtils.c	2015-04-05 09:43:08.347781769 +0200
++++ berkeley-abc/src/base/cmd/cmdUtils.c	2015-04-05 09:43:08.343781769 +0200
+@@ -581,7 +581,7 @@
+     nColumns = 79 / (LenghtMax + 2);
+ 
+     // print the starting message 
+-    fprintf( pAbc->Out, "      Welcome to ABC compiled on %s %s!", __DATE__, __TIME__ );
++    fprintf( pAbc->Out, "      Welcome to ABC!");
+ 
+     // print the command by group
+     sGroupCur = NULL;
+Index: berkeley-abc/src/base/main/mainUtils.c
+===================================================================
+--- berkeley-abc.orig/src/base/main/mainUtils.c	2015-04-05 09:43:08.347781769 +0200
++++ berkeley-abc/src/base/main/mainUtils.c	2015-04-05 09:43:08.343781769 +0200
+@@ -52,7 +52,7 @@
+ char * Abc_UtilsGetVersion( Abc_Frame_t * pAbc )
+ {
+     static char Version[1000];
+-    sprintf(Version, "%s (compiled %s %s)", ABC_VERSION, __DATE__, __TIME__);
++    sprintf(Version, "%s", ABC_VERSION);
+     return Version;
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 94981b3..ad702a2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,7 @@
 remove_bzlib_convenience.patch
 remove_zlib_convenience.patch
 cflags_ldflags.patch
+04_memory_alignment_fix.patch
+reproducibility.patch
+writepla.patch
+abc-bugfix-20150403.diff
diff --git a/debian/patches/writepla.patch b/debian/patches/writepla.patch
new file mode 100644
index 0000000..068173b
--- /dev/null
+++ b/debian/patches/writepla.patch
@@ -0,0 +1,17 @@
+Description: soften an overzealous assert
+ otherwise the abc will refuse to output trivial functions(constant 1 or 0).
+Forwarded: https://bitbucket.org/alanmi/abc/issue/27/assertion-failure-in-write_pla-command
+Author: Johann Klammer <klammerj at a1.net>
+Index: berkeley-abc/src/base/io/ioWritePla.c
+===================================================================
+--- berkeley-abc.orig/src/base/io/ioWritePla.c	2015-03-31 17:11:10.153821268 +0200
++++ berkeley-abc/src/base/io/ioWritePla.c	2015-03-31 17:11:10.149821268 +0200
+@@ -50,7 +50,7 @@
+     FILE * pFile;
+ 
+     assert( Abc_NtkIsSopNetlist(pNtk) );
+-    assert( Abc_NtkLevel(pNtk) == 1 );
++    assert( Abc_NtkLevel(pNtk) <= 1 );
+ 
+     pFile = fopen( pFileName, "w" );
+     if ( pFile == NULL )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/berkeley-abc.git



More information about the debian-science-commits mailing list