From 6618efcaf447706638d81ea368885802c4b1b252 Mon Sep 17 00:00:00 2001 From: matt Date: Sun, 4 Aug 2013 23:37:54 +0000 Subject: [PATCH] If MACHINE_ARCH contains armv[467], use arm instead. --- external/lgpl3/gmp/lib/libgmp/Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/external/lgpl3/gmp/lib/libgmp/Makefile b/external/lgpl3/gmp/lib/libgmp/Makefile index 212b875cc3b3..de6783afeb15 100644 --- a/external/lgpl3/gmp/lib/libgmp/Makefile +++ b/external/lgpl3/gmp/lib/libgmp/Makefile @@ -1,10 +1,12 @@ -# $NetBSD: Makefile,v 1.14 2012/11/26 18:57:33 drochner Exp $ +# $NetBSD: Makefile,v 1.15 2013/08/04 23:37:54 matt Exp $ .include # We don't install gmp, just provide it for GCC. LIBISPRIVATE?= yes +LIBGMP_MACHINE_ARCH?= ${MACHINE_ARCH:C/armv[467]/arm/} + .if ${LIBISPRIVATE} != "yes" INCS= gmp.h INCSDIR= /usr/include @@ -145,7 +147,7 @@ CLEANFILES+= ${_dir}_${_srcfile} .endfor -CPPFLAGS+= -I. -I${DIST} -I${.CURDIR}/arch/${MACHINE_ARCH} -D__GMP_WITHIN_GMP -DHAVE_CONFIG_H +CPPFLAGS+= -I. -I${DIST} -I${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH} -D__GMP_WITHIN_GMP -DHAVE_CONFIG_H WITHOUT_MAN= yes @@ -179,13 +181,14 @@ perfsqr.h: gen-psqr.c CLEANFILES+= ${DPSRCS} gen-fac_ui gen-fib gen-bases gen-psqr gen-trialdivtab -.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" + +.include "${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/Makefile.inc" # XXX stuff looks for "../config.m4" dummy: mkdir dummy -${.OBJDIR}/config.m4: ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 - cp ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4 +${.OBJDIR}/config.m4: ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/config.m4 + cp ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4 CLEANFILES+= config.m4 clean: cleandummy @@ -218,7 +221,7 @@ CLEANFILES+= mpn_${_build} .PATH: ${DIST} \ ${DIST}/mpn/generic \ - ${.CURDIR}/arch/${MACHINE_ARCH} \ + ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH} \ ${DIST}/mpf \ ${DIST}/mpz