Source: ffcall
Version: 2.1-2
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

ffcall fails to cross build from source, because there are three cases
where AC_TRY_RUN is used wrongly. The arguments for AC_TRY_RUN are:
1. program source
2. success code
3. failure code
4. cross compile code

In three cases, the third argument was skipped. That is evident from the
comments in the actual third argument hinting that the argument was
intended for cross compilation but actually got used for the failure
case. Inserting the missing failure case makes ffcall cross buildable.

Please consider applying the attached patch.

Helmut
--- ffcall-2.1.orig/m4/codeexec.m4
+++ ffcall-2.1/m4/codeexec.m4
@@ -177,6 +177,7 @@
                   }
                  ],
                  [ffcall_cv_malloc_mprotect_can_exec=yes],
+                 [ffcall_cv_malloc_mprotect_can_exec=no],
                  [dnl When cross-compiling, assume SELinux on Linux.
                   dnl If we don't know, assume the worst.
                   case "$host_os" in
@@ -267,6 +268,7 @@
                       }
                      ],
                      [ffcall_cv_mmap_mprotect_can_exec=yes],
+                     [ffcall_cv_mmap_mprotect_can_exec=no],
                      [dnl When cross-compiling, assume SELinux on Linux.
                       dnl If we don't know, assume the worst.
                       case "$host_os" in
@@ -339,6 +341,7 @@
                         }
                        ],
                        [ffcall_cv_mmap_shared_can_exec=yes],
+                       [ffcall_cv_mmap_shared_can_exec=no],
                        [dnl When cross-compiling, assume yes, since this is the result
                         dnl on all the platforms where we have tested it.
                         ffcall_cv_mmap_shared_can_exec="guessing yes"

Reply via email to