Package: src:ffcall
Version: 1.10+cvs20100619-4
Severity: normal
Tags: patch pending

Dear maintainer,

I've prepared diff for a NMU for ffcall (versioned as 1.13-0+nmu1) in the
attached patch but feel free to use the patch as you want.
The goal was initially to fix the FTBFS impacting mlpcap on ppc64el
https://buildd.debian.org/status/fetch.php?pkg=mlpcap&arch=ppc64el&ver=0.9-16&stamp=1485552538&raw=0

config.log would show :
configure:4214: gcc -o conftest -g -O2 
-fdebug-prefix-map=/build/mlpcap-gmmM7n/mlpcap-0.9=. -fstack-protector-strong 
-Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2 
-Wl,-z,relro conftest.
c -lcallback  -lpcap  >&5
/usr/lib/gcc/powerpc64le-linux-gnu/6/../../../powerpc64le-linux-gnu/libcallback.so:
 undefined reference to `tramp_r'

But this upload could fix other bugs as well.

Looking at ffcal upstream, I see that there a much newer version of ffcall 
namely
1.13 which contains amongst other ppc64el improvements which fixed the build
of mlpcap (tested).
I tried to change the bare minimum of the packaging so that we have something 
close
to 1.10+cvs20100619-4 but still building. Here are the changes I made :
debian/patches : I've updated fix-powerpcspe.patch, and Fix_MIPS_N32_test.patch 
: please
                 review them.
                 I've disabled ppc64el-elfv2.patch as ppc64el support should be 
good in 1.13.
                 I've also commented 0001-fix-callback-on-x86_64.patch as it 
should be
                 fixed upstream : 
https://www.bountysource.com/issues/20684153-segfault
debian/rules :   autoreconf failed as is, so I added gnulib-m4 to aclocal path 
and removed
                 skipping of libtoolize.
debian/libffcall1.symbols : some symbols seem local (__*) so no need to check 
them I
                 think. There were some new additions.
debian/watch :   I updated the repo URL which seemed to not work anymore at all 
(server not found)

I hope that helps, let me know if things need to be improved.

Regards.

diff -baupr ./ffcall-1.10+cvs20100619/debian/changelog 
./ffcall-1.13/debian/changelog
--- ./ffcall-1.10+cvs20100619/debian/changelog  2016-05-18 15:38:55.000000000 
+0000
+++ ./ffcall-1.13/debian/changelog      2017-07-10 13:12:33.342511211 +0000
@@ -1,3 +1,10 @@
+ffcall (1.13-0+nmu1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release.
+
+ -- Frédéric Bonnard <[email protected]>  Mon, 03 Jul 2017 13:00:38 
+0000
+
 ffcall (1.10+cvs20100619-4) unstable; urgency=medium
 
   [ Fernando Seiti Furusato ]
diff -baupr ./ffcall-1.10+cvs20100619/debian/libffcall1.symbols 
./ffcall-1.13/debian/libffcall1.symbols
--- ./ffcall-1.10+cvs20100619/debian/libffcall1.symbols 2016-05-18 
15:38:55.000000000 +0000
+++ ./ffcall-1.13/debian/libffcall1.symbols     2017-07-10 13:16:18.175743648 
+0000
@@ -1,16 +1,17 @@
 libavcall.so.0 libffcall1 #MINVER#
  __builtin_avcall@Base 1.10+2.41
- __structcpy@Base 1.10+2.41
+ avcall_structcpy@Base 1.13
 libcallback.so.0 libffcall1 #MINVER#
  (arch=alpha arm powerpc armel hppa)__TR_clear_cache@Base 1.10+2.41
+ (arch=ppc64el)__TR_clear_cache@Base 1.13
  (arch=sparc)__TR_clear_cache_2@Base 1.10+2.41
- __structcpy@Base 1.10+2.41
- __va_error1@Base 1.10+2.41
- __va_error2@Base 1.10+2.41
- __va_struct_buffer@Base 1.10+2.41
- __vacall_r@Base 1.10+2.41
+ callback_structcpy@Base 1.13
  alloc_trampoline_r@Base 1.10+2.41
  free_trampoline_r@Base 1.10+2.41
+ get__vacall_r@Base 1.13
+ glthread_once_singlethreaded@Base 1.13
+ glthread_recursive_lock_init_multithreaded@Base 1.13
+ glthread_rwlock_init_for_glibc@Base 1.13
  is_trampoline_r@Base 1.10+2.41
  (arch=hppa ia64)tramp_r@Base 1.10+2.41
  trampoline_r_address@Base 1.10+2.41
Only in ./ffcall-1.10+cvs20100619/debian/patches: 
0001-fix-callback-on-x86_64.patch
diff -baupr ./ffcall-1.10+cvs20100619/debian/patches/Fix_MIPS_N32_test.patch 
./ffcall-1.13/debian/patches/Fix_MIPS_N32_test.patch
--- ./ffcall-1.10+cvs20100619/debian/patches/Fix_MIPS_N32_test.patch    
2016-05-18 15:38:55.000000000 +0000
+++ ./ffcall-1.13/debian/patches/Fix_MIPS_N32_test.patch        2017-07-10 
15:26:44.740188692 +0000
@@ -2,18 +2,79 @@ Description: Fix MIPS N32 test
 Author: James Cowgill <[email protected]>
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/m4/general.m4
-+++ b/m4/general.m4
-@@ -97,11 +97,8 @@ dnl We should also check for (_MIPS_SZPT
-     if test $ffcall_cv_host_mips64 = yes; then
-       host_cpu_abi=mips64
-     else
--dnl Strictly speaking, the MIPS ABI (-32 or -n32) is independent from the CPU
--dnl identification (-mips[12] or -mips[34]). But -n32 is commonly used 
together
--dnl with -mips3, and it's easier to test the CPU identification.
-       FFCALL_SET_CPU_ABI([MIPS with n32 ABI], ffcall_cv_host_mipsn32,
--        [__mips >= 3], mipsn32, mips)
-+        [defined(_ABIN32) && (_MIPS_SIM == _ABIN32)], mipsn32, mips)
-     fi
-     ;;
- dnl On powerpc64 systems, the C compiler may still be generating 32-bit code.
+Index: ffcall-1.13/gnulib-m4/host-cpu-c-abi.m4
+===================================================================
+--- ffcall-1.13.orig/gnulib-m4/host-cpu-c-abi.m4       2017-06-24 
08:48:11.000000000 +0000
++++ ffcall-1.13/gnulib-m4/host-cpu-c-abi.m4    2017-07-10 14:25:16.832623738 
+0000
+@@ -151,7 +151,7 @@
+             # is commonly used together with -mips3, and it's easier to test
+             # the CPU identification.
+             AC_EGREP_CPP([yes],
+-              [#if __mips >= 3
++              [#if defined(_ABIN32) && (_MIPS_SIM == _ABIN32)
+                yes
+                #endif],
+               [gl_cv_host_cpu_c_abi=mipsn32],
+Index: ffcall-1.13/avcall/avcall-mipseb-macro.S
+===================================================================
+--- ffcall-1.13.orig/avcall/avcall-mipseb-macro.S      2017-06-24 
08:48:01.000000000 +0000
++++ ffcall-1.13/avcall/avcall-mipseb-macro.S   2017-07-10 14:51:56.722057946 
+0000
+@@ -387,7 +387,7 @@
+       .set    noreorder
+       .set    nomacro
+       b       $L14
+-      swc1    $f1,0($2)
++      swc1    $f2,0($2)
+       .set    macro
+       .set    reorder
+ 
+Index: ffcall-1.13/vacall/vacall-mipseb-macro.S
+===================================================================
+--- ffcall-1.13.orig/vacall/vacall-mipseb-macro.S      2017-06-24 
08:48:04.000000000 +0000
++++ ffcall-1.13/vacall/vacall-mipseb-macro.S   2017-07-10 15:15:03.039530179 
+0000
+@@ -28,9 +28,9 @@
+       sw      $6,104($fp)
+       sw      $7,108($fp)
+       swc1    $f12,76($fp)
+-      swc1    $f13,72($fp)
++      swc1    $f26,72($fp)
+       swc1    $f14,84($fp)
+-      swc1    $f15,80($fp)
++      swc1    $f30,80($fp)
+       swc1    $f12,64($fp)
+       swc1    $f14,68($fp)
+       sw      $0,24($fp)
+@@ -231,7 +231,7 @@
+ 
+ $L51:
+       lwc1    $f0,52($fp)
+-      lwc1    $f1,48($fp)
++      lwc1    $f2,48($fp)
+       .set    noreorder
+       .set    nomacro
+       b       $L54
+Index: ffcall-1.13/callback/vacall_r/vacall-mipseb-macro.S
+===================================================================
+--- ffcall-1.13.orig/callback/vacall_r/vacall-mipseb-macro.S   2017-06-24 
08:48:05.000000000 +0000
++++ ffcall-1.13/callback/vacall_r/vacall-mipseb-macro.S        2017-07-10 
15:26:41.704116740 +0000
+@@ -29,9 +29,9 @@
+       addiu   $5,$fp,24
+       sw      $7,108($fp)
+       swc1    $f12,76($fp)
+-      swc1    $f13,72($fp)
++      swc1    $f26,72($fp)
+       swc1    $f14,84($fp)
+-      swc1    $f15,80($fp)
++      swc1    $f30,80($fp)
+       swc1    $f12,64($fp)
+       swc1    $f14,68($fp)
+       sw      $0,24($fp)
+@@ -230,7 +230,7 @@
+ 
+ $L51:
+       lwc1    $f0,52($fp)
+-      lwc1    $f1,48($fp)
++      lwc1    $f2,48($fp)
+       .set    noreorder
+       .set    nomacro
+       b       $L54
diff -baupr ./ffcall-1.10+cvs20100619/debian/patches/fix-powerpcspe.patch 
./ffcall-1.13/debian/patches/fix-powerpcspe.patch
--- ./ffcall-1.10+cvs20100619/debian/patches/fix-powerpcspe.patch       
2016-05-18 15:38:55.000000000 +0000
+++ ./ffcall-1.13/debian/patches/fix-powerpcspe.patch   2017-07-10 
12:02:02.138172476 +0000
@@ -1,15 +1,19 @@
---- ffcall-1.10+cvs20100619.orig/avcall/Makefile.in
-+++ ffcall-1.10+cvs20100619/avcall/Makefile.in
-@@ -127,6 +127,7 @@ avcall-powerpc.lo : $(srcdir)/avcall-pow
+Index: ffcall-1.13/avcall/Makefile.in
+===================================================================
+--- ffcall-1.13.orig/avcall/Makefile.in        2017-07-10 11:57:09.259329724 
+0000
++++ ffcall-1.13/avcall/Makefile.in     2017-07-10 11:59:28.642585519 +0000
+@@ -140,6 +140,7 @@
+ avcall-powerpc.s : $(srcdir)/avcall-powerpc-aix.s 
$(srcdir)/avcall-powerpc-linux-macro.S $(srcdir)/avcall-powerpc-macos.s 
$(srcdir)/avcall-powerpc-sysv4-macro.S
        case "$(OS)" in \
-         aix3*) syntax=aix.old;; \
-         aix*) syntax=aix.new;; \
+         aix*) syntax=aix;; \
 +        linux-gnuspe) syntax=linux-gnuspe;; \
-         linux* | netbsd*) syntax=linux;; \
+         linux* | netbsd* | openbsd*) syntax=linux;; \
          macos* | darwin*) syntax=macos;; \
          *) syntax=sysv4;; \
---- /dev/null
-+++ ffcall-1.10+cvs20100619/avcall/avcall-powerpc-linux-gnuspe.s
+Index: ffcall-1.13/avcall/avcall-powerpc-linux-gnuspe.s
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ ffcall-1.13/avcall/avcall-powerpc-linux-gnuspe.s   2017-07-10 
11:57:09.255329630 +0000
 @@ -0,0 +1,241 @@
 +      .file   "avcall-powerpc.c"
 +gcc2_compiled.:
@@ -252,8 +256,10 @@
 +.Lfe1:
 +      .size    __builtin_avcall,.Lfe1-__builtin_avcall
 +      .ident  "GCC: (GNU) 2.95.2 19991024 (release/franzo)"
---- /dev/null
-+++ ffcall-1.10+cvs20100619/vacall/vacall-powerpc-linux-gnuspe.s
+Index: ffcall-1.13/vacall/vacall-powerpc-linux-gnuspe.s
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ ffcall-1.13/vacall/vacall-powerpc-linux-gnuspe.s   2017-07-10 
11:57:09.255329630 +0000
 @@ -0,0 +1,149 @@
 +      .file   "vacall-powerpc.c"
 +gcc2_compiled.:
@@ -404,18 +410,10 @@
 +.Lfe1:
 +      .size    __vacall,.Lfe1-__vacall
 +      .ident  "GCC: (GNU) 2.95.2 19991024 (release/franzo)"
---- ffcall-1.10+cvs20100619.orig/vacall/Makefile.in
-+++ ffcall-1.10+cvs20100619/vacall/Makefile.in
-@@ -115,6 +115,7 @@ vacall-powerpc.o : $(srcdir)/vacall-powe
-       case "$(OS)" in \
-         aix3*) syntax=aix.old;; \
-         aix*) syntax=aix.new;; \
-+        linux-gnuspe) syntax=linux-gnuspe;; \
-         linux* | netbsd*) syntax=linux;; \
-         macos* | darwin*) syntax=macos;; \
-         *) syntax=sysv4;; \
---- /dev/null
-+++ ffcall-1.10+cvs20100619/callback/vacall_r/vacall-powerpc-linux-gnuspe.s
+Index: ffcall-1.13/callback/vacall_r/vacall-powerpc-linux-gnuspe.s
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ ffcall-1.13/callback/vacall_r/vacall-powerpc-linux-gnuspe.s        
2017-07-10 11:57:09.259329724 +0000
 @@ -0,0 +1,149 @@
 +      .file   "vacall-powerpc.c"
 +gcc2_compiled.:
@@ -566,13 +564,27 @@
 +.Lfe1:
 +      .size    __vacall_r,.Lfe1-__vacall_r
 +      .ident  "GCC: (GNU) 2.95.2 19991024 (release/franzo)"
---- ffcall-1.10+cvs20100619.orig/callback/vacall_r/Makefile.in
-+++ ffcall-1.10+cvs20100619/callback/vacall_r/Makefile.in
-@@ -128,6 +128,7 @@ vacall-powerpc.lo : $(srcdir)/vacall-pow
+Index: ffcall-1.13/callback/vacall_r/Makefile.in
+===================================================================
+--- ffcall-1.13.orig/callback/vacall_r/Makefile.in     2017-07-10 
11:57:09.259329724 +0000
++++ ffcall-1.13/callback/vacall_r/Makefile.in  2017-07-10 12:01:59.450109643 
+0000
+@@ -140,6 +140,7 @@
+ vacall-powerpc.s : $(srcdir)/vacall-powerpc-aix.s 
$(srcdir)/vacall-powerpc-linux-macro.S $(srcdir)/vacall-powerpc-macos.s 
$(srcdir)/vacall-powerpc-sysv4-macro.S
        case "$(OS)" in \
-         aix3*) syntax=aix.old;; \
-         aix*) syntax=aix.new;; \
+         aix*) syntax=aix;; \
 +        linux-gnuspe) syntax=linux-gnuspe;; \
-         linux*) syntax=linux;; \
+         linux* | netbsd* | openbsd*) syntax=linux;; \
          macos* | darwin*) syntax=macos;; \
-         netbsd*) syntax=netbsd;; \
+         *) syntax=sysv4;; \
+Index: ffcall-1.13/vacall/Makefile.in
+===================================================================
+--- ffcall-1.13.orig/vacall/Makefile.in        2017-07-10 11:57:09.259329724 
+0000
++++ ffcall-1.13/vacall/Makefile.in     2017-07-10 12:00:05.635450045 +0000
+@@ -131,6 +131,7 @@
+ vacall-powerpc.s : $(srcdir)/vacall-powerpc-aix.s 
$(srcdir)/vacall-powerpc-linux-macro.S $(srcdir)/vacall-powerpc-macos.s 
$(srcdir)/vacall-powerpc-sysv4-macro.S
+       case "$(OS)" in \
+         aix*) syntax=aix;; \
++        linux-gnuspe) syntax=linux-gnuspe;; \
+         linux* | netbsd* | openbsd*) syntax=linux;; \
+         macos* | darwin*) syntax=macos;; \
+         *) syntax=sysv4;; \
Only in ./ffcall-1.10+cvs20100619/debian/patches: ppc64el-elfv2.patch
diff -baupr ./ffcall-1.10+cvs20100619/debian/patches/series 
./ffcall-1.13/debian/patches/series
--- ./ffcall-1.10+cvs20100619/debian/patches/series     2016-05-18 
15:38:55.000000000 +0000
+++ ./ffcall-1.13/debian/patches/series 2017-07-11 09:06:20.857225454 +0000
@@ -1,4 +1,2 @@
 fix-powerpcspe.patch
-0001-fix-callback-on-x86_64.patch
-ppc64el-elfv2.patch
 Fix_MIPS_N32_test.patch
diff -baupr ./ffcall-1.10+cvs20100619/debian/rules ./ffcall-1.13/debian/rules
--- ./ffcall-1.10+cvs20100619/debian/rules      2017-07-03 12:35:49.321873014 
+0000
+++ ./ffcall-1.13/debian/rules  2017-07-10 12:50:02.194715249 +0000
@@ -5,8 +5,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-export ACLOCAL = aclocal -I$(CURDIR)/m4
-export LIBTOOLIZE = true
+export ACLOCAL = aclocal -I$(CURDIR)/m4 -I$(CURDIR)/gnulib-m4
 export DEB_BUILD_MAINT_OPTIONS = hardening=-all
 
 %:
diff -baupr ./ffcall-1.10+cvs20100619/debian/watch ./ffcall-1.13/debian/watch
--- ./ffcall-1.10+cvs20100619/debian/watch      2017-07-11 09:17:00.067952436 
+0000
+++ ./ffcall-1.13/debian/watch  2017-07-11 09:16:52.435776370 +0000
@@ -1,2 +1,2 @@
 version=2
-ftp://ftp.santafe.edu/pub/gnu/ffcall-(.*).tar.gz
+https://ftp.gnu.org/gnu/libffcall/libffcall-(.*).tar.gz

Attachment: pgpsrNdUacuJg.pgp
Description: PGP signature

Reply via email to