From 25faff346c8453b8248f99c7cff71708262faa37 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 23 Aug 2010 22:24:11 +0000 Subject: [PATCH] MFtbemd: Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform. --- Makefile.inc1 | 4 ++-- cddl/lib/libdtrace/Makefile | 4 ++-- cddl/lib/libzpool/Makefile | 2 +- gnu/lib/csu/Makefile | 6 +++--- gnu/lib/libgomp/Makefile | 7 ++++--- gnu/lib/libstdc++/Makefile | 12 ++++++------ gnu/usr.bin/binutils/gdb/Makefile | 19 +++++------------- gnu/usr.bin/gdb/Makefile | 3 +-- gnu/usr.bin/gdb/gdbserver/Makefile | 5 ++--- include/Makefile | 4 ++-- lib/Makefile | 20 ++++++++++++------- lib/libc/Makefile | 20 +++++++++---------- lib/libc/compat-43/Makefile.inc | 2 +- lib/libc/gen/Makefile.inc | 6 +++--- lib/libc/locale/Makefile.inc | 2 +- lib/libc/quad/Makefile.inc | 4 ++-- lib/libc/softfloat/Makefile.inc | 4 ++-- lib/libc/stdlib/Makefile.inc | 4 ++-- lib/libc/string/Makefile.inc | 6 +++--- lib/libc/sys/Makefile.inc | 6 +++--- lib/libc_r/sys/Makefile.inc | 2 +- lib/libdisk/Makefile | 2 +- lib/libkvm/Makefile | 7 ++++--- lib/libpmc/Makefile | 4 ++-- lib/libstand/Makefile | 26 ++++++++++++------------- lib/libthread_db/Makefile | 2 +- lib/msun/Makefile | 2 +- libexec/rtld-elf/Makefile | 14 +++++++------- libexec/rtld-elf/amd64/Makefile.inc | 4 +++- libexec/rtld-elf/i386/Makefile.inc | 4 +++- rescue/rescue/Makefile | 8 ++++---- sbin/atm/atmconfig/Makefile | 3 ++- sbin/bsdlabel/Makefile | 2 +- sbin/camcontrol/Makefile | 3 ++- sbin/gbde/Makefile | 2 +- sbin/newfs_msdos/Makefile | 3 ++- sbin/sunlabel/Makefile | 2 +- secure/lib/libcrypto/Makefile | 30 ++++++++++++++--------------- share/man/man4/Makefile | 4 ++-- share/man/man5/Makefile | 2 +- share/mk/bsd.lib.mk | 2 +- share/mk/bsd.sys.mk | 5 +++-- sys/boot/arm/ixp425/boot2/Makefile | 2 +- sys/conf/kern.post.mk | 4 ++-- sys/conf/kern.pre.mk | 2 +- usr.bin/ldd/Makefile | 2 +- usr.bin/truss/Makefile | 6 +++--- usr.sbin/ac/Makefile | 2 +- usr.sbin/amd/Makefile.inc | 2 +- usr.sbin/apm/Makefile | 2 +- usr.sbin/kldxref/Makefile | 4 ++-- usr.sbin/sade/Makefile | 2 +- usr.sbin/sysinstall/Makefile | 2 +- usr.sbin/tcpdump/tcpdump/Makefile | 2 +- 54 files changed, 155 insertions(+), 150 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 28144a6d064b..36c1a34ba2de 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1131,8 +1131,8 @@ _prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc # all shared libraries for ELF. # _startup_libs= gnu/lib/csu -.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) -_startup_libs+= lib/csu/${MACHINE_ARCH}-elf +.if exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf) +_startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf .elif exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf) _startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf .elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 2cc9564f6b3b..9a107439c20b 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -63,11 +63,11 @@ CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \ #CFLAGS+= -DYYDEBUG -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386 .PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH} -.elif ${MACHINE_ARCH} == "sparc64" +.elif ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc .else diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 2199a014ae1b..7a0ce3cb98ee 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -51,7 +51,7 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair CFLAGS+= -DWANTS_MUTEX_OWNED CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys -CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include +CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include DPADD= ${LIBPTHREAD} ${LIBZ} LDADD= -lpthread -lz diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile index b7dcb6000820..4999d06a578f 100644 --- a/gnu/lib/csu/Makefile +++ b/gnu/lib/csu/Makefile @@ -24,18 +24,18 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" BEGINSRC= crtbegin.asm ENDSRC= crtend.asm CFLAGS+= -x assembler-with-cpp # Ugly hack CFLAGS+= -include osreldate.h .undef SRCS # hack for 'make depend' .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == "powerpc" TGTOBJS= crtsavres.o SRCS+= crtsavres.asm .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" TGTOBJS= crtfastmath.o SRCS+= crtfastmath.c .endif diff --git a/gnu/lib/libgomp/Makefile b/gnu/lib/libgomp/Makefile index 097451673b12..da28f8999fd6 100644 --- a/gnu/lib/libgomp/Makefile +++ b/gnu/lib/libgomp/Makefile @@ -23,9 +23,10 @@ CFLAGS+= -I${.CURDIR} -I. -I${SRCDIR} -I${SRCDIR}/config/posix VERSION_MAP= ${SRCDIR}/libgomp.map # Target-specific OpenMP configuration -.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == i386 || \ - ${MACHINE_ARCH} == powerpc || \ - (${MACHINE_ARCH} == mips && (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) +.if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == i386 || \ + ${MACHINE_CPUARCH} == powerpc || \ + (${MACHINE_CPUARCH} == mips && \ + (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) OMP_LOCK_ALIGN = 4 OMP_LOCK_KIND= 4 OMP_LOCK_SIZE= 4 diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile index 9fcc5e9edf6d..e0a7bb214ed5 100644 --- a/gnu/lib/libstdc++/Makefile +++ b/gnu/lib/libstdc++/Makefile @@ -14,7 +14,7 @@ LIB= stdc++ SHLIB_MAJOR= 6 CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 .endif CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include @@ -67,14 +67,14 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \ SRCS+= cp-demangle.c # MD headers location -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" MARCHDIR= sparc -.elif ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU} != 'i386' +.elif ${MACHINE_CPUARCH} == "i386" && ${MACHINE_CPU} != 'i386' MARCHDIR= i486 -.elif ${MACHINE_ARCH} == "amd64" +.elif ${MACHINE_CPUARCH} == "amd64" MARCHDIR= i486 .else -MARCHDIR= ${MACHINE_ARCH} +MARCHDIR= ${MACHINE_CPUARCH} .endif .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h) @@ -83,7 +83,7 @@ ATOMICITY_H= ${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_mutex/atomicity.h .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" .if exists(${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h) ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h .endif diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile index 6e52616ad309..f51d9e357045 100644 --- a/gnu/usr.bin/binutils/gdb/Makefile +++ b/gnu/usr.bin/binutils/gdb/Makefile @@ -8,16 +8,7 @@ GDBDIR= ${.CURDIR}/../../../../contrib/gdb .PATH: ${SRCDIR}/opcodes ${SRCDIR}/binutils # For FSF GDB files, use their CPU (arch) name; for our files use ours. -.if ${TARGET_ARCH} == "sparc64" -GDB_CPU= sparc -.elif ${TARGET_ARCH} == "amd64" -GDB_CPU= i386 -.elif ${TARGET_ARCH} == "powerpc64" -GDB_CPU= powerpc -.else -GDB_CPU= ${TARGET_ARCH} -.endif - +GDB_CPU=${TARGET_CPUARCH:C/amd64/i386/:C/powerpc.*/rs6000/:C/sparc64/sparc/} NO_SHARED?=yes PROG= gdb XSRCS= annotate.c arch-utils.c ax-general.c ax-gdb.c bcache.c \ @@ -57,7 +48,7 @@ WARNS?= 0 CFLAGS+= -DCROSS_COMPILE=1 .endif CFLAGS+= -DDEFAULT_BFD_ARCH=bfd_${GDB_CPU}_arch -CFLAGS+= -I${.CURDIR}/${TARGET_ARCH} +CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} CFLAGS+= -I${SRCDIR}/binutils -I${SRCDIR}/bfd CFLAGS+= -I${GDBDIR}/gdb -I${GDBDIR}/gdb/config CFLAGS+= -I$(.CURDIR) @@ -123,8 +114,8 @@ init.c: ${XSRCS} tm.h: echo '#include "${GDB_CPU}/tm-fbsd.h"' > ${.TARGET} -.if exists(${.CURDIR}/fbsd-kgdb-${TARGET_ARCH}.h) - echo '#include "fbsd-kgdb-${TARGET_ARCH}.h"' >> ${.TARGET} +.if exists(${.CURDIR}/fbsd-kgdb-${TARGET_CPUARCH}.h) + echo '#include "fbsd-kgdb-${TARGET_CPUARCH}.h"' >> ${.TARGET} .endif .for H in nm-fbsd xm-${GDB_CPU} @@ -133,7 +124,7 @@ ${H:C/-.*$//}.h: .endfor kvm-fbsd-machine.h: - ln -sf ${.CURDIR}/kvm-fbsd-${TARGET_ARCH}.h ${.TARGET} + ln -sf ${.CURDIR}/kvm-fbsd-${TARGET_CPUARCH}.h ${.TARGET} GDB_VERSION= "5.2.1 (FreeBSD)" gdbversion.c: Makefile diff --git a/gnu/usr.bin/gdb/Makefile b/gnu/usr.bin/gdb/Makefile index db21e5615e58..33f81cb187b3 100644 --- a/gnu/usr.bin/gdb/Makefile +++ b/gnu/usr.bin/gdb/Makefile @@ -2,8 +2,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb -TARGET_ARCH?= ${MACHINE_ARCH} -.if exists(${.CURDIR}/gdbserver/reg-${TARGET_ARCH}.c) +.if exists(${.CURDIR}/gdbserver/reg-${MACHINE_CPUARCH}.c) SUBDIR+=gdbserver .endif diff --git a/gnu/usr.bin/gdb/gdbserver/Makefile b/gnu/usr.bin/gdb/gdbserver/Makefile index 08f25ae61a55..f5cfd4c49f62 100644 --- a/gnu/usr.bin/gdb/gdbserver/Makefile +++ b/gnu/usr.bin/gdb/gdbserver/Makefile @@ -14,11 +14,10 @@ SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \ server.c signals.c target.c utils.c SRCS+= fbsd-low.c -SRCS+= fbsd-${MACHINE_ARCH}-low.c reg-${MACHINE_ARCH}.c -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +SRCS+= fbsd-${MACHINE_CPUARCH}-low.c reg-${MACHINE_CPUARCH}.c +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= i387-fp.c .endif - #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} CFLAGS+= -I${GDBDIR}/gdb/gdbserver CFLAGS+= -I${GDBDIR}/gdb/regformats diff --git a/include/Makefile b/include/Makefile index 0ba8b17d54ba..4e7fd935ae5f 100644 --- a/include/Makefile +++ b/include/Makefile @@ -115,8 +115,8 @@ INCSLINKS+= machine/$i ${INCLUDEDIR}/$i INCSLINKS+= sys/$i ${INCLUDEDIR}/$i .endfor -.if ${MACHINE} != ${MACHINE_ARCH} -_MARCH=${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_MARCH=${MACHINE_CPUARCH} .endif .include diff --git a/lib/Makefile b/lib/Makefile index 1f41df4b5aeb..6f158a4596b7 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -112,10 +112,10 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_bind} \ ${_clang} -.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) -_csu=csu/${MACHINE_ARCH}-elf -.elif exists(${.CURDIR}/csu/${MACHINE_ARCH}/Makefile) -_csu=csu/${MACHINE_ARCH} +.if exists(${.CURDIR}/csu/${MACHINE_CPUARCH}-elf) +_csu=csu/${MACHINE_CPUARCH}-elf +.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile) +_csu=csu/${MACHINE_CPUARCH} .else _csu=csu .endif @@ -168,7 +168,7 @@ _libnetgraph= libnetgraph _libypclnt= libypclnt .endif -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" .if ${MK_NCP} != "no" _libncp= libncp .endif @@ -178,16 +178,22 @@ _libproc= libproc _librtld_db= librtld_db .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" _libefi= libefi _libsmb= libsmb .endif +.if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_NCP} != "no" +_libncp= libncp +.endif +.endif + .if ${MACHINE_CPUARCH} == "powerpc" _libsmb= libsmb .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" _libsmb= libsmb .endif diff --git a/lib/libc/Makefile b/lib/libc/Makefile index ad4e5bd16290..8aed00f8ad73 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -15,7 +15,7 @@ LIB=c SHLIB_MAJOR= 7 WARNS?= 2 CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include -CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} +CFLAGS+=-I${.CURDIR}/${MACHINE_CPUARCH} CFLAGS+=-DNLS CLEANFILES+=tags INSTALL_PIC_ARCHIVE= @@ -36,7 +36,7 @@ MDASM= MIASM= NOASM= -.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" +.include "${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc" .include "${.CURDIR}/db/Makefile.inc" .include "${.CURDIR}/compat-43/Makefile.inc" .include "${.CURDIR}/gdtoa/Makefile.inc" @@ -49,11 +49,11 @@ NOASM= .include "${.CURDIR}/net/Makefile.inc" .include "${.CURDIR}/nls/Makefile.inc" .include "${.CURDIR}/posix1e/Makefile.inc" -.if ${MACHINE_ARCH} != "amd64" && \ - ${MACHINE_ARCH} != "ia64" && \ +.if ${MACHINE_CPUARCH} != "amd64" && \ + ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_ARCH} != "powerpc64" && \ - ${MACHINE_ARCH} != "sparc64" && \ - ${MACHINE_ARCH} != "mips" + ${MACHINE_CPUARCH} != "sparc64" && \ + ${MACHINE_CPUARCH} != "mips" .include "${.CURDIR}/quad/Makefile.inc" .endif .if ${MACHINE_ARCH} == "mips" && \ @@ -70,7 +70,7 @@ NOASM= .include "${.CURDIR}/rpc/Makefile.inc" .include "${.CURDIR}/uuid/Makefile.inc" .include "${.CURDIR}/xdr/Makefile.inc" -.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips" +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" .include "${.CURDIR}/softfloat/Makefile.inc" .endif .if ${MK_NIS} != "no" @@ -115,14 +115,14 @@ KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \ strcat.c strcmp.c strcpy.c strlen.c strncpy.c -libkern: libkern.gen libkern.${MACHINE_ARCH} +libkern: libkern.gen libkern.${MACHINE_CPUARCH} libkern.gen: ${KQSRCS} ${KSRCS} cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern -libkern.${MACHINE_ARCH}:: ${KMSRCS} +libkern.${MACHINE_CPUARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) - cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} + cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_CPUARCH} .endif .include diff --git a/lib/libc/compat-43/Makefile.inc b/lib/libc/compat-43/Makefile.inc index 8505ff227873..e8ec364a2cfa 100644 --- a/lib/libc/compat-43/Makefile.inc +++ b/lib/libc/compat-43/Makefile.inc @@ -2,7 +2,7 @@ # $FreeBSD$ # compat-43 sources -.PATH: ${.CURDIR}/${MACHINE_ARCH}/compat-43 ${.CURDIR}/compat-43 +.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/compat-43 ${.CURDIR}/compat-43 SRCS+= creat.c gethostid.c getwd.c killpg.c sethostid.c setpgrp.c \ setrgid.c setruid.c sigcompat.c diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 5056392ccd2b..204541e594f3 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -2,7 +2,7 @@ # $FreeBSD$ # machine-independent gen sources -.PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen +.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/gen ${.CURDIR}/gen SRCS+= __getosreldate.c __xuname.c \ _once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \ @@ -38,8 +38,8 @@ SRCS+= __getosreldate.c __xuname.c \ SYM_MAPS+=${.CURDIR}/gen/Symbol.map # machine-dependent gen sources -.if exists(${.CURDIR}/${MACHINE_ARCH}/gen/Makefile.inc) -.include "${.CURDIR}/${MACHINE_ARCH}/gen/Makefile.inc" +.if exists(${.CURDIR}/${MACHINE_CPUARCH}/gen/Makefile.inc) +.include "${.CURDIR}/${MACHINE_CPUARCH}/gen/Makefile.inc" .endif MAN+= alarm.3 arc4random.3 \ diff --git a/lib/libc/locale/Makefile.inc b/lib/libc/locale/Makefile.inc index 074c4d9ded27..8cf5bebd5d71 100644 --- a/lib/libc/locale/Makefile.inc +++ b/lib/libc/locale/Makefile.inc @@ -2,7 +2,7 @@ # $FreeBSD$ # locale sources -.PATH: ${.CURDIR}/${MACHINE_ARCH}/locale ${.CURDIR}/locale +.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/locale ${.CURDIR}/locale SRCS+= ascii.c big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c \ gb18030.c gb2312.c gbk.c isctype.c iswctype.c \ diff --git a/lib/libc/quad/Makefile.inc b/lib/libc/quad/Makefile.inc index 14a5b1f50d13..84723a73658c 100644 --- a/lib/libc/quad/Makefile.inc +++ b/lib/libc/quad/Makefile.inc @@ -2,9 +2,9 @@ # $FreeBSD$ # Quad support, if needed -.PATH: ${.CURDIR}/${MACHINE_ARCH}/quad ${.CURDIR}/quad +.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/quad ${.CURDIR}/quad -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c diff --git a/lib/libc/softfloat/Makefile.inc b/lib/libc/softfloat/Makefile.inc index c78676182657..c3df0ae69ec8 100644 --- a/lib/libc/softfloat/Makefile.inc +++ b/lib/libc/softfloat/Makefile.inc @@ -2,10 +2,10 @@ # $FreeBSD$ SOFTFLOAT_BITS?=64 -.PATH: ${MACHINE_ARCH}/softfloat \ +.PATH: ${MACHINE_CPUARCH}/softfloat \ ${.CURDIR}/softfloat/bits${SOFTFLOAT_BITS} ${.CURDIR}/softfloat -CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH}/softfloat -I${.CURDIR}/softfloat +CFLAGS+= -I${.CURDIR}/${MACHINE_CPUARCH}/softfloat -I${.CURDIR}/softfloat CFLAGS+= -DSOFTFLOAT_FOR_GCC SRCS+= softfloat.c diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index 1d06dd390c50..d26f66a09ae7 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -2,7 +2,7 @@ # $FreeBSD$ # machine-independent stdlib sources -.PATH: ${.CURDIR}/${MACHINE_ARCH}/stdlib ${.CURDIR}/stdlib +.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/stdlib ${.CURDIR}/stdlib MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ bsearch.c div.c exit.c getenv.c getopt.c getopt_long.c \ @@ -16,7 +16,7 @@ MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ SYM_MAPS+= ${.CURDIR}/stdlib/Symbol.map # machine-dependent stdlib sources -.sinclude "${.CURDIR}/${MACHINE_ARCH}/stdlib/Makefile.inc" +.sinclude "${.CURDIR}/${MACHINE_CPUARCH}/stdlib/Makefile.inc" MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 bsearch.3 \ div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \ diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index b0a1899009db..96759d5bd7d8 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -1,7 +1,7 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # $FreeBSD$ -.PATH: ${.CURDIR}/${MACHINE_ARCH}/string ${.CURDIR}/string +.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/string ${.CURDIR}/string CFLAGS+= -I${.CURDIR}/locale @@ -26,8 +26,8 @@ SYM_MAPS+= ${.CURDIR}/string/Symbol.map # machine-dependent string sources -.if exists(${.CURDIR}/${MACHINE_ARCH}/string/Makefile.inc) -.include "${.CURDIR}/${MACHINE_ARCH}/string/Makefile.inc" +.if exists(${.CURDIR}/${MACHINE_CPUARCH}/string/Makefile.inc) +.include "${.CURDIR}/${MACHINE_CPUARCH}/string/Makefile.inc" .endif MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \ diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 1915c550ebaf..05c3e173d109 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -2,7 +2,7 @@ # $FreeBSD$ # sys sources -.PATH: ${.CURDIR}/${MACHINE_ARCH}/sys ${.CURDIR}/sys +.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/sys ${.CURDIR}/sys # Include the generated makefile containing the *complete* list # of syscall names in MIASM. @@ -13,8 +13,8 @@ # MDASM names override the default syscall names in MIASM. # NOASM will prevent the default syscall code from being generated. # -.if exists(${.CURDIR}/${MACHINE_ARCH}/sys/Makefile.inc) -.include "${.CURDIR}/${MACHINE_ARCH}/sys/Makefile.inc" +.if exists(${.CURDIR}/${MACHINE_CPUARCH}/sys/Makefile.inc) +.include "${.CURDIR}/${MACHINE_CPUARCH}/sys/Makefile.inc" .endif # Sources common to both syscall interfaces: diff --git a/lib/libc_r/sys/Makefile.inc b/lib/libc_r/sys/Makefile.inc index e608afa69909..ab6db1f4f15e 100644 --- a/lib/libc_r/sys/Makefile.inc +++ b/lib/libc_r/sys/Makefile.inc @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/sys ${.CURDIR}/arch/${MACHINE_ARCH} +.PATH: ${.CURDIR}/sys ${.CURDIR}/arch/${MACHINE_CPUARCH} SRCS+= uthread_error.c _atomic_lock.S diff --git a/lib/libdisk/Makefile b/lib/libdisk/Makefile index 763170d4852c..47cf372e70e9 100644 --- a/lib/libdisk/Makefile +++ b/lib/libdisk/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" _open_disk= open_ia64_disk.c .else _change = change.c diff --git a/lib/libkvm/Makefile b/lib/libkvm/Makefile index e62d7cae2913..bf464eddc4fa 100644 --- a/lib/libkvm/Makefile +++ b/lib/libkvm/Makefile @@ -11,10 +11,11 @@ CFLAGS+=-DSUN4V WARNS?= 0 -SRCS= kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ +SRCS= kvm.c kvm_${MACHINE_CPUARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" -SRCS+= kvm_minidump_${MACHINE_ARCH}.c +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "arm" +SRCS+= kvm_minidump_${MACHINE_CPUARCH}.c .endif INCS= kvm.h diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index fd35fd5acb2d..85ddf0f45a14 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -22,7 +22,7 @@ MAN+= pmc_start.3 MAN+= pmclog.3 # PMC-dependent manual pages -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 @@ -38,7 +38,7 @@ MAN+= pmc.corei7uc.3 MAN+= pmc.westmere.3 MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 -.elif ${MACHINE_ARCH} == "arm" && ${CPUTYPE} == "xscale" +.elif ${MACHINE_CPUARCH} == "arm" && ${CPUTYPE} == "xscale" MAN+= pmc.xscale.3 .endif diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile index f44d60dd2556..90b47e780213 100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile @@ -20,23 +20,23 @@ WARNS?= 0 CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" CFLAGS+= -mno-sse3 .endif .if ${MACHINE} == "pc98" CFLAGS+= -Os .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG .endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -I. .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float -D_STANDALONE .endif @@ -54,19 +54,19 @@ SRCS+= ntoh.c # string functions from libc .PATH: ${.CURDIR}/../libc/string -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "sparc64" || \ - ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \ + ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "arm" SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \ memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \ strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \ strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" .PATH: ${.CURDIR}/../libc/arm/gen SRCS+= divsi3.S .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" .PATH: ${.CURDIR}/../libc/ia64/string SRCS+= bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \ memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \ @@ -78,7 +78,7 @@ SRCS+= bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \ SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == "powerpc" .PATH: ${.CURDIR}/../libc/quad SRCS+= ashldi3.c ashrdi3.c .PATH: ${.CURDIR}/../libc/powerpc/gen @@ -90,12 +90,12 @@ SRCS+= syncicache.c SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" .PATH: ${.CURDIR}/i386 .elif ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/powerpc .else -.PATH: ${.CURDIR}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S @@ -157,7 +157,7 @@ SRCS+= splitfs.c .include -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine cleandepend: cleanmachine cleanmachine: diff --git a/lib/libthread_db/Makefile b/lib/libthread_db/Makefile index 7aaefd7cfd46..047bbe668081 100644 --- a/lib/libthread_db/Makefile +++ b/lib/libthread_db/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} LIB= thread_db SHLIB_MAJOR= 3 diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 35077a38dbb7..38ce172cb3dc 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -76,7 +76,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ # Location of fpmath.h and _fpmath.h LIBCDIR= ${.CURDIR}/../libc CFLAGS+= -I${.CURDIR}/src -I${LIBCDIR}/include \ - -I${LIBCDIR}/${MACHINE_ARCH} + -I${LIBCDIR}/${MACHINE_CPUARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map VERSION_DEF= ${LIBCDIR}/Versions.def diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 2f5d574ada60..6cf09bed281e 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -10,7 +10,7 @@ SRCS= rtld_start.S \ MAN= rtld.1 CSTD?= gnu99 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} +CFLAGS+= -I${.CURDIR}/${MACHINE_CPUARCH} -I${.CURDIR} .if ${MACHINE_ARCH} == "powerpc64" LDFLAGS+= -nostdlib -e _rtld_start .else @@ -29,7 +29,7 @@ LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} LDADD= -lc_pic -lssp_nonshared -.if ${MACHINE_ARCH} != "ia64" +.if ${MACHINE_CPUARCH} != "ia64" .if ${MK_SYMVER} == "yes" LIBCDIR= ${.CURDIR}/../../lib/libc VERSION_DEF= ${LIBCDIR}/Versions.def @@ -39,14 +39,14 @@ LDFLAGS+= -Wl,--version-script=${VERSION_MAP} ${PROG}: ${VERSION_MAP} -.if exists(${.CURDIR}/${MACHINE_ARCH}/Symbol.map) -SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_ARCH}/Symbol.map +.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map) +SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map .endif .endif .endif -.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc) -.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" +.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc) +.include "${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc" .endif # Since moving rtld-elf to /libexec, we need to create a symlink. @@ -56,7 +56,7 @@ beforeinstall: -chflags noschg ${DESTDIR}/usr/libexec/${PROG} .endif -.PATH: ${.CURDIR}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_CPUARCH} .include .include diff --git a/libexec/rtld-elf/amd64/Makefile.inc b/libexec/rtld-elf/amd64/Makefile.inc index ba39193cf89a..b265a9d76778 100644 --- a/libexec/rtld-elf/amd64/Makefile.inc +++ b/libexec/rtld-elf/amd64/Makefile.inc @@ -1,5 +1,7 @@ +# $FreeBSD$ + CFLAGS+= -elf LDFLAGS+= -elf # Uncomment this to build the dynamic linker as an executable instead # of a shared library: -#LDSCRIPT= ${.CURDIR}/${MACHINE_ARCH}/elf_rtld.x +#LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x diff --git a/libexec/rtld-elf/i386/Makefile.inc b/libexec/rtld-elf/i386/Makefile.inc index ba39193cf89a..b265a9d76778 100644 --- a/libexec/rtld-elf/i386/Makefile.inc +++ b/libexec/rtld-elf/i386/Makefile.inc @@ -1,5 +1,7 @@ +# $FreeBSD$ + CFLAGS+= -elf LDFLAGS+= -elf # Uncomment this to build the dynamic linker as an executable instead # of a shared library: -#LDSCRIPT= ${.CURDIR}/${MACHINE_ARCH}/elf_rtld.x +#LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index d62b6f45cec7..54caad6ff1ed 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -145,7 +145,7 @@ CRUNCH_LIBS+= -lzfs -lnvpair -luutil -lavl .endif CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk CRUNCH_ALIAS_bsdlabel= disklabel #.if ${MK_NCP} != "no" @@ -161,15 +161,15 @@ CRUNCH_PROGS_sbin+= bsdlabel CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98 .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" CRUNCH_PROGS_sbin+= mca .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" CRUNCH_PROGS_sbin+= bsdlabel sunlabel .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CRUNCH_PROGS_sbin+= bsdlabel fdisk CRUNCH_ALIAS_bsdlabel= disklabel .endif diff --git a/sbin/atm/atmconfig/Makefile b/sbin/atm/atmconfig/Makefile index 8564d355efbb..cbf5a9a87d4c 100644 --- a/sbin/atm/atmconfig/Makefile +++ b/sbin/atm/atmconfig/Makefile @@ -27,7 +27,8 @@ LDADD= -lbsnmp CLEANFILES+= oid.h .endif -.if ${MACHINE_ARCH} == "arm" +# XXX - this is verboten +.if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif diff --git a/sbin/bsdlabel/Makefile b/sbin/bsdlabel/Makefile index b60bbd03addb..f91f1601fc72 100644 --- a/sbin/bsdlabel/Makefile +++ b/sbin/bsdlabel/Makefile @@ -8,7 +8,7 @@ SRCS= bsdlabel.c geom_bsd_enc.c #MAN= bsdlabel.5 MAN+= bsdlabel.8 -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disklabel MLINKS= bsdlabel.8 disklabel.8 .endif diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile index 31bbd46f4a52..877e332b8355 100644 --- a/sbin/camcontrol/Makefile +++ b/sbin/camcontrol/Makefile @@ -7,7 +7,8 @@ SRCS+= modeedit.c .else CFLAGS+= -DMINIMALISTIC .endif -.if ${MACHINE_ARCH} == "arm" +# This is verboten +.if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL} diff --git a/sbin/gbde/Makefile b/sbin/gbde/Makefile index 0faa6ba6d397..2abfcb807c15 100644 --- a/sbin/gbde/Makefile +++ b/sbin/gbde/Makefile @@ -9,7 +9,7 @@ SRCS+= g_bde_lock.c # rijndael-fst.c does evil casting things which results in warnings on # 64 bit machines, the test-vectors check out however, so it works right. -.if ${MACHINE_ARCH} != "i386" +.if ${MACHINE_CPUARCH} != "i386" WARNS?= 3 .endif diff --git a/sbin/newfs_msdos/Makefile b/sbin/newfs_msdos/Makefile index 558f673edea4..0a9ffb4340a1 100644 --- a/sbin/newfs_msdos/Makefile +++ b/sbin/newfs_msdos/Makefile @@ -3,7 +3,8 @@ PROG= newfs_msdos MAN= newfs_msdos.8 -.if ${MACHINE_ARCH} == "arm" +# XXX - this is verboten +.if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif diff --git a/sbin/sunlabel/Makefile b/sbin/sunlabel/Makefile index 9eb1a3257091..ed64bee5809c 100644 --- a/sbin/sunlabel/Makefile +++ b/sbin/sunlabel/Makefile @@ -6,7 +6,7 @@ PROG= sunlabel SRCS= sunlabel.c geom_sunlabel_enc.c MAN= sunlabel.8 -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" LINKS= ${BINDIR}/sunlabel ${BINDIR}/disklabel MLINKS= sunlabel.8 disklabel.8 .endif diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 212427fb9fe9..af48d7061f45 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -49,7 +49,7 @@ INCS+= asn1.h asn1_mac.h asn1t.h # bf SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .if ${MACHINE_CPU:Mi686} SRCS+= bf-686.s .else @@ -73,9 +73,9 @@ SRCS+= bn_add.c bn_blind.c bn_const.c bn_ctx.c bn_depr.c bn_div.c \ bn_lib.c bn_mod.c bn_mont.c bn_mpi.c bn_mul.c bn_nist.c bn_opt.c \ bn_prime.c bn_print.c bn_rand.c bn_recp.c bn_shift.c bn_sqr.c \ bn_sqrt.c bn_word.c bn_x931p.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= bn-586.s co-586.s -.elif ${MACHINE_ARCH} == "amd64" +.elif ${MACHINE_CPUARCH} == "amd64" SRCS+= x86_64-gcc.c .else SRCS+= bn_asm.c @@ -89,7 +89,7 @@ INCS+= buffer.h # cast SRCS+= c_cfb64.c c_ecb.c c_ofb64.c c_skey.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= cast-586.s .else SRCS+= c_enc.c @@ -97,7 +97,7 @@ SRCS+= c_enc.c INCS+= cast.h # camellia -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= camellia.c cmll_cbc.c cmll_cfb.c cmll_ctr.c cmll_ecb.c \ cmll_misc.c cmll_ofb.c INCS+= camellia.h @@ -117,7 +117,7 @@ SRCS+= cbc3_enc.c cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c \ enc_read.c enc_writ.c fcrypt.c ofb64ede.c ofb64enc.c \ ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c read2pwd.c \ rpc_enc.c set_key.c str2key.c xcbc_enc.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= des-586.s crypt586.s .else SRCS+= des_enc.c fcrypt_b.c @@ -172,7 +172,7 @@ SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \ m_mdc2.c m_null.c m_ripemd.c m_sha.c m_sha1.c names.c \ openbsd_hw.c p5_crpt.c p5_crpt2.c p_dec.c p_enc.c p_lib.c \ p_open.c p_seal.c p_sign.c p_verify.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= e_camellia.c .endif INCS+= evp.h @@ -208,7 +208,7 @@ INCS+= md4.h # md5 SRCS+= md5_dgst.c md5_one.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= md5-586.s .endif INCS+= md5.h @@ -255,7 +255,7 @@ INCS+= rc2.h # rc4 SRCS+= rc4_skey.c rc4_fblk.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= rc4-586.s .else SRCS+= rc4_enc.c @@ -264,7 +264,7 @@ INCS+= rc4.h # rc5 SRCS+= rc5_ecb.c rc5_skey.c rc5cfb64.c rc5ofb64.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= rc5-586.s .else SRCS+= rc5_enc.c @@ -284,7 +284,7 @@ INCS+= rsa.h # sha SRCS+= sha1_one.c sha1dgst.c sha_dgst.c sha_one.c sha256.c sha512.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= sha1-586.s .endif INCS+= sha.h @@ -351,10 +351,10 @@ buildinf.h: ${.CURDIR}/Makefile ( echo "#ifndef MK1MF_BUILD"; \ echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ echo " #define CFLAGS \"$(CC)\""; \ - echo " #define PLATFORM \"FreeBSD-${MACHINE_ARCH}\""; \ + echo " #define PLATFORM \"FreeBSD-${MACHINE_CPUARCH}\""; \ echo "#endif" ) > ${.TARGET} -opensslconf.h: opensslconf-${MACHINE_ARCH}.h +opensslconf.h: opensslconf-${MACHINE_CPUARCH}.h cp -f ${.ALLSRC} ${.TARGET} evp.h: ${LCRYPTO_SRC}/crypto/evp/evp.h @@ -383,11 +383,11 @@ afterinstall: .include -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .PATH: ${.CURDIR}/i386 .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" _bn_asmpath= ${LCRYPTO_SRC}/crypto/bn/asm .endif diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4863cda0248b..2fa0e9d9631b 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -628,7 +628,7 @@ MLINKS+=xe.4 if_xe.4 MLINKS+=xl.4 if_xl.4 MLINKS+=zyd.4 if_zyd.4 -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _acpi_asus.4= acpi_asus.4 _acpi_dock.4= acpi_dock.4 _acpi_fujitsu.4=acpi_fujitsu.4 @@ -678,7 +678,7 @@ _wpi.4= wpi.4 MLINKS+=lindev.4 full.4 .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _atp.4= atp.4 .endif diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 1216fc4491cc..7aad66b907e5 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -83,7 +83,7 @@ MLINKS+=resolver.5 resolv.conf.5 MAN+= hesiod.conf.5 .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _boot.config.5= boot.config.5 .endif diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 94d918b48798..ecb91bfd2883 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -58,7 +58,7 @@ STRIP?= -s .SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .m .C .f .y .l .ln .if !defined(PICFLAG) -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" PICFLAG=-fPIC .else PICFLAG=-fpic diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 3559a267f2bb..f6f8a005f504 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -79,8 +79,9 @@ CWARNFLAGS += -Werror CWARNFLAGS += -Wno-unknown-pragmas .endif -.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && \ + ${MACHINE_CPUARCH} != "ia64" && \ + ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS ?= -fstack-protector CFLAGS += ${SSP_CFLAGS} diff --git a/sys/boot/arm/ixp425/boot2/Makefile b/sys/boot/arm/ixp425/boot2/Makefile index 138446b6fa25..a329b65c0db6 100644 --- a/sys/boot/arm/ixp425/boot2/Makefile +++ b/sys/boot/arm/ixp425/boot2/Makefile @@ -20,7 +20,7 @@ NO_MAN= KERNPHYSADDR=0x180000 KERNVIRTADDR=${KERNPHYSADDR} BOOT_STACK=0x200000-4 -M=${MACHINE_ARCH} +M=${MACHINE} LDFLAGS=-e ${KERNPHYSADDR} -EB -T ldscript.${M} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} S=${.CURDIR}/../../../.. diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index f759f271fb8e..c7e6281f69e1 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -84,8 +84,8 @@ gdbinit: grep -v '# XXX' ${S}/../tools/debugscripts/dot.gdbinit | \ sed "s:MODPATH:${.OBJDIR}/modules:" > .gdbinit cp ${S}/../tools/debugscripts/gdbinit.kernel ${.CURDIR} -.if exists(${S}/../tools/debugscripts/gdbinit.${MACHINE_ARCH}) - cp ${S}/../tools/debugscripts/gdbinit.${MACHINE_ARCH} \ +.if exists(${S}/../tools/debugscripts/gdbinit.${MACHINE_CPUARCH}) + cp ${S}/../tools/debugscripts/gdbinit.${MACHINE_CPUARCH} \ ${.CURDIR}/gdbinit.machine .endif .endif diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index b61113e7e50e..d4bdc1f54b26 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -32,7 +32,7 @@ CTFFLAGS+= -g . else _MINUS_O= -O2 . endif -. if ${MACHINE_ARCH} == "amd64" +. if ${MACHINE_CPUARCH} == "amd64" COPTFLAGS?=-O2 -frename-registers -pipe . else COPTFLAGS?=${_MINUS_O} -pipe diff --git a/usr.bin/ldd/Makefile b/usr.bin/ldd/Makefile index cd172280d783..fd2b7b4d9ccb 100644 --- a/usr.bin/ldd/Makefile +++ b/usr.bin/ldd/Makefile @@ -2,7 +2,7 @@ PROG?= ldd SRCS= ldd.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= sods.c .endif diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile index d907ad59c8e3..ca0ce9234a21 100644 --- a/usr.bin/truss/Makefile +++ b/usr.bin/truss/Makefile @@ -2,7 +2,7 @@ NO_WERROR= PROG= truss -SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c ${MACHINE_ARCH}-fbsd.c +SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c ${MACHINE_CPUARCH}-fbsd.c CFLAGS+= -I${.CURDIR} -I. CLEANFILES= syscalls.master syscalls.h ioctl.c @@ -19,7 +19,7 @@ syscalls.h: syscalls.master ioctl.c: ${.CURDIR}/../kdump/mkioctls sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET} -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= i386-linux.c linux_syscalls.h CLEANFILES+=i386l-syscalls.master linux_syscalls.h @@ -31,7 +31,7 @@ linux_syscalls.h: i386l-syscalls.master ${.CURDIR}/i386linux.conf .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SRCS+= amd64-linux32.c linux32_syscalls.h CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h diff --git a/usr.sbin/ac/Makefile b/usr.sbin/ac/Makefile index 46064fcf300b..576dbb3323ce 100644 --- a/usr.sbin/ac/Makefile +++ b/usr.sbin/ac/Makefile @@ -4,7 +4,7 @@ PROG= ac MAN= ac.8 # Temporary, while tracking down problem wrt 64-bit time_t's on sparc64 -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" CFLAGS+=-DDEBUG .endif diff --git a/usr.sbin/amd/Makefile.inc b/usr.sbin/amd/Makefile.inc index 673edc1b9152..1965ff933e4c 100644 --- a/usr.sbin/amd/Makefile.inc +++ b/usr.sbin/amd/Makefile.inc @@ -27,7 +27,7 @@ CFLAGS+= -DHAVE_LOCALCONFIG_H CFLAGS+= -DYES_HESIOD .endif -CFLAGS+= -DHOST_CPU=\"${MACHINE_ARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\" +CFLAGS+= -DHOST_CPU=\"${MACHINE_CPUARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\" .if exists(${.OBJDIR}/../libamu) LIBAMUDIR= ${.OBJDIR}/../libamu diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index 08ed25fce66a..3cc6f5042ea9 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -3,6 +3,6 @@ PROG= apm MAN= apm.8 MLINKS= apm.8 apmconf.8 -MANSUBDIR= /${MACHINE_ARCH} +MANSUBDIR= /${MACHINE_CPUARCH} .include diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 2f1550583cf7..c877a8a57ffe 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -7,8 +7,8 @@ SRCS= kldxref.c ef.c ef_obj.c WARNS?= 2 CFLAGS+=-fno-strict-aliasing -.if exists(ef_${MACHINE_ARCH}.c) -SRCS+= ef_${MACHINE_ARCH}.c +.if exists(ef_${MACHINE_CPUARCH}.c) +SRCS+= ef_${MACHINE_CPUARCH}.c .else SRCS+= ef_nop.c .endif diff --git a/usr.sbin/sade/Makefile b/usr.sbin/sade/Makefile index bd94155595a3..ad284894df0d 100644 --- a/usr.sbin/sade/Makefile +++ b/usr.sbin/sade/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} != "ia64" +.if ${MACHINE_CPUARCH} != "ia64" _wizard= wizard.c .endif diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile index c9a7c8980ecf..d18033aacacb 100644 --- a/usr.sbin/sysinstall/Makefile +++ b/usr.sbin/sysinstall/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} != "ia64" +.if ${MACHINE_CPUARCH} != "ia64" _wizard= wizard.c .endif diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile index 6f072b72effa..c29694388c4c 100644 --- a/usr.sbin/tcpdump/tcpdump/Makefile +++ b/usr.sbin/tcpdump/tcpdump/Makefile @@ -46,7 +46,7 @@ SRCS+= print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c \ print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c CFLAGS+= -DINET6 .endif -.if ${MACHINE_ARCH} != "i386" +.if ${MACHINE_CPUARCH} != "i386" CFLAGS+= -DLBL_ALIGN .endif