diff options
author | imp <imp@FreeBSD.org> | 2010-09-13 00:57:48 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-09-13 00:57:48 +0000 |
commit | 825ac700e57aa6ea2ba53a952e56af85aef7826f (patch) | |
tree | e743bc7efe391b7088fce4138d4b2e0277b5b59e /usr.sbin/crunch | |
parent | dc327c8b4d820f3f5b301f094f606a135ef2430d (diff) | |
download | FreeBSD-src-825ac700e57aa6ea2ba53a952e56af85aef7826f.zip FreeBSD-src-825ac700e57aa6ea2ba53a952e56af85aef7826f.tar.gz |
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.
Diffstat (limited to 'usr.sbin/crunch')
-rw-r--r-- | usr.sbin/crunch/crunchide/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/crunch/crunchide/Makefile b/usr.sbin/crunch/crunchide/Makefile index 3e173e4..34e5674 100644 --- a/usr.sbin/crunch/crunchide/Makefile +++ b/usr.sbin/crunch/crunchide/Makefile @@ -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 |