Date: Mon, 13 Sep 2010 00:57:48 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212511 - head/usr.sbin/crunch/crunchide Message-ID: <201009130057.o8D0vmtv041780@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon Sep 13 00:57:48 2010 New Revision: 212511 URL: http://svn.freebsd.org/changeset/base/212511 Log: Use TARGET_CPUARCH instead of TARGET_ARCH here. Define TARGET_CPUARCH based on TARGET_ARCH. Use TARGET_ARCH still for a powerpc64 test. Futureproof for coming mipsel/mipseb and arm/armeb rename. Modified: head/usr.sbin/crunch/crunchide/Makefile Modified: head/usr.sbin/crunch/crunchide/Makefile ============================================================================== --- head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 00:42:07 2010 (r212510) +++ head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 00:57:48 2010 (r212511) @@ -3,6 +3,14 @@ PROG= crunchide SRCS= crunchide.c +# These assignments duplicate much of the functionality of +# MACHINE_CPUARCH, but there's no easy way to export make functions... + +.if defined(TARGET_ARCH) +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +.else +TARGET_CPUARCH=${MACHINE_CPUARCH} +.endif TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == i386 && ${MACHINE_ARCH} == i386 @@ -10,8 +18,9 @@ CFLAGS+=-DNLIST_AOUT SRCS+= exec_aout.c .endif -.if ${TARGET_ARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ - ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 +# nb: TARGET_ARCH for powerpc64 is correct here +.if ${TARGET_CPUARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \ + ${TARGET_CPUARCH} == sparc64 || ${TARGET_CPUARCH} == amd64 CFLAGS+=-DNLIST_ELF64 SRCS+= exec_elf64.c exec_elf64.o: exec_elf32.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009130057.o8D0vmtv041780>