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.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-04-07 07:41:08 +02:00 committed by Ludovic Courtès
parent 62a3bbfdfe
commit 7e7033d16e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -148,7 +148,10 @@ (define-public libgcrypt
;; 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")