guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: libffi: Fix builds on Alpha.


From: Ludovic Courtès
Subject: 02/02: gnu: libffi: Fix builds on Alpha.
Date: Thu, 13 Apr 2017 08:50:32 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit dc4ebebd61896b1122fde97644325d06e3f46b47
Author: Sergei Trofimovich <address@hidden>
Date:   Mon Mar 6 22:21:43 2017 +0000

    gnu: libffi: Fix builds on Alpha.
    
    * gnu/packages/patches/libffi-3.2.1-complex_alpha.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/libffi.scm (libffi)[source]: Use it.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/libffi.scm                            |  3 ++-
 .../patches/libffi-3.2.1-complex-alpha.patch       | 28 ++++++++++++++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index d4ce243..51f92f0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -697,6 +697,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/libevent-2.1-skip-failing-test.patch    \
   %D%/packages/patches/libextractor-ffmpeg-3.patch             \
   %D%/packages/patches/libgit2-use-after-free.patch            \
+  %D%/packages/patches/libffi-3.2.1-complex-alpha.patch                \
   %D%/packages/patches/libjxr-fix-function-signature.patch     \
   %D%/packages/patches/libjxr-fix-typos.patch                  \
   %D%/packages/patches/liboop-mips64-deplibs-fix.patch         \
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 13938f7..16475af 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -42,7 +42,8 @@
                              name "-" version ".tar.gz"))
              (sha256
               (base32
-               "0dya49bnhianl0r65m65xndz6ls2jn1xngyn72gd28ls3n7bnvnh"))))
+               "0dya49bnhianl0r65m65xndz6ls2jn1xngyn72gd28ls3n7bnvnh"))
+             (patches (search-patches "libffi-3.2.1-complex-alpha.patch"))))
     (build-system gnu-build-system)
     (arguments `(#:phases (alist-cons-after 'install 'post-install
                                             ,post-install-phase
diff --git a/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch 
b/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch
new file mode 100644
index 0000000..ebbc063
--- /dev/null
+++ b/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch
@@ -0,0 +1,28 @@
+The patch fixes build failure of form:
+     ../src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"
+Upstream fixed the bug in a more invasive way
+but didn't have releases since 3.2.1.
+
+The patch is taken from Gentoo:
+https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch
+
+--- libffi-3.2.1/src/alpha/osf.S       2015-01-16 10:46:15.000000000 +0100
++++ libffi-3.2.1/src/alpha/osf.S       2015-01-16 10:46:24.000000000 +0100
+@@ -279,6 +279,7 @@
+       .gprel32 $load_64       # FFI_TYPE_SINT64
+       .gprel32 $load_none     # FFI_TYPE_STRUCT
+       .gprel32 $load_64       # FFI_TYPE_POINTER
++      .gprel32 $load_none     # FFI_TYPE_COMPLEX
+ 
+ /* Assert that the table above is in sync with ffi.h.  */
+ 
+@@ -294,7 +295,8 @@
+       || FFI_TYPE_SINT64 != 12        \
+       || FFI_TYPE_STRUCT != 13        \
+       || FFI_TYPE_POINTER != 14       \
+-      || FFI_TYPE_LAST != 14
++      || FFI_TYPE_COMPLEX != 15       \
++      || FFI_TYPE_LAST != 15
+ #error "osf.S out of sync with ffi.h"
+ #endif
+ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]