From 7e7033d16e96f4c3226fead4820a01b1b32da275 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Tue, 7 Apr 2020 07:41:08 +0200 Subject: gnu: libgcrypt: Fix cross-compilation. This works around /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash ../libtool --tag=CC --mode=link i586-pc-gnu-gcc -I/gnu/store/8x9dhckldm6iy1digklfanmvdaizq11f-libgpg-error-1.37/include -g -O2 -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -o mpicalc mpicalc-mpicalc.o libgcrypt.la -L/gnu/store/8x9dhckldm6iy1digklfanmvdaizq11f-libgpg-error-1.37/lib -lgpg-error i586-pc-gnu-ld: ./.libs/libgcrypt.so: undefined reference to `_gcry_mpih_lshift' i586-pc-gnu-ld: ./.libs/libgcrypt.so: undefined reference to `_gcry_mpih_add_n' i586-pc-gnu-ld: ./.libs/libgcrypt.so: undefined reference to `_gcry_mpih_addmul_1' i586-pc-gnu-ld: ./.libs/libgcrypt.so: undefined reference to `_gcry_mpih_submul_1' i586-pc-gnu-ld: ./.libs/libgcrypt.so: undefined reference to `_gcry_mpih_mul_1' i586-pc-gnu-ld: ./.libs/libgcrypt.so: undefined reference to `_gcry_mpih_sub_n' i586-pc-gnu-ld: ./.libs/libgcrypt.so: undefined reference to `_gcry_mpih_rshift' * gnu/packages/gnupg.scm (libgcrypt)[arguments]: Disable assembly when cross-compiling. --- gnu/packages/gnupg.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 498a6a1a9a..298f18a8cc 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -148,7 +148,10 @@ Daemon and possibly more in the future.") ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one. `(#:configure-flags (list (string-append "--with-gpg-error-prefix=" - (assoc-ref %build-inputs "libgpg-error-host"))))) + (assoc-ref %build-inputs "libgpg-error-host")) + ;; When cross-compiling, _gcry_mpih_lshift etc are undefined + ,@(if (%current-target-system) '("--disable-asm") + '())))) (outputs '("out" "debug")) (home-page "https://gnupg.org/") (synopsis "Cryptographic function library") -- cgit v1.2.3