This problem block mod-gnutls from building on arm64, and is one of the problems
blocking mod-gnutls from entering testing.  This is a problem for
freedombox-setup, which need mod-gnutls.

[Artur Rona]
> In Ubuntu, we've applied the attached patch to achieve the following:
> 
>     - debian/patches/remove-64bit-check.diff:
>       + Remove the check for -m64, not needed for package builds.
>     - debian/rules:
>       + Don't use unrecognized build flags on aarch64, resolving FTBFS

I suggest a different approach, where the macro is rewritten to first check if
the build is already 64bit, and if not, try with -m64 using this patch:

--- softhsm-1.3.7.orig/m4/acx_64bit.m4
+++ softhsm-1.3.7/m4/acx_64bit.m4
@@ -8,6 +8,10 @@ AC_DEFUN([ACX_64BIT],[
        if test "x$enable_64bit" = "xyes"
        then
                AC_MSG_CHECKING(if we can compile in 64-bit mode)
+                AC_RUN_IFELSE(
+                        [
+                               AC_LANG_PROGRAM([],[return sizeof(void*) == 8 ? 
0 : 1;])
+                        ], [], [
                tmp_CFLAGS=$CFLAGS
                CFLAGS="-m64"
                AC_RUN_IFELSE(
@@ -24,6 +28,7 @@ AC_DEFUN([ACX_64BIT],[
                                CFLAGS=$tmp_CFLAGS
                        ]
                )
+                ])
        fi
 
 ])

Note, the patch did not change the indentation of unrelated code.  This should
be done if the change is merged upstream, for consistent indentation.

I didn't change the indenation to make the patch easier to read.

-- 
Happy hacking
Petter Reinholdtsen

Reply via email to