Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu Allow USE_COMPILERCRTSTUFF=yes for platforms that us...



details:   https://anonhg.NetBSD.org/src/rev/e38423466315
branches:  trunk
changeset: 779762:e38423466315
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jun 16 18:19:39 2012 +0000

description:
Allow USE_COMPILERCRTSTUFF=yes for platforms that use MACHINE_CPU !=
MACHINE_ARCH.

diffstat:

 lib/csu/Makefile |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r e6eac77711fb -r e38423466315 lib/csu/Makefile
--- a/lib/csu/Makefile  Sat Jun 16 17:31:47 2012 +0000
+++ b/lib/csu/Makefile  Sat Jun 16 18:19:39 2012 +0000
@@ -1,12 +1,17 @@
-#      $NetBSD: Makefile,v 1.29 2011/01/31 17:54:20 drochner Exp $
+#      $NetBSD: Makefile,v 1.30 2012/06/16 18:19:39 joerg Exp $
 
 .include <bsd.own.mk>
 
-CSU_MACHINE_ARCH?=     ${MACHINE_ARCH}
-
 .if ${USE_COMPILERCRTSTUFF} != "yes"
 
-ARCHDIR:=      ${.CURDIR}/arch/${CSU_MACHINE_ARCH}
+.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc)
+ARCHDIR:=      ${.CURDIR}/arch/${MACHINE_ARCH}
+.elif exists(${.CURDIR}/arch/${MACHINE_CPU}/Makefile.inc)
+ARCHDIR:=      ${.CURDIR}/arch/${MACHINE_CPU}
+.else
+.error Architecture (${MACHINE_ARCH} or ${MACHINE_CPU}) unsupported
+.endif
+
 .PATH: ${ARCHDIR}
 .  include "${ARCHDIR}/Makefile.inc"
 
@@ -14,6 +19,8 @@
 
 .else
 
+CSU_MACHINE_ARCH?=     ${MACHINE_ARCH}
+
 .  if exists(${CSU_MACHINE_ARCH}_elf/Makefile)
 SUBDIR=        ${CSU_MACHINE_ARCH}_elf
 .  elif exists(${CSU_MACHINE_ARCH}/Makefile)



Home | Main Index | Thread Index | Old Index