kumquat-buildroot/package/libgcrypt/libgcrypt.mk
Joel Stanley 5e2482678f package/libgcrypt: Fix powerpc64 build w/o optimisation
The following build failure was reported by the autobuilder:

powerpc64   |        libgcrypt-1.10.1        | NOK |
http://autobuild.buildroot.net/results/eb60bb95411076b92f5c63f9b21c6e576998031c | ORPH

This config is building with BR2_OPTIMIZE_0=y.

The code relies on the compiler turning the series of preprocessor
macros in to a constant for the second argument to vec_sld:

 chacha20-ppc.c:60:10: error: argument 3 must be a 4-bit unsigned literal
    60 |   return vec_sld (v, v, (16 - (4 * idx)) & 15);

The argument is a constant, but it would require a significant rework to
make this build without optimisation. Instead disable the vectorised
powerpc code when building with optimisation disabled.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-05 22:37:51 +02:00

35 lines
1.0 KiB
Makefile

################################################################################
#
# libgcrypt
#
################################################################################
LIBGCRYPT_VERSION = 1.10.1
LIBGCRYPT_SOURCE = libgcrypt-$(LIBGCRYPT_VERSION).tar.bz2
LIBGCRYPT_LICENSE = LGPL-2.1+
LIBGCRYPT_LICENSE_FILES = COPYING.LIB
LIBGCRYPT_SITE = https://gnupg.org/ftp/gcrypt/libgcrypt
LIBGCRYPT_INSTALL_STAGING = YES
LIBGCRYPT_DEPENDENCIES = libgpg-error
LIBGCRYPT_CONFIG_SCRIPTS = libgcrypt-config
LIBGCRYPT_CPE_ID_VENDOR = gnupg
# Patching configure.ac and Makefile.am in 0001
LIBGCRYPT_AUTORECONF = YES
LIBGCRYPT_CONF_OPTS = \
--disable-tests \
$(if $(BR2_OPTIMIZE_0),--disable-ppc-crypto-support,) \
--with-gpg-error-prefix=$(STAGING_DIR)/usr
# Libgcrypt doesn't support assembly for coldfire
ifeq ($(BR2_m68k_cf),y)
LIBGCRYPT_CONF_OPTS += --disable-asm
endif
# Code doesn't build in thumb mode
ifeq ($(BR2_arm),y)
LIBGCRYPT_CONF_ENV += CFLAGS="$(patsubst -mthumb,,$(TARGET_CFLAGS))"
endif
$(eval $(autotools-package))