From c91e3eb75bce6ae003dc638f7f4235adbaad076f Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 16 Jun 2012 19:19:14 +0000 Subject: [PATCH] Unbreak compat. --- lib/csu/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/csu/Makefile b/lib/csu/Makefile index 4e042c58e37d..149742fca843 100644 --- a/lib/csu/Makefile +++ b/lib/csu/Makefile @@ -1,17 +1,23 @@ -# $NetBSD: Makefile,v 1.30 2012/06/16 18:19:39 joerg Exp $ +# $NetBSD: Makefile,v 1.31 2012/06/16 19:19:14 joerg Exp $ .include .if ${USE_COMPILERCRTSTUFF} != "yes" -.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc) -ARCHDIR:= ${.CURDIR}/arch/${MACHINE_ARCH} +.if defined(CSU_MACHINE_ARCH) +. if !exists(${.CURDIR}/arch/${CSU_MACHINE_ARCH}/Makefile.inc) +. error CSU_MACHINE_ARCH (${CSU_MACHINE_ARCH}) is unsupported +. endif +.elif exists(${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc) +CSU_MACHINE_ARCH= ${MACHINE_ARCH} .elif exists(${.CURDIR}/arch/${MACHINE_CPU}/Makefile.inc) -ARCHDIR:= ${.CURDIR}/arch/${MACHINE_CPU} +CSU_MACHINE_ARCH= ${MACHINE_CPU} .else .error Architecture (${MACHINE_ARCH} or ${MACHINE_CPU}) unsupported .endif +ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_ARCH} + .PATH: ${ARCHDIR} . include "${ARCHDIR}/Makefile.inc"