Fix the following build failure with host gcc >= 14 which enables -Werror=implicit-function-declaration (https://gcc.gnu.org/gcc-14/porting_to.html): configure:9998: checking build system compiler /usr/bin/gcc configure:10011: /usr/bin/gcc conftest.c conftest.c: In function 'main': conftest.c:4:3: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 4 | exit(0); | ^~~~ conftest.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | int conftest.c:4:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 4 | exit(0); | ^~~~ conftest.c:4:3: note: include '<stdlib.h>' or provide a declaration of 'exit' configure:10014: $? = 1 configure:10021: result: no configure:10026: error: Specified CC_FOR_BUILD doesn't seem to work Fixes: - http://autobuild.buildroot.org/results/3ab381f06d5dc030039b6f6f8d19feb55cf3367d Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
46 lines
1.2 KiB
Makefile
46 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# mpir
|
|
#
|
|
################################################################################
|
|
|
|
MPIR_VERSION = 3.0.0
|
|
MPIR_SITE = http://www.mpir.org
|
|
MPIR_SOURCE = mpir-$(MPIR_VERSION).tar.bz2
|
|
MPIR_LICENSE = LGPL-3.0+
|
|
MPIR_LICENSE_FILES = COPYING.LIB
|
|
MPIR_INSTALL_STAGING = YES
|
|
MPIR_DEPENDENCIES = gmp host-yasm
|
|
# 0002-Fix-configure-failures-with-Xcode12.patch
|
|
MPIR_AUTORECONF = YES
|
|
|
|
ifeq ($(BR2_MIPS_NABI32),y)
|
|
MPIR_CONF_OPTS += ABI=n32
|
|
endif
|
|
|
|
ifeq ($(BR2_MIPS_NABI64),y)
|
|
MPIR_CONF_OPTS += ABI=64
|
|
endif
|
|
|
|
# The optimized ARM assembly code uses ARM-only (i.e not Thumb1/2
|
|
# compatible) instructions.
|
|
ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_ARM_CPU_HAS_ARM),y:)
|
|
MPIR_CONF_ENV += MPN_PATH="generic"
|
|
endif
|
|
|
|
# Optimized mips32/mips64 code not suitable for mips32r6/mips64r6
|
|
ifeq ($(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6),y)
|
|
MPIR_CONF_ENV += MPN_PATH="generic"
|
|
endif
|
|
|
|
# Optimized powerpc64 code is not suitable for powerpc64le
|
|
ifeq ($(BR2_powerpc64le),y)
|
|
MPIR_CONF_ENV += MPN_PATH="generic"
|
|
endif
|
|
|
|
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
|
|
MPIR_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|