Index: usr.bin/Makefile =================================================================== --- usr.bin/Makefile (.../head) (revision 204018) +++ usr.bin/Makefile (.../user/imp/tbemd) (revision 204018) @@ -238,7 +238,7 @@ ${_ypmatch} \ ${_ypwhich} -.if ${MACHINE_ARCH} != "arm" +.if ${MACHINE_CPUARCH} != "arm" _truss= truss .endif @@ -365,7 +365,7 @@ _usbhidctl= usbhidctl .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .if ${MK_NCP} != "no" _ncplist= ncplist _ncplogin= ncplogin @@ -373,11 +373,11 @@ _smbutil= smbutil .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" _smbutil= smbutil .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" .if ${MK_NCP} != "no" _ncplist= ncplist _ncplogin= ncplogin @@ -385,11 +385,11 @@ _smbutil= smbutil .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _smbutil= smbutil .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" _smbutil= smbutil .endif Index: usr.bin/truss/Makefile =================================================================== --- usr.bin/truss/Makefile (.../head) (revision 204018) +++ usr.bin/truss/Makefile (.../user/imp/tbemd) (revision 204018) @@ -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 @@ 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 @@ ${.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 Index: usr.bin/xlint/Makefile.inc =================================================================== --- usr.bin/xlint/Makefile.inc (.../head) (revision 204018) +++ usr.bin/xlint/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -5,8 +5,16 @@ .PATH: ${.CURDIR}/../common +# 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} -CFLAGS+= -I${.CURDIR}/../arch/${TARGET_ARCH} +CFLAGS+= -I${.CURDIR}/../arch/${TARGET_CPUARCH} CFLAGS+= -I${.CURDIR}/../common OBJECT_FMT= ELF Index: usr.bin/ldd/Makefile =================================================================== --- usr.bin/ldd/Makefile (.../head) (revision 204018) +++ usr.bin/ldd/Makefile (.../user/imp/tbemd) (revision 204018) @@ -2,7 +2,7 @@ PROG?= ldd SRCS= ldd.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= sods.c .endif Index: include/Makefile =================================================================== --- include/Makefile (.../head) (revision 204018) +++ include/Makefile (.../user/imp/tbemd) (revision 204018) @@ -115,8 +115,8 @@ INCSLINKS+= sys/$i ${INCLUDEDIR}/$i .endfor -.if ${MACHINE} != ${MACHINE_ARCH} -_MARCH=${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_MARCH=${MACHINE_CPUARCH} .endif .include Index: secure/lib/libcrypto/Makefile =================================================================== --- secure/lib/libcrypto/Makefile (.../head) (revision 204018) +++ secure/lib/libcrypto/Makefile (.../user/imp/tbemd) (revision 204018) @@ -49,7 +49,7 @@ # 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 @@ 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 @@ # 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 @@ 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 @@ 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 @@ 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ ( 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 ${.ALLSRC} ${.TARGET} evp.h: ${LCRYPTO_SRC}/crypto/evp/evp.h @@ -383,11 +383,11 @@ .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 Index: rescue/rescue/Makefile =================================================================== --- rescue/rescue/Makefile (.../head) (revision 204018) +++ rescue/rescue/Makefile (.../user/imp/tbemd) (revision 204018) @@ -145,7 +145,7 @@ .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_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 Index: README-BRANCH =================================================================== --- README-BRANCH (.../head) (revision 0) +++ README-BRANCH (.../user/imp/tbemd) (revision 204018) @@ -0,0 +1,24 @@ +TARGET_BIG_ENDIAN must die + +Changes in MACHINE_ARCH: + +mips (big endian) mipseb +mips (little endian) mipsel +arm (little endian) arm For historical reasons +arm (big endian) armeb + +What we call today MACHINE_ARCH is really MACHINE_CPUARCH. This is +called MACHINE_CPU on NetBSD, but FreeBSD already uses MACHINE_CPU for +other purposes. In general $MACHINE_ARCH -> $MACHINE_CPUARCH in most +places in the tree. MACHINE_CPUARCH is defined in bsd.own.mk, since +it is dependent on the bsd tree, actually. All the translation from +MACHINE_ARCH to MACHINE_CPUARCH assumes that all members of that +family are supported by one set of files on FreeBSD. So mips files +have support for both big and little endian. But MACHINE_ARCH +determines the default binaries that are generated. + +We'll likely need to have a MACHINE_ABI at some point. Both MIPS and +ARM have multiple ABIs, and we'll need something to be the default, +and different CPUs within a family might have different defaults. +Etc. Plus there's t he need for multilib. However, issues like this +are beyond the scope of this branch. Index: gnu/usr.bin/cc/Makefile.inc =================================================================== --- gnu/usr.bin/cc/Makefile.inc (.../head) (revision 204018) +++ gnu/usr.bin/cc/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -30,6 +30,13 @@ CFLAGS+= -DCROSS_COMPILE .endif +.if ${TARGET_ARCH} == "armeb" +CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END +.endif +.if ${TARGET_ARCH} == "mipsel" +CFLAGS += -DTARGET_ENDIAN_DEFAULT=0 +.endif + .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE) CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE} .endif Index: gnu/usr.bin/cc/cc_int/Makefile =================================================================== --- gnu/usr.bin/cc/cc_int/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/cc/cc_int/Makefile (.../user/imp/tbemd) (revision 204018) @@ -75,10 +75,6 @@ # Target specific, C specific object file C_TARGET_OBJS= -.if ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) -CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END -.endif - # Language-specific object files for C and Objective C. C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \ Index: gnu/usr.bin/cc/cc_tools/Makefile =================================================================== --- gnu/usr.bin/cc/cc_tools/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/cc/cc_tools/Makefile (.../user/imp/tbemd) (revision 204018) @@ -22,13 +22,13 @@ # The list of headers to go into tm.h # TARGET_INC+= options.h -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_CPUARCH} == "amd64" TARGET_INC+= i386/biarch64.h .endif -.if ${TARGET_ARCH} != "arm" +.if ${TARGET_CPUARCH} != "arm" TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h .endif -.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" +.if ${TARGET_CPUARCH} == "i386" || ${TARGET_CPUARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/unix.h TARGET_INC+= ${GCC_CPU}/att.h .endif @@ -38,25 +38,25 @@ TARGET_INC+= freebsd-native.h TARGET_INC+= freebsd-spec.h TARGET_INC+= freebsd.h -.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" +.if ${TARGET_CPUARCH} != "i386" && ${TARGET_CPUARCH} != "amd64" . if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h) TARGET_INC+= ${GCC_CPU}/sysv4.h . endif .endif -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_CPUARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/x86-64.h .endif -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "mips" +.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "mips" TARGET_INC+= ${GCC_CPU}/elf.h .endif -.if ${TARGET_ARCH} == "arm" +.if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/aout.h .endif TARGET_INC+= ${GCC_CPU}/freebsd.h -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_CPUARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/freebsd64.h .endif -.if ${TARGET_ARCH} == "arm" +.if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/arm.h .endif TARGET_INC+= defaults.h @@ -171,11 +171,11 @@ OPT_FILES+= ${.CURDIR}/${GCC_CPU}-freebsd.opt .endif -.if ${TARGET_ARCH} == "powerpc" +.if ${TARGET_CPUARCH} == "powerpc" OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/sysv4.opt .endif -.if ${TARGET_ARCH} == "sparc64" +.if ${TARGET_CPUARCH} == "sparc64" OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/long-double-switch.opt .endif Index: gnu/usr.bin/cc/Makefile.tgt =================================================================== --- gnu/usr.bin/cc/Makefile.tgt (.../head) (revision 204018) +++ gnu/usr.bin/cc/Makefile.tgt (.../user/imp/tbemd) (revision 204018) @@ -1,16 +1,15 @@ # $FreeBSD$ -TARGET_ARCH?= ${MACHINE_ARCH} +# These assignments duplicate much of the functionality of +# MACHINE_CPUARCH, but there's no easy way to export make functions... -.if ${TARGET_ARCH} == "amd64" -GCC_CPU= i386 -.elif ${TARGET_ARCH} == "powerpc" -GCC_CPU= rs6000 -.elif ${TARGET_ARCH} == "sparc64" -GCC_CPU= sparc +.if defined(TARGET_ARCH) +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} .else -GCC_CPU= ${TARGET_ARCH} +TARGET_CPUARCH=${MACHINE_CPUARCH} .endif +TARGET_ARCH?= ${MACHINE_ARCH} +GCC_CPU=${TARGET_CPUARCH:C/amd64/i386/:C/powerpc/rs6000/:C/sparc64/sparc/} .if ${TARGET_ARCH} == "ia64" TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD @@ -18,3 +17,6 @@ .if ${TARGET_ARCH} == "sparc64" TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" +TARGET_BIG_ENDIAN=t +.endif Index: gnu/usr.bin/binutils/libbfd/Makefile.mips =================================================================== --- gnu/usr.bin/binutils/libbfd/Makefile.mips (.../head) (revision 204018) +++ gnu/usr.bin/binutils/libbfd/Makefile.mips (.../user/imp/tbemd) (revision 204018) @@ -1,7 +1,10 @@ # $FreeBSD$ -#xxxIMPxxx: endian and size +.if ${TARGET_ARCH} == "mipsel" +DEFAULT_VECTOR= bfd_elf32_tradlittlemips_vec +.else DEFAULT_VECTOR= bfd_elf32_tradbigmips_vec +.endif SRCS+= coff-mips.c \ cpu-mips.c \ Index: gnu/usr.bin/binutils/libbfd/Makefile.arm =================================================================== --- gnu/usr.bin/binutils/libbfd/Makefile.arm (.../head) (revision 204018) +++ gnu/usr.bin/binutils/libbfd/Makefile.arm (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if defined(TARGET_BIG_ENDIAN) +.if ${TARGET_ARCH} == "armeb" DEFAULT_VECTOR= bfd_elf32_bigarm_vec .else DEFAULT_VECTOR= bfd_elf32_littlearm_vec @@ -14,7 +14,7 @@ elflink.c VECS+= ${DEFAULT_VECTOR} -.if defined(TARGET_BIG_ENDIAN) +.if ${TARGET_ARCH} == "armeb" VECS+= bfd_elf32_littlearm_vec .else VECS+= bfd_elf32_bigarm_vec Index: gnu/usr.bin/binutils/gdb/Makefile =================================================================== --- gnu/usr.bin/binutils/gdb/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/binutils/gdb/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,13 +8,7 @@ .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 -.else -GDB_CPU= ${TARGET_ARCH} -.endif +GDB_CPU=${TARGET_CPUARCH:C/amd64/i386/:C/powerpc/rs6000/:C/sparc64/sparc/} NO_SHARED?=yes PROG= gdb @@ -55,7 +49,7 @@ 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) @@ -121,8 +115,8 @@ 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} @@ -131,7 +125,7 @@ .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 Index: gnu/usr.bin/binutils/ld/Makefile.mips =================================================================== --- gnu/usr.bin/binutils/ld/Makefile.mips (.../head) (revision 204018) +++ gnu/usr.bin/binutils/ld/Makefile.mips (.../user/imp/tbemd) (revision 204018) @@ -1,10 +1,8 @@ # $FreeBSD$ -#xxxIMPxxx: size? -#xxxIMPxxx: TARGET_BIG_ENDIAN is lame. We should use the netbsd convention -# of mipsel and mips. +# XXX still need to swizle in size _sz?=32 -.if defined(TARGET_BIG_ENDIAN) +.if ${TARGET_ARCH} == "mipseb" NATIVE_EMULATION=elf${_sz}btsmip_fbsd .else NATIVE_EMULATION=elf${_sz}ltsmip_fbsd Index: gnu/usr.bin/binutils/ld/Makefile.arm =================================================================== --- gnu/usr.bin/binutils/ld/Makefile.arm (.../head) (revision 204018) +++ gnu/usr.bin/binutils/ld/Makefile.arm (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if defined(TARGET_BIG_ENDIAN) +.if ${TARGET_ARCH} == "armeb" NATIVE_EMULATION= armelfb_fbsd .else NATIVE_EMULATION= armelf_fbsd Index: gnu/usr.bin/binutils/as/Makefile =================================================================== --- gnu/usr.bin/binutils/as/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/binutils/as/Makefile (.../user/imp/tbemd) (revision 204018) @@ -20,7 +20,7 @@ # DEO: why not used? #SRCS+= itbl-ops.c -.if ${TARGET_ARCH} == "mips" +.if ${TARGET_CPUARCH} == "mips" SRCS+= itbl-ops.c itbl-parse.y itbl-lex.l .endif @@ -32,7 +32,7 @@ # change back to tc-sparc.c when new binutils is imported SRCS+= tc-sparc-fixed.c .else -SRCS+= tc-${TARGET_ARCH}.c +SRCS+= tc-${TARGET_CPUARCH}.c .endif .if ${TARGET_ARCH} == "sparc64" @@ -49,7 +49,7 @@ CFLAGS+= -DVERSION=\"${VERSION}\" CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/gas/config -I${SRCDIR} -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_ARCH}-freebsd +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd NO_SHARED?= yes Index: gnu/usr.bin/binutils/Makefile.inc0 =================================================================== --- gnu/usr.bin/binutils/Makefile.inc0 (.../head) (revision 204018) +++ gnu/usr.bin/binutils/Makefile.inc0 (.../user/imp/tbemd) (revision 204018) @@ -6,13 +6,17 @@ VERSION= "2.15 [FreeBSD] 2004-05-23" -TARGET_ARCH?= ${MACHINE_ARCH} -.if ${TARGET_ARCH} == "amd64" -BINUTILS_ARCH=x86_64 +.if defined(TARGET_ARCH) +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} .else -BINUTILS_ARCH=${TARGET_ARCH} +TARGET_CPUARCH=${MACHINE_CPUARCH} .endif +TARGET_ARCH?= ${MACHINE_ARCH} +BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} TARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" +TARGET_BIG_ENDIAN=t +.endif # RELTOP is the relative path to this point in the source or object # tree, from any subdirectory of same. It gets extra "../" prefixes @@ -22,27 +26,27 @@ RELSRC= ${RELTOP}/../../../contrib/binutils SRCDIR= ${.CURDIR}/${RELSRC} -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || \ - ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "mips" +.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ + ${TARGET_CPUARCH} == "powerpc" || ${TARGET_CPUARCH} == "mips" CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. -.if exists(${.CURDIR}/${TARGET_ARCH}) -CFLAGS+= -I${.CURDIR}/${TARGET_ARCH} +.if exists(${.CURDIR}/${TARGET_CPUARCH}) +CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} .endif CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include -.if exists(${.CURDIR}/${TARGET_ARCH}) -.PATH: ${.CURDIR}/${TARGET_ARCH} +.if exists(${.CURDIR}/${TARGET_CPUARCH}) +.PATH: ${.CURDIR}/${TARGET_CPUARCH} .endif -ARCHS= ${TARGET_ARCH} +ARCHS= ${TARGET_CPUARCH} .for _arch in ${CROSS_ARCH} .if (${ARCHS:R:M${_arch:R}} == "") Index: gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c =================================================================== --- gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c (.../head) (revision 204018) +++ gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c (.../user/imp/tbemd) (revision 204018) @@ -1,156 +0,0 @@ -/* FreeBSD/PowerPC specific low level interface, for the remote server for - GDB. - Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002 - Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -__FBSDID("$FreeBSD$"); - -#include "server.h" -#include "fbsd-low.h" - -#include -#include - -#define ppc_num_regs 71 - -/* Currently, don't check/send MQ. */ -static int ppc_regmap[] = - { 0, 4, 8, 12, 16, 20, 24, 28, - 32, 36, 40, 44, 48, 52, 56, 60, - 64, 68, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, -#if 0 - /* - * XXX on FreeBSD the gdbserver for PowerPC was only tested with FPU-less - * cores i.e. e500. Let's leave the original FPR references around in case - * someone picks up and brings support for AIM-like FPU machines. - */ - PT_FPR0*4, PT_FPR0*4 + 8, PT_FPR0*4+16, PT_FPR0*4+24, - PT_FPR0*4+32, PT_FPR0*4+40, PT_FPR0*4+48, PT_FPR0*4+56, - PT_FPR0*4+64, PT_FPR0*4+72, PT_FPR0*4+80, PT_FPR0*4+88, - PT_FPR0*4+96, PT_FPR0*4+104, PT_FPR0*4+112, PT_FPR0*4+120, - PT_FPR0*4+128, PT_FPR0*4+136, PT_FPR0*4+144, PT_FPR0*4+152, - PT_FPR0*4+160, PT_FPR0*4+168, PT_FPR0*4+176, PT_FPR0*4+184, - PT_FPR0*4+192, PT_FPR0*4+200, PT_FPR0*4+208, PT_FPR0*4+216, - PT_FPR0*4+224, PT_FPR0*4+232, PT_FPR0*4+240, PT_FPR0*4+248, -#endif - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - 144, -1, 132, 128, 140, 136, -1 - }; - -static int -ppc_cannot_store_register (int regno) -{ - /* Some kernels do not allow us to store fpscr. */ - if (regno == find_regno ("fpscr")) - return 2; - - return 0; -} - -static int -ppc_cannot_fetch_register (int regno) -{ - return 0; -} - -static CORE_ADDR -ppc_get_pc (void) -{ - unsigned long pc; - - collect_register_by_name ("pc", &pc); - return (CORE_ADDR) pc; -} - -static void -ppc_set_pc (CORE_ADDR pc) -{ - unsigned long newpc = pc; - - supply_register_by_name ("pc", &newpc); -} - -/* Correct in either endianness. Note that this file is - for PowerPC only, not PowerPC64. - This instruction is "twge r2, r2", which GDB uses as a software - breakpoint. */ -static const unsigned long ppc_breakpoint = 0x7d821008; -#define ppc_breakpoint_len 4 - -static int -ppc_breakpoint_at (CORE_ADDR where) -{ - unsigned long insn; - - (*the_target->read_memory) (where, (char *) &insn, 4); - if (insn == ppc_breakpoint) - return 1; - /* If necessary, recognize more trap instructions here. GDB only uses the - one. */ - return 0; -} - -static void -ppc_fill_gregset (void *buf) -{ - int i; - - for (i = 0; i < ppc_num_regs; i++) - if (ppc_regmap[i] != -1) - collect_register (i, ((char *) buf) + ppc_regmap[i]); - -} - -static void -ppc_store_gregset (const void *buf) -{ - int i; - - for (i = 0; i < ppc_num_regs; i++) - if (ppc_regmap[i] != -1) - supply_register (i, ((char *) buf) + ppc_regmap[i]); - -} - -struct regset_info target_regsets[] = { - { PT_GETREGS, PT_SETREGS, sizeof (struct reg), - GENERAL_REGS, - ppc_fill_gregset, ppc_store_gregset }, - { 0, 0, -1, -1, NULL, NULL } -}; - -struct fbsd_target_ops the_low_target = { - ppc_num_regs, - ppc_regmap, - ppc_cannot_fetch_register, - ppc_cannot_store_register, - ppc_get_pc, - ppc_set_pc, - (const char *) &ppc_breakpoint, - ppc_breakpoint_len, - NULL, - 0, - ppc_breakpoint_at, -}; Index: gnu/usr.bin/gdb/gdbserver/reg-ppc.c =================================================================== --- gnu/usr.bin/gdb/gdbserver/reg-ppc.c (.../head) (revision 204018) +++ gnu/usr.bin/gdb/gdbserver/reg-ppc.c (.../user/imp/tbemd) (revision 204018) @@ -1,113 +0,0 @@ -/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ - -/* A register protocol for GDB, the GNU debugger. - Copyright 2001, 2002 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This file was created with the aid of ``regdat.sh'' and ``../../../../contrib/gdb/gdb/regformats/reg-ppc.dat''. */ - -#include -__FBSDID("$FreeBSD$"); - -#include "regdef.h" -#include "regcache.h" - -struct reg regs_ppc[] = { - { "r0", 0, 32 }, - { "r1", 32, 32 }, - { "r2", 64, 32 }, - { "r3", 96, 32 }, - { "r4", 128, 32 }, - { "r5", 160, 32 }, - { "r6", 192, 32 }, - { "r7", 224, 32 }, - { "r8", 256, 32 }, - { "r9", 288, 32 }, - { "r10", 320, 32 }, - { "r11", 352, 32 }, - { "r12", 384, 32 }, - { "r13", 416, 32 }, - { "r14", 448, 32 }, - { "r15", 480, 32 }, - { "r16", 512, 32 }, - { "r17", 544, 32 }, - { "r18", 576, 32 }, - { "r19", 608, 32 }, - { "r20", 640, 32 }, - { "r21", 672, 32 }, - { "r22", 704, 32 }, - { "r23", 736, 32 }, - { "r24", 768, 32 }, - { "r25", 800, 32 }, - { "r26", 832, 32 }, - { "r27", 864, 32 }, - { "r28", 896, 32 }, - { "r29", 928, 32 }, - { "r30", 960, 32 }, - { "r31", 992, 32 }, - { "f0", 1024, 64 }, - { "f1", 1088, 64 }, - { "f2", 1152, 64 }, - { "f3", 1216, 64 }, - { "f4", 1280, 64 }, - { "f5", 1344, 64 }, - { "f6", 1408, 64 }, - { "f7", 1472, 64 }, - { "f8", 1536, 64 }, - { "f9", 1600, 64 }, - { "f10", 1664, 64 }, - { "f11", 1728, 64 }, - { "f12", 1792, 64 }, - { "f13", 1856, 64 }, - { "f14", 1920, 64 }, - { "f15", 1984, 64 }, - { "f16", 2048, 64 }, - { "f17", 2112, 64 }, - { "f18", 2176, 64 }, - { "f19", 2240, 64 }, - { "f20", 2304, 64 }, - { "f21", 2368, 64 }, - { "f22", 2432, 64 }, - { "f23", 2496, 64 }, - { "f24", 2560, 64 }, - { "f25", 2624, 64 }, - { "f26", 2688, 64 }, - { "f27", 2752, 64 }, - { "f28", 2816, 64 }, - { "f29", 2880, 64 }, - { "f30", 2944, 64 }, - { "f31", 3008, 64 }, - { "pc", 3072, 32 }, - { "ps", 3104, 32 }, - { "cr", 3136, 32 }, - { "lr", 3168, 32 }, - { "ctr", 3200, 32 }, - { "xer", 3232, 32 }, - { "fpscr", 3264, 32 }, -}; - -const char *expedite_regs_ppc[] = { "r1", "pc", 0 }; - -void -init_registers () -{ - set_register_cache (regs_ppc, - sizeof (regs_ppc) / sizeof (regs_ppc[0])); - gdbserver_expedite_regs = expedite_regs_ppc; -} Index: gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c =================================================================== --- gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c (.../head) (revision 0) +++ gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c (.../user/imp/tbemd) (revision 204018) @@ -0,0 +1,156 @@ +/* FreeBSD/PowerPC specific low level interface, for the remote server for + GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#include +#include + +#define ppc_num_regs 71 + +/* Currently, don't check/send MQ. */ +static int ppc_regmap[] = + { 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, +#if 0 + /* + * XXX on FreeBSD the gdbserver for PowerPC was only tested with FPU-less + * cores i.e. e500. Let's leave the original FPR references around in case + * someone picks up and brings support for AIM-like FPU machines. + */ + PT_FPR0*4, PT_FPR0*4 + 8, PT_FPR0*4+16, PT_FPR0*4+24, + PT_FPR0*4+32, PT_FPR0*4+40, PT_FPR0*4+48, PT_FPR0*4+56, + PT_FPR0*4+64, PT_FPR0*4+72, PT_FPR0*4+80, PT_FPR0*4+88, + PT_FPR0*4+96, PT_FPR0*4+104, PT_FPR0*4+112, PT_FPR0*4+120, + PT_FPR0*4+128, PT_FPR0*4+136, PT_FPR0*4+144, PT_FPR0*4+152, + PT_FPR0*4+160, PT_FPR0*4+168, PT_FPR0*4+176, PT_FPR0*4+184, + PT_FPR0*4+192, PT_FPR0*4+200, PT_FPR0*4+208, PT_FPR0*4+216, + PT_FPR0*4+224, PT_FPR0*4+232, PT_FPR0*4+240, PT_FPR0*4+248, +#endif + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 144, -1, 132, 128, 140, 136, -1 + }; + +static int +ppc_cannot_store_register (int regno) +{ + /* Some kernels do not allow us to store fpscr. */ + if (regno == find_regno ("fpscr")) + return 2; + + return 0; +} + +static int +ppc_cannot_fetch_register (int regno) +{ + return 0; +} + +static CORE_ADDR +ppc_get_pc (void) +{ + unsigned long pc; + + collect_register_by_name ("pc", &pc); + return (CORE_ADDR) pc; +} + +static void +ppc_set_pc (CORE_ADDR pc) +{ + unsigned long newpc = pc; + + supply_register_by_name ("pc", &newpc); +} + +/* Correct in either endianness. Note that this file is + for PowerPC only, not PowerPC64. + This instruction is "twge r2, r2", which GDB uses as a software + breakpoint. */ +static const unsigned long ppc_breakpoint = 0x7d821008; +#define ppc_breakpoint_len 4 + +static int +ppc_breakpoint_at (CORE_ADDR where) +{ + unsigned long insn; + + (*the_target->read_memory) (where, (char *) &insn, 4); + if (insn == ppc_breakpoint) + return 1; + /* If necessary, recognize more trap instructions here. GDB only uses the + one. */ + return 0; +} + +static void +ppc_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < ppc_num_regs; i++) + if (ppc_regmap[i] != -1) + collect_register (i, ((char *) buf) + ppc_regmap[i]); + +} + +static void +ppc_store_gregset (const void *buf) +{ + int i; + + for (i = 0; i < ppc_num_regs; i++) + if (ppc_regmap[i] != -1) + supply_register (i, ((char *) buf) + ppc_regmap[i]); + +} + +struct regset_info target_regsets[] = { + { PT_GETREGS, PT_SETREGS, sizeof (struct reg), + GENERAL_REGS, + ppc_fill_gregset, ppc_store_gregset }, + { 0, 0, -1, -1, NULL, NULL } +}; + +struct fbsd_target_ops the_low_target = { + ppc_num_regs, + ppc_regmap, + ppc_cannot_fetch_register, + ppc_cannot_store_register, + ppc_get_pc, + ppc_set_pc, + (const char *) &ppc_breakpoint, + ppc_breakpoint_len, + NULL, + 0, + ppc_breakpoint_at, +}; Property changes on: gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + FreeBSD=%H Added: svn:eol-style + native Index: gnu/usr.bin/gdb/gdbserver/reg-powerpc.c =================================================================== --- gnu/usr.bin/gdb/gdbserver/reg-powerpc.c (.../head) (revision 0) +++ gnu/usr.bin/gdb/gdbserver/reg-powerpc.c (.../user/imp/tbemd) (revision 204018) @@ -0,0 +1,113 @@ +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ + +/* A register protocol for GDB, the GNU debugger. + Copyright 2001, 2002 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file was created with the aid of ``regdat.sh'' and ``../../../../contrib/gdb/gdb/regformats/reg-ppc.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_ppc[] = { + { "r0", 0, 32 }, + { "r1", 32, 32 }, + { "r2", 64, 32 }, + { "r3", 96, 32 }, + { "r4", 128, 32 }, + { "r5", 160, 32 }, + { "r6", 192, 32 }, + { "r7", 224, 32 }, + { "r8", 256, 32 }, + { "r9", 288, 32 }, + { "r10", 320, 32 }, + { "r11", 352, 32 }, + { "r12", 384, 32 }, + { "r13", 416, 32 }, + { "r14", 448, 32 }, + { "r15", 480, 32 }, + { "r16", 512, 32 }, + { "r17", 544, 32 }, + { "r18", 576, 32 }, + { "r19", 608, 32 }, + { "r20", 640, 32 }, + { "r21", 672, 32 }, + { "r22", 704, 32 }, + { "r23", 736, 32 }, + { "r24", 768, 32 }, + { "r25", 800, 32 }, + { "r26", 832, 32 }, + { "r27", 864, 32 }, + { "r28", 896, 32 }, + { "r29", 928, 32 }, + { "r30", 960, 32 }, + { "r31", 992, 32 }, + { "f0", 1024, 64 }, + { "f1", 1088, 64 }, + { "f2", 1152, 64 }, + { "f3", 1216, 64 }, + { "f4", 1280, 64 }, + { "f5", 1344, 64 }, + { "f6", 1408, 64 }, + { "f7", 1472, 64 }, + { "f8", 1536, 64 }, + { "f9", 1600, 64 }, + { "f10", 1664, 64 }, + { "f11", 1728, 64 }, + { "f12", 1792, 64 }, + { "f13", 1856, 64 }, + { "f14", 1920, 64 }, + { "f15", 1984, 64 }, + { "f16", 2048, 64 }, + { "f17", 2112, 64 }, + { "f18", 2176, 64 }, + { "f19", 2240, 64 }, + { "f20", 2304, 64 }, + { "f21", 2368, 64 }, + { "f22", 2432, 64 }, + { "f23", 2496, 64 }, + { "f24", 2560, 64 }, + { "f25", 2624, 64 }, + { "f26", 2688, 64 }, + { "f27", 2752, 64 }, + { "f28", 2816, 64 }, + { "f29", 2880, 64 }, + { "f30", 2944, 64 }, + { "f31", 3008, 64 }, + { "pc", 3072, 32 }, + { "ps", 3104, 32 }, + { "cr", 3136, 32 }, + { "lr", 3168, 32 }, + { "ctr", 3200, 32 }, + { "xer", 3232, 32 }, + { "fpscr", 3264, 32 }, +}; + +const char *expedite_regs_ppc[] = { "r1", "pc", 0 }; + +void +init_registers () +{ + set_register_cache (regs_ppc, + sizeof (regs_ppc) / sizeof (regs_ppc[0])); + gdbserver_expedite_regs = expedite_regs_ppc; +} Property changes on: gnu/usr.bin/gdb/gdbserver/reg-powerpc.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + FreeBSD=%H Added: svn:eol-style + native Index: gnu/usr.bin/gdb/gdbserver/Makefile =================================================================== --- gnu/usr.bin/gdb/gdbserver/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/gdb/gdbserver/Makefile (.../user/imp/tbemd) (revision 204018) @@ -14,19 +14,13 @@ server.c signals.c target.c utils.c SRCS+= fbsd-low.c -.if ${MACHINE_ARCH} == "i386" -SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c -.endif +SRCS+= fbsd-${MACHINE_CPUARCH}-low.c reg-${MACHINE_CPUARCH}.c -.if ${MACHINE_ARCH} == "arm" -SRCS+= fbsd-arm-low.c reg-arm.c +.if ${MACHINE_CPUARCH} == "i386" +SRCS+= i387-fp.c .endif -.if ${MACHINE_ARCH} == "powerpc" -SRCS+= fbsd-ppc-low.c reg-ppc.c -.endif - -#CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} +#CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_CPUARCH} CFLAGS+= -I${GDBDIR}/gdb/gdbserver CFLAGS+= -I${GDBDIR}/gdb/regformats CFLAGS+= -DNO_MMALLOC -DGDBSERVER Index: gnu/usr.bin/gdb/libgdb/Makefile =================================================================== --- gnu/usr.bin/gdb/libgdb/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/gdb/libgdb/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,7 +1,15 @@ # $FreeBSD$ -TARGET_ARCH?= ${MACHINE_ARCH} +# 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} + LIB= gdb INTERNALLIB= SRCS= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c \ Index: gnu/usr.bin/gdb/Makefile.inc =================================================================== --- gnu/usr.bin/gdb/Makefile.inc (.../head) (revision 204018) +++ gnu/usr.bin/gdb/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -16,9 +16,17 @@ OBJ_BU= ${OBJ_ROOT}/binutils OBJ_GDB= ${OBJ_ROOT}/gdb -TARGET_ARCH?= ${MACHINE_ARCH} -TARGET_SUBDIR= ${BMAKE_GDB}/arch/${TARGET_ARCH} +# 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} +TARGET_SUBDIR= ${BMAKE_GDB}/arch/${TARGET_CPUARCH} + .if ${TARGET_ARCH} != ${MACHINE_ARCH} GDB_CROSS_DEBUGGER= .endif @@ -31,7 +39,7 @@ CFLAGS+= -DHAVE_CONFIG_H -DRL_NO_COMPAT -DMI_OUT=1 -DTUI=1 CFLAGS+= -I. CFLAGS+= -I${TARGET_SUBDIR} -CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARGET_ARCH} +CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARGET_CPUARCH} CFLAGS+= -I${CNTRB_GDB}/gdb CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_GDB}/include Index: gnu/usr.bin/gdb/kgdb/Makefile =================================================================== --- gnu/usr.bin/gdb/kgdb/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/gdb/kgdb/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= kgdb${GDB_SUFFIX} -SRCS= main.c kld.c kthr.c trgt.c trgt_${TARGET_ARCH}.c +SRCS= main.c kld.c kthr.c trgt.c trgt_${TARGET_CPUARCH}.c WARNS?= 2 BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \ Index: gnu/usr.bin/gdb/Makefile =================================================================== --- gnu/usr.bin/gdb/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/gdb/Makefile (.../user/imp/tbemd) (revision 204018) @@ -2,7 +2,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc" +.if exists(${.CURDIR}/gdbserver/reg-${MACHINE_CPUARCH}.c) SUBDIR+=gdbserver .endif Index: gnu/usr.bin/Makefile =================================================================== --- gnu/usr.bin/Makefile (.../head) (revision 204018) +++ gnu/usr.bin/Makefile (.../user/imp/tbemd) (revision 204018) @@ -21,7 +21,7 @@ sort \ ${_texinfo} -.if ${MACHINE_ARCH} == "mips" +.if ${MACHINE_CPUARCH} == "mips" MK_GDB=no # not yet .endif Index: gnu/lib/libgcc/Makefile =================================================================== --- gnu/lib/libgcc/Makefile (.../head) (revision 204018) +++ gnu/lib/libgcc/Makefile (.../user/imp/tbemd) (revision 204018) @@ -26,7 +26,7 @@ LDFLAGS+= -nodefaultlibs LDADD+= -lc -OBJS= # added to below in various ways depending on TARGET_ARCH +OBJS= # added to below in various ways depending on TARGET_CPUARCH #--------------------------------------------------------------------------- # @@ -99,7 +99,7 @@ # Platform specific bits. # When upgrading GCC, get the following definitions from config//t-* # -.if ${TARGET_ARCH} == "arm" +.if ${TARGET_CPUARCH} == "arm" # from config/arm/t-strongarm-elf CFLAGS+= -Dinhibit_libc -fno-inline LIB1ASMSRC = lib1funcs.asm @@ -115,11 +115,11 @@ # _fixsfsi _fixunssfsi _floatdidf _floatdisf .endif -.if ${TARGET_ARCH} == "mips" +.if ${TARGET_CPUARCH} == "mips" LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c .endif -.if ${TARGET_ARCH} == "ia64" +.if ${TARGET_CPUARCH} == "ia64" # from config/ia64/t-ia64 LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \ @@ -130,13 +130,13 @@ LIB2ADDEH = unwind-ia64.c unwind-sjlj.c unwind-c.c .endif -.if ${TARGET_ARCH} == "powerpc" +.if ${TARGET_CPUARCH} == "powerpc" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm LIB2FUNCS_STATIC_EXTRA = eabi.asm .endif -.if ${TARGET_ARCH} == "sparc64" +.if ${TARGET_CPUARCH} == "sparc64" # from config/sparc/t-elf LIB1ASMSRC = lb1spc.asm LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 @@ -183,8 +183,8 @@ # # Floating point emulation functions # -.if ${TARGET_ARCH} == "armNOT_YET" || \ - ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" +.if ${TARGET_CPUARCH} == "armNOT_YET" || \ + ${TARGET_CPUARCH} == "powerpc" || ${TARGET_CPUARCH} == "sparc64" FPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES -DFLOAT DPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES Index: gnu/lib/libgomp/Makefile =================================================================== --- gnu/lib/libgomp/Makefile (.../head) (revision 204018) +++ gnu/lib/libgomp/Makefile (.../user/imp/tbemd) (revision 204018) @@ -23,8 +23,9 @@ VERSION_MAP= ${SRCDIR}/libgomp.map # Target-specific OpenMP configuration -.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == i386 || \ - ${MACHINE_ARCH} == mips || ${MACHINE_ARCH} == powerpc +.if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == i386 || \ + ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb || \ + ${MACHINE_ARCH} == powerpc OMP_LOCK_ALIGN = 4 OMP_LOCK_KIND= 4 OMP_LOCK_SIZE= 4 Index: gnu/lib/csu/Makefile =================================================================== --- gnu/lib/csu/Makefile (.../head) (revision 204018) +++ gnu/lib/csu/Makefile (.../user/imp/tbemd) (revision 204018) @@ -23,18 +23,18 @@ 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" +.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 Index: gnu/lib/libstdc++/Makefile =================================================================== --- gnu/lib/libstdc++/Makefile (.../head) (revision 204018) +++ gnu/lib/libstdc++/Makefile (.../user/imp/tbemd) (revision 204018) @@ -13,7 +13,7 @@ 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 @@ -66,14 +66,14 @@ 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) @@ -82,7 +82,7 @@ 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 Index: sbin/atm/atmconfig/Makefile =================================================================== --- sbin/atm/atmconfig/Makefile (.../head) (revision 204018) +++ sbin/atm/atmconfig/Makefile (.../user/imp/tbemd) (revision 204018) @@ -27,7 +27,8 @@ CLEANFILES+= oid.h .endif -.if ${MACHINE_ARCH} == "arm" +# XXX - this is verboten +.if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif Index: sbin/Makefile =================================================================== --- sbin/Makefile (.../head) (revision 204018) +++ sbin/Makefile (.../user/imp/tbemd) (revision 204018) @@ -115,7 +115,7 @@ _rtsol= rtsol .endif -.if ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_CPUARCH} != "ia64" && ${MACHINE_CPUARCH} != "powerpc" _bsdlabel= bsdlabel .endif @@ -127,7 +127,7 @@ _routed= routed .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .if ${MACHINE} == "i386" _fdisk= fdisk .elif ${MACHINE} == "pc98" @@ -136,19 +136,19 @@ _sconfig= sconfig .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" _fdisk= fdisk .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" _fdisk= fdisk .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" _mca= mca .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" _sunlabel= sunlabel .endif Index: sbin/newfs_msdos/Makefile =================================================================== --- sbin/newfs_msdos/Makefile (.../head) (revision 204018) +++ sbin/newfs_msdos/Makefile (.../user/imp/tbemd) (revision 204018) @@ -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 Index: sbin/gbde/Makefile =================================================================== --- sbin/gbde/Makefile (.../head) (revision 204018) +++ sbin/gbde/Makefile (.../user/imp/tbemd) (revision 204018) @@ -9,7 +9,10 @@ # 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" +#XXX All the world isn't amd64 or i386 +.if ${MACHINE_CPUARCH} == "i386" +WARNS?= 5 +.else WARNS?= 3 .endif Index: sbin/bsdlabel/Makefile =================================================================== --- sbin/bsdlabel/Makefile (.../head) (revision 204018) +++ sbin/bsdlabel/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,7 +8,7 @@ #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 Index: sbin/routed/Makefile =================================================================== --- sbin/routed/Makefile (.../head) (revision 204018) +++ sbin/routed/Makefile (.../user/imp/tbemd) (revision 204018) @@ -7,7 +7,8 @@ SUBDIR= rtquery LDADD= -lmd DPADD= ${LIBMD} -.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "amd64" +# XXX this is verboten +.if ${MACHINE_CPUARCH} != "i386" && ${MACHINE_CPUARCH} != "amd64" WARNS?= 0 .endif Index: sbin/camcontrol/Makefile =================================================================== --- sbin/camcontrol/Makefile (.../head) (revision 204018) +++ sbin/camcontrol/Makefile (.../user/imp/tbemd) (revision 204018) @@ -7,7 +7,8 @@ .else CFLAGS+= -DMINIMALISTIC .endif -.if ${MACHINE_ARCH} == "arm" +# This is verboten +.if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL} Index: sbin/sunlabel/Makefile =================================================================== --- sbin/sunlabel/Makefile (.../head) (revision 204018) +++ sbin/sunlabel/Makefile (.../user/imp/tbemd) (revision 204018) @@ -6,7 +6,7 @@ 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 Index: tools/regression/bin/sh/expansion/arith3.0 =================================================================== --- tools/regression/bin/sh/expansion/arith3.0 (.../head) (revision 204018) +++ tools/regression/bin/sh/expansion/arith3.0 (.../user/imp/tbemd) (revision 204018) @@ -1,14 +0,0 @@ -# $FreeBSD$ - -failures=0 - -check() { - if [ $(($1)) != $2 ]; then - failures=$((failures+1)) - echo "For $1, expected $2 actual $(($1))" - fi -} - -check "1 << 1 + 1 | 1" 5 - -exit $((failures != 0)) Index: contrib/binutils/bfd/config.bfd =================================================================== --- contrib/binutils/bfd/config.bfd (.../head) (revision 204018) +++ contrib/binutils/bfd/config.bfd (.../user/imp/tbemd) (revision 204018) @@ -221,6 +221,10 @@ targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; + armeb-*-freebsd*) + targ_defvec=bfd_elf32_bigarm_vec + targ_selvecs=bfd_elf32_littlearm_vec + ;; arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks) targ_defvec=bfd_elf32_littlearm_vec Index: contrib/smbfs/Makefile =================================================================== --- contrib/smbfs/Makefile (.../head) (revision 204018) +++ contrib/smbfs/Makefile (.../user/imp/tbemd) (revision 204018) @@ -9,7 +9,7 @@ # deinstall-src undo corresponding install-* target # clean cleanup source tree -.if ${MACHINE_ARCH} != "i386" +.if ${MACHINE_CPUARCH} != "i386" . error "only IA32 machines supported" .endif Index: share/mk/bsd.lib.mk =================================================================== --- share/mk/bsd.lib.mk (.../head) (revision 204018) +++ share/mk/bsd.lib.mk (.../user/imp/tbemd) (revision 204018) @@ -53,7 +53,7 @@ .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 Index: share/mk/sys.mk =================================================================== --- share/mk/sys.mk (.../head) (revision 204018) +++ share/mk/sys.mk (.../user/imp/tbemd) (revision 204018) @@ -4,6 +4,18 @@ unix ?= We run FreeBSD, not UNIX. .FreeBSD ?= true +.if !defined(%POSIX) +# +# MACHINE_CPUARCH defines a collection of MACHINE_ARCH. Machines with +# the same MACHINE_ARCH can run reach-other's binaries, so it +# necessarily has word size and endian swizzled in. However, support +# files for these machines often are shared amongst all combinations +# of size and/or endian. This is called MACHINE_CPU in NetBSD, but +# that's used for something different in FreeBSD. +# +MACHINE_CPUARCH=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/} +.endif + # If the special target .POSIX appears (without prerequisites or # commands) before the first noncomment line in the makefile, make shall # process the makefile as specified by the Posix 1003.2 specification. @@ -35,7 +47,7 @@ CFLAGS ?= -O .else CC ?= cc -.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips" +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" CFLAGS ?= -O -pipe .else CFLAGS ?= -O2 -pipe Index: share/mk/bsd.cpu.mk =================================================================== --- share/mk/bsd.cpu.mk (.../head) (revision 204018) +++ share/mk/bsd.cpu.mk (.../user/imp/tbemd) (revision 204018) @@ -6,18 +6,18 @@ .if !defined(CPUTYPE) || empty(CPUTYPE) _CPUCFLAGS = -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" MACHINE_CPU = i486 -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" MACHINE_CPU = amd64 sse2 sse -. elif ${MACHINE_ARCH} == "ia64" +. elif ${MACHINE_CPUARCH} == "ia64" MACHINE_CPU = itanium -. elif ${MACHINE_ARCH} == "powerpc" +. elif ${MACHINE_CPUARCH} == "powerpc" MACHINE_CPU = aim -. elif ${MACHINE_ARCH} == "sparc64" -. elif ${MACHINE_ARCH} == "arm" +. elif ${MACHINE_CPUARCH} == "sparc64" +. elif ${MACHINE_CPUARCH} == "arm" MACHINE_CPU = arm -. elif ${MACHINE_ARCH} == "mips" +. elif ${MACHINE_CPUARCH} == "mips" MACHINE_CPU = mips . endif .else @@ -25,7 +25,7 @@ # Handle aliases (not documented in make.conf to avoid user confusion # between e.g. i586 and pentium) -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "nocona" CPUTYPE = prescott . elif ${CPUTYPE} == "core" || ${CPUTYPE} == "core2" @@ -54,7 +54,7 @@ . elif ${CPUTYPE} == "k7" CPUTYPE = athlon . endif -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" . if ${CPUTYPE} == "prescott" || ${CPUTYPE} == "core2" CPUTYPE = nocona . endif @@ -71,7 +71,7 @@ # http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html # http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "crusoe" _CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 . elif ${CPUTYPE} == "k5" @@ -104,9 +104,9 @@ . else _ICC_CPUCFLAGS = . endif # ICC on 'i386' -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" _CPUCFLAGS = -march=${CPUTYPE} -. elif ${MACHINE_ARCH} == "arm" +. elif ${MACHINE_CPUARCH} == "arm" . if ${CPUTYPE} == "xscale" #XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself #_CPUCFLAGS = -mcpu=xscale @@ -114,14 +114,14 @@ . else _CPUCFLAGS = -mcpu=${CPUTYPE} . endif -. elif ${MACHINE_ARCH} == "powerpc" +. elif ${MACHINE_CPUARCH} == "powerpc" . if ${CPUTYPE} == "e500" MACHINE_CPU = booke _CPUCFLAGS = -Wa,-me500 -msoft-float . else _CPUCFLAGS = -mcpu=${CPUTYPE} -mno-powerpc64 . endif -. elif ${MACHINE_ARCH} == "mips" +. elif ${MACHINE_CPUARCH} == "mips" . if ${CPUTYPE} == "mips32" _CPUCFLAGS = -march=mips32 . elif ${CPUTYPE} == "mips32r2" @@ -141,7 +141,7 @@ # unordered list to make it easy for client makefiles to test for the # presence of a CPU feature. -. if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386 . elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ @@ -180,37 +180,38 @@ . elif ${CPUTYPE} == "i386" MACHINE_CPU = i386 . endif -. elif ${MACHINE_ARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" . if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow . elif ${CPUTYPE} == "nocona" MACHINE_CPU = sse3 . endif MACHINE_CPU += amd64 sse2 sse mmx -. elif ${MACHINE_ARCH} == "ia64" +. elif ${MACHINE_CPUARCH} == "ia64" . if ${CPUTYPE} == "itanium" MACHINE_CPU = itanium . endif . endif .endif -.if ${MACHINE_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) -CFLAGS += -mbig-endian -LDFLAGS += -mbig-endian -LD += -EB -.endif +##XXXimp: These are bogus +#.if ${MACHINE_CPUARCH} == "arm" && defined(TARGET_BIG_ENDIAN) +#CFLAGS += -mbig-endian +#LDFLAGS += -mbig-endian +#LD += -EB +#.endif -.if ${MACHINE_ARCH} == "mips" -. if defined(TARGET_BIG_ENDIAN) -CFLAGS += -EB -LDFLAGS += -Wl,-EB -LD += -EB -. else -CFLAGS += -EL -LDFLAGS += -Wl,-EL -LD += -EL -. endif -CFLAGS += -msoft-float -G0 -mno-dsp -mabicalls +.if ${MACHINE_CPUARCH} == "mips" +#. if defined(TARGET_BIG_ENDIAN) +#CFLAGS += -EB +#LDFLAGS += -Wl,-EB +#LD += -EB +#. else +#CFLAGS += -EL +#LDFLAGS += -Wl,-EL +#LD += -EL +#. endif +CFLAGS += -msoft-float -G0 -mabicalls .endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk Index: share/mk/bsd.sys.mk =================================================================== --- share/mk/bsd.sys.mk (.../head) (revision 204018) +++ share/mk/bsd.sys.mk (.../user/imp/tbemd) (revision 204018) @@ -76,8 +76,8 @@ CWARNFLAGS += -Wno-unknown-pragmas .endif -.if ${MK_SSP} != "no" && ${CC} != "icc" && ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +.if ${MK_SSP} != "no" && ${CC} != "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} Index: share/mk/bsd.endian.mk =================================================================== --- share/mk/bsd.endian.mk (.../head) (revision 204018) +++ share/mk/bsd.endian.mk (.../user/imp/tbemd) (revision 204018) @@ -3,12 +3,12 @@ .if ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" || \ ${MACHINE_ARCH} == "ia64" || \ - (${MACHINE_ARCH} == "arm" && !defined(TARGET_BIG_ENDIAN)) || \ - (${MACHINE_ARCH} == "mips" && !defined(TARGET_BIG_ENDIAN)) + ${MACHINE_ARCH} == "arm" || \ + ${MACHINE_ARCH} == "mipsel" TARGET_ENDIANNESS= 1234 .elif ${MACHINE_ARCH} == "powerpc" || \ ${MACHINE_ARCH} == "sparc64" || \ - ${MACHINE_ARCH} == "arm" || \ - ${MACHINE_ARCH} == "mips" + ${MACHINE_ARCH} == "armeb" || \ + ${MACHINE_ARCH} == "mipseb" TARGET_ENDIANNESS= 4321 .endif Index: share/man/man4/Makefile =================================================================== --- share/man/man4/Makefile (.../head) (revision 204018) +++ share/man/man4/Makefile (.../user/imp/tbemd) (revision 204018) @@ -617,7 +617,7 @@ 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_aiboost.4=acpi_aiboost.4 _acpi_asus.4= acpi_asus.4 _acpi_dock.4= acpi_dock.4 @@ -666,12 +666,12 @@ MLINKS+=lindev.4 full.4 .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _atp.4= atp.4 .endif -.if exists(${.CURDIR}/man4.${MACHINE_ARCH}) -SUBDIR= man4.${MACHINE_ARCH} +.if exists(${.CURDIR}/man4.${MACHINE_CPUARCH}) +SUBDIR= man4.${MACHINE_CPUARCH} .endif .include Index: share/man/man5/Makefile =================================================================== --- share/man/man5/Makefile (.../head) (revision 204018) +++ share/man/man5/Makefile (.../user/imp/tbemd) (revision 204018) @@ -83,7 +83,7 @@ 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 Index: usr.sbin/amd/Makefile.inc =================================================================== --- usr.sbin/amd/Makefile.inc (.../head) (revision 204018) +++ usr.sbin/amd/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -27,7 +27,7 @@ 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 Index: usr.sbin/crunch/crunchide/Makefile =================================================================== --- usr.sbin/crunch/crunchide/Makefile (.../head) (revision 204018) +++ usr.sbin/crunch/crunchide/Makefile (.../user/imp/tbemd) (revision 204018) @@ -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,8 @@ SRCS+= exec_aout.c .endif -.if ${TARGET_ARCH} == ia64 || \ - ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64 +.if ${TARGET_CPUARCH} == ia64 || \ + ${TARGET_CPUARCH} == sparc64 || ${TARGET_CPUARCH} == amd64 CFLAGS+=-DNLIST_ELF64 SRCS+= exec_elf64.c exec_elf64.o: exec_elf32.c Index: usr.sbin/tcpdump/tcpdump/Makefile =================================================================== --- usr.sbin/tcpdump/tcpdump/Makefile (.../head) (revision 204018) +++ usr.sbin/tcpdump/tcpdump/Makefile (.../user/imp/tbemd) (revision 204018) @@ -46,7 +46,7 @@ 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 Index: usr.sbin/sade/Makefile =================================================================== --- usr.sbin/sade/Makefile (.../head) (revision 204018) +++ usr.sbin/sade/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} != "ia64" +.if ${MACHINE_CPUARCH} != "ia64" _wizard= wizard.c .endif Index: usr.sbin/apm/Makefile =================================================================== --- usr.sbin/apm/Makefile (.../head) (revision 204018) +++ usr.sbin/apm/Makefile (.../user/imp/tbemd) (revision 204018) @@ -3,6 +3,6 @@ PROG= apm MAN= apm.8 MLINKS= apm.8 apmconf.8 -MANSUBDIR= /${MACHINE_ARCH} +MANSUBDIR= /${MACHINE_CPUARCH} .include Index: usr.sbin/sysinstall/Makefile =================================================================== --- usr.sbin/sysinstall/Makefile (.../head) (revision 204018) +++ usr.sbin/sysinstall/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} != "ia64" +.if ${MACHINE_CPUARCH} != "ia64" _wizard= wizard.c .endif Index: usr.sbin/Makefile =================================================================== --- usr.sbin/Makefile (.../head) (revision 204018) +++ usr.sbin/Makefile (.../user/imp/tbemd) (revision 204018) @@ -393,11 +393,11 @@ .endif .if ${MK_SYSINSTALL} != "no" -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ - ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "sparc64" _sade= sade .endif -.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" _sysinstall= sysinstall .endif .endif @@ -408,7 +408,7 @@ .endif .if ${MK_USB} != "no" -.if ${MACHINE_ARCH} != "ia64" +.if ${MACHINE_CPUARCH} != "ia64" _uathload= uathload .endif _uhsoctl= uhsoctl @@ -422,11 +422,11 @@ _wpa= wpa .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" _kgmon= kgmon .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .if ${MK_APM} != "no" _apm= apm _apmd= apmd @@ -467,7 +467,7 @@ # kgzip: builds, but missing support files # mptable: broken (not 64 bit clean) # pnpinfo: crashes (not really useful anyway) -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" .if ${MK_ACPI} != "no" _acpi= acpi .endif @@ -495,7 +495,7 @@ _zzz= zzz .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" .if ${MK_ACPI} != "no" _acpi= acpi .endif @@ -504,13 +504,13 @@ _zzz= zzz .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _mount_smbfs= mount_smbfs _nvram= nvram _ofwdump= ofwdump .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" _eeprom= eeprom _mount_smbfs= mount_smbfs _ofwdump= ofwdump Index: usr.sbin/kldxref/Makefile =================================================================== --- usr.sbin/kldxref/Makefile (.../head) (revision 204018) +++ usr.sbin/kldxref/Makefile (.../user/imp/tbemd) (revision 204018) @@ -7,8 +7,8 @@ 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 Index: usr.sbin/ac/Makefile =================================================================== --- usr.sbin/ac/Makefile (.../head) (revision 204018) +++ usr.sbin/ac/Makefile (.../user/imp/tbemd) (revision 204018) @@ -4,7 +4,7 @@ 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 Index: cddl/lib/libdtrace/Makefile =================================================================== --- cddl/lib/libdtrace/Makefile (.../head) (revision 204018) +++ cddl/lib/libdtrace/Makefile (.../user/imp/tbemd) (revision 204018) @@ -64,9 +64,9 @@ #CFLAGS+= -DYYDEBUG -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -.elif ${MACHINE_ARCH} == "sparc64" +.elif ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc .else # temporary hack Index: cddl/lib/libzpool/Makefile =================================================================== --- cddl/lib/libzpool/Makefile (.../head) (revision 204018) +++ cddl/lib/libzpool/Makefile (.../user/imp/tbemd) (revision 204018) @@ -11,8 +11,8 @@ # LIST_SRCS .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/os # ATOMIC_SRCS -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" -.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "ia64" +.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_CPUARCH} ATOMIC_SRCS= opensolaris_atomic.S .else .PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern @@ -50,7 +50,7 @@ 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 Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (.../head) (revision 204018) +++ Makefile.inc1 (.../user/imp/tbemd) (revision 204018) @@ -15,6 +15,7 @@ # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # TARGET="machine" to crossbuild world for a different machine type +# TARGET_ARCH= may be required when a TARGET supports multiple endians. # # The intended user-driven targets are: @@ -29,8 +30,8 @@ .include -.if ${MACHINE_ARCH} == "mips" -MK_RESCUE=no # not yet +.if ${MACHINE_CPUARCH} == "mips" +#MK_RESCUE=no # not yet .endif # We must do share/info early so that installation of info `dir' @@ -120,16 +121,16 @@ # Guess machine architecture from machine type, and vice versa. .if !defined(TARGET_ARCH) && defined(TARGET) -TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/} +TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -TARGET= ${TARGET_ARCH} +TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm} .endif # Otherwise, default to current machine type and architecture. TARGET?= ${MACHINE} TARGET_ARCH?= ${MACHINE_ARCH} -KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v +KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips powerpc sparc64 sparc64/sun4v .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else @@ -166,7 +167,7 @@ .if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING) OBJTREE= ${MAKEOBJDIRPREFIX} .else -OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} +OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile @@ -1095,10 +1096,10 @@ # 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 .else -_startup_libs+= lib/csu/${MACHINE_ARCH} +_startup_libs+= lib/csu/${MACHINE_CPUARCH} .endif _startup_libs+= gnu/lib/libgcc _startup_libs+= lib/libc Index: lib/msun/Makefile =================================================================== --- lib/msun/Makefile (.../head) (revision 204018) +++ lib/msun/Makefile (.../user/imp/tbemd) (revision 204018) @@ -12,10 +12,10 @@ # # -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" ARCH_SUBDIR= i387 .else -ARCH_SUBDIR= ${MACHINE_ARCH} +ARCH_SUBDIR= ${MACHINE_CPUARCH} .endif .include "${ARCH_SUBDIR}/Makefile.inc" @@ -74,7 +74,7 @@ # 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 Index: lib/libc/stdlib/Makefile.inc =================================================================== --- lib/libc/stdlib/Makefile.inc (.../head) (revision 204018) +++ lib/libc/stdlib/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 @@ 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 \ Index: lib/libc/locale/Makefile.inc =================================================================== --- lib/libc/locale/Makefile.inc (.../head) (revision 204018) +++ lib/libc/locale/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 \ Index: lib/libc/softfloat/Makefile.inc =================================================================== --- lib/libc/softfloat/Makefile.inc (.../head) (revision 204018) +++ lib/libc/softfloat/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 Index: lib/libc/gen/Makefile.inc =================================================================== --- lib/libc/gen/Makefile.inc (.../head) (revision 204018) +++ lib/libc/gen/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 @@ 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 \ Index: lib/libc/Makefile =================================================================== --- lib/libc/Makefile (.../head) (revision 204018) +++ lib/libc/Makefile (.../user/imp/tbemd) (revision 204018) @@ -15,7 +15,7 @@ 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 @@ 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,9 +49,9 @@ .include "${.CURDIR}/net/Makefile.inc" .include "${.CURDIR}/nls/Makefile.inc" .include "${.CURDIR}/posix1e/Makefile.inc" -.if ${MACHINE_ARCH} != "amd64" && \ - ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "sparc64" +.if ${MACHINE_CPUARCH} != "amd64" && \ + ${MACHINE_CPUARCH} != "ia64" && \ + ${MACHINE_CPUARCH} != "sparc64" .include "${.CURDIR}/quad/Makefile.inc" .endif .include "${.CURDIR}/regex/Makefile.inc" @@ -64,7 +64,7 @@ .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" @@ -109,16 +109,16 @@ 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 # Disable warnings in contributed sources. Index: lib/libc/quad/Makefile.inc =================================================================== --- lib/libc/quad/Makefile.inc (.../head) (revision 204018) +++ lib/libc/quad/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 Index: lib/libc/string/Makefile.inc =================================================================== --- lib/libc/string/Makefile.inc (.../head) (revision 204018) +++ lib/libc/string/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 @@ # 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 \ Index: lib/libc/compat-43/Makefile.inc =================================================================== --- lib/libc/compat-43/Makefile.inc (.../head) (revision 204018) +++ lib/libc/compat-43/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 Index: lib/libc/sys/Makefile.inc =================================================================== --- lib/libc/sys/Makefile.inc (.../head) (revision 204018) +++ lib/libc/sys/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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: Index: lib/Makefile =================================================================== --- lib/Makefile (.../head) (revision 204018) +++ lib/Makefile (.../user/imp/tbemd) (revision 204018) @@ -43,10 +43,10 @@ ${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \ ${_bind} -.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 @@ -95,7 +95,7 @@ _libypclnt= libypclnt .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .if ${MK_NCP} != "no" _libncp= libncp .endif @@ -103,12 +103,12 @@ _libvgl= libvgl .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" _libefi= libefi _libsmb= libsmb .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" .if ${MK_NCP} != "no" _libncp= libncp .endif @@ -116,11 +116,11 @@ _libvgl= libvgl .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _libsmb= libsmb .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" _libsmb= libsmb .endif Index: lib/libdisk/Makefile =================================================================== --- lib/libdisk/Makefile (.../head) (revision 204018) +++ lib/libdisk/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" _open_disk= open_ia64_disk.c .else _change = change.c Index: lib/libthread_db/Makefile =================================================================== --- lib/libthread_db/Makefile (.../head) (revision 204018) +++ lib/libthread_db/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} LIB= thread_db SHLIB_MAJOR= 3 Index: lib/libthr/support/Makefile.inc =================================================================== --- lib/libthr/support/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/support/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,9 +1,9 @@ # $FreeBSD$ .PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string -.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys +.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} +CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} SYSCALLS= thr_new Index: lib/libthr/Makefile =================================================================== --- lib/libthr/Makefile (.../head) (revision 204018) +++ lib/libthr/Makefile (.../user/imp/tbemd) (revision 204018) @@ -19,10 +19,10 @@ CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ -I${.CURDIR}/../../include -CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include +CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} +CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline LDFLAGS+=-Wl,-znodelete @@ -38,7 +38,7 @@ PRECIOUSLIB= -.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" +.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" Index: lib/libthr/arch/arm/Makefile.inc =================================================================== --- lib/libthr/arch/arm/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/arch/arm/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= pthread_md.c Index: lib/libthr/arch/powerpc/Makefile.inc =================================================================== --- lib/libthr/arch/powerpc/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/arch/powerpc/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= pthread_md.c Index: lib/libthr/arch/sparc64/Makefile.inc =================================================================== --- lib/libthr/arch/sparc64/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/arch/sparc64/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= pthread_md.c Index: lib/libthr/arch/ia64/Makefile.inc =================================================================== --- lib/libthr/arch/ia64/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/arch/ia64/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= _umtx_op_err.S pthread_md.c Index: lib/libthr/arch/mips/Makefile.inc =================================================================== --- lib/libthr/arch/mips/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/arch/mips/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= pthread_md.c Index: lib/libthr/arch/i386/Makefile.inc =================================================================== --- lib/libthr/arch/i386/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/arch/i386/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= pthread_md.c _umtx_op_err.S Index: lib/libthr/arch/amd64/Makefile.inc =================================================================== --- lib/libthr/arch/amd64/Makefile.inc (.../head) (revision 204018) +++ lib/libthr/arch/amd64/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ #$FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= pthread_md.c _umtx_op_err.S Index: lib/libkvm/Makefile =================================================================== --- lib/libkvm/Makefile (.../head) (revision 204018) +++ lib/libkvm/Makefile (.../user/imp/tbemd) (revision 204018) @@ -11,10 +11,11 @@ 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 Index: lib/libc_r/sys/Makefile.inc =================================================================== --- lib/libc_r/sys/Makefile.inc (.../head) (revision 204018) +++ lib/libc_r/sys/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -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 Index: lib/libstand/Makefile =================================================================== --- lib/libstand/Makefile (.../head) (revision 204018) +++ lib/libstand/Makefile (.../user/imp/tbemd) (revision 204018) @@ -20,23 +20,23 @@ 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" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 -I. .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float -D_STANDALONE .endif @@ -54,19 +54,19 @@ # string functions from libc .PATH: ${.CURDIR}/../libc/string -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${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+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" .PATH: ${.CURDIR}/../libc/quad SRCS+= ashldi3.c ashrdi3.c .PATH: ${.CURDIR}/../libc/powerpc/gen @@ -90,10 +90,10 @@ SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" .PATH: ${.CURDIR}/i386 .else -.PATH: ${.CURDIR}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S @@ -155,7 +155,7 @@ .include -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine cleandepend: cleanmachine cleanmachine: Index: lib/libpmc/Makefile =================================================================== --- lib/libpmc/Makefile (.../head) (revision 204018) +++ lib/libpmc/Makefile (.../user/imp/tbemd) (revision 204018) @@ -22,7 +22,7 @@ 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 @@ -33,7 +33,7 @@ MAN+= pmc.p5.3 MAN+= pmc.p6.3 MAN+= pmc.tsc.3 -.elif ${MACHINE_ARCH} == "arm" && ${CPUTYPE} == "xscale" +.elif ${MACHINE_CPUARCH} == "arm" && ${CPUTYPE} == "xscale" MAN+= pmc.xscale.3 .endif Index: lib/libkse/support/Makefile.inc =================================================================== --- lib/libkse/support/Makefile.inc (.../head) (revision 204018) +++ lib/libkse/support/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,9 +1,9 @@ # $FreeBSD$ .PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string -.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys +.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys -CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} +CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} SYSCALLS= clock_gettime \ kse_create \ Index: lib/libkse/Makefile =================================================================== --- lib/libkse/Makefile (.../head) (revision 204018) +++ lib/libkse/Makefile (.../user/imp/tbemd) (revision 204018) @@ -15,10 +15,10 @@ CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ -I${.CURDIR}/../../include -CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include +CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf -CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} +CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} CFLAGS+=-fno-builtin # Uncomment this if you want libkse to contain debug information for @@ -38,7 +38,7 @@ PRECIOUSLIB= -.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" +.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" .include "${.CURDIR}/support/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" Index: lib/libkse/arch/arm/Makefile.inc =================================================================== --- lib/libkse/arch/arm/Makefile.inc (.../head) (revision 204018) +++ lib/libkse/arch/arm/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} CFLAGS+=-DSYSTEM_SCOPE_ONLY Index: lib/libkse/arch/powerpc/Makefile.inc =================================================================== --- lib/libkse/arch/powerpc/Makefile.inc (.../head) (revision 204018) +++ lib/libkse/arch/powerpc/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -3,6 +3,6 @@ # XXX temporary CFLAGS+=-DSYSTEM_SCOPE_ONLY -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= enter_uts.S context.S pthread_md.c Index: lib/libkse/arch/sparc64/Makefile.inc =================================================================== --- lib/libkse/arch/sparc64/Makefile.inc (.../head) (revision 204018) +++ lib/libkse/arch/sparc64/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= pthread_md.c thr_getcontext.S Index: lib/libkse/arch/ia64/Makefile.inc =================================================================== --- lib/libkse/arch/ia64/Makefile.inc (.../head) (revision 204018) +++ lib/libkse/arch/ia64/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= context.S enter_uts.S pthread_md.c Index: lib/libkse/arch/i386/Makefile.inc =================================================================== --- lib/libkse/arch/i386/Makefile.inc (.../head) (revision 204018) +++ lib/libkse/arch/i386/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= thr_enter_uts.S thr_getcontext.S pthread_md.c Index: lib/libkse/arch/amd64/Makefile.inc =================================================================== --- lib/libkse/arch/amd64/Makefile.inc (.../head) (revision 204018) +++ lib/libkse/arch/amd64/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} SRCS+= context.S enter_uts.S pthread_md.c Index: lib/bind/config.mk =================================================================== --- lib/bind/config.mk (.../head) (revision 204018) +++ lib/bind/config.mk (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,7 @@ # $FreeBSD$ .include +.include # BIND version number .if defined(BIND_DIR) && exists(${BIND_DIR}/version) @@ -45,7 +46,7 @@ CFLAGS+= -DUSE_MD5 # Endianness -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.if ${TARGET_ENDIANNESS} == 4321 CFLAGS+= -DWORDS_BIGENDIAN .endif @@ -64,10 +65,10 @@ .endif # Use the right version of the atomic.h file from lib/isc -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" ISC_ATOMIC_ARCH= x86_32 .else -ISC_ATOMIC_ARCH= ${MACHINE_ARCH} +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} .endif # Optional features Index: lib/libcompat/Makefile =================================================================== --- lib/libcompat/Makefile (.../head) (revision 204018) +++ lib/libcompat/Makefile (.../user/imp/tbemd) (revision 204018) @@ -7,9 +7,9 @@ WARNS?= 1 -.PATH: ${.CURDIR}/4.1/${MACHINE_ARCH} ${.CURDIR}/4.1 \ - ${.CURDIR}/4.3/${MACHINE_ARCH} ${.CURDIR}/4.3 \ - ${.CURDIR}/4.4/${MACHINE_ARCH} ${.CURDIR}/4.4 \ +.PATH: ${.CURDIR}/4.1/${MACHINE_CPUARCH} ${.CURDIR}/4.1 \ + ${.CURDIR}/4.3/${MACHINE_CPUARCH} ${.CURDIR}/4.3 \ + ${.CURDIR}/4.4/${MACHINE_CPUARCH} ${.CURDIR}/4.4 \ ${.CURDIR}/regexp # compat 4.1 sources Index: etc/Makefile =================================================================== --- etc/Makefile (.../head) (revision 204018) +++ etc/Makefile (.../user/imp/tbemd) (revision 204018) @@ -23,7 +23,7 @@ .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys .else -BIN1+= etc.${MACHINE_ARCH}/ttys +BIN1+= etc.${MACHINE_CPUARCH}/ttys .endif OPENBSMDIR= ${.CURDIR}/../contrib/openbsm Index: libexec/rtld-elf/i386/Makefile.inc =================================================================== --- libexec/rtld-elf/i386/Makefile.inc (.../head) (revision 204018) +++ libexec/rtld-elf/i386/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -2,4 +2,4 @@ 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 Index: libexec/rtld-elf/amd64/Makefile.inc =================================================================== --- libexec/rtld-elf/amd64/Makefile.inc (.../head) (revision 204018) +++ libexec/rtld-elf/amd64/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -2,4 +2,4 @@ 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 Index: libexec/rtld-elf/Makefile =================================================================== --- libexec/rtld-elf/Makefile (.../head) (revision 204018) +++ libexec/rtld-elf/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,4 +1,4 @@ -# $FreeBSD$ +user: # $FreeBSD/imp/tbemd/libexec/rtld-elf/Makefile 201380 2010-01-02 09:50:19Z ed $ .include MK_SSP= no @@ -10,7 +10,7 @@ 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} LDFLAGS+= -nostdlib -e .rtld_start WARNS?= 2 INSTALLFLAGS= -C -b @@ -25,7 +25,7 @@ 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 @@ -35,14 +35,14 @@ ${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. @@ -52,7 +52,7 @@ -chflags noschg ${DESTDIR}/usr/libexec/${PROG} .endif -.PATH: ${.CURDIR}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/${MACHINE_CPUARCH} .include .include Index: sys/conf/kern.post.mk =================================================================== --- sys/conf/kern.post.mk (.../head) (revision 204018) +++ sys/conf/kern.post.mk (.../user/imp/tbemd) (revision 204018) @@ -76,8 +76,8 @@ 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 @@ -160,8 +160,8 @@ mv .newdep .depend _ILINKS= machine -.if ${MACHINE} != ${MACHINE_ARCH} -_ILINKS+= ${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_ILINKS+= ${MACHINE_CPUARCH} .endif # Ensure that the link exists without depending on it when it exists. @@ -175,8 +175,8 @@ @case ${.TARGET} in \ machine) \ path=${S}/${MACHINE}/include ;; \ - ${MACHINE_ARCH}) \ - path=${S}/${MACHINE_ARCH}/include ;; \ + ${MACHINE_CPUARCH}) \ + path=${S}/${MACHINE_CPUARCH}/include ;; \ esac ; \ ${ECHO} ${.TARGET} "->" $$path ; \ ln -s $$path ${.TARGET} Index: sys/conf/kern.pre.mk =================================================================== --- sys/conf/kern.pre.mk (.../head) (revision 204018) +++ sys/conf/kern.pre.mk (.../user/imp/tbemd) (revision 204018) @@ -12,7 +12,7 @@ LDSCRIPT_NAME?= ldscript.$M LDSCRIPT?= $S/conf/${LDSCRIPT_NAME} -M= ${MACHINE_ARCH} +M= ${MACHINE_CPUARCH} AWK?= awk LINT?= lint @@ -29,7 +29,7 @@ . else _MINUS_O= -O2 . endif -. if ${MACHINE_ARCH} == "amd64" +. if ${MACHINE_CPUARCH} == "amd64" COPTFLAGS?=-O2 -frename-registers -pipe . else COPTFLAGS?=${_MINUS_O} -pipe Index: sys/conf/Makefile.mips =================================================================== --- sys/conf/Makefile.mips (.../head) (revision 204018) +++ sys/conf/Makefile.mips (.../user/imp/tbemd) (revision 204018) @@ -32,9 +32,6 @@ SYSTEM_LD:= ${SYSTEM_LD:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}} SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}} -# XXX: Such sweeping assumptions... -MACHINE=mips -MACHINE_ARCH=mips KERNLOADADDR?=0x80001000 # This obscure value is defined by CFE for WR160N # To be changed later @@ -48,29 +45,7 @@ EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 HACK_EXTRA_FLAGS=-shared -.if defined(TARGET_BIG_ENDIAN) -CFLAGS+=-EB -SYSTEM_LD+=-EB -EXTRA_FLAGS+=-EB -TRAMP_LDFLAGS+=-Wl,-EB -HACK_EXTRA_FLAGS+=-EB -Wl,-EB -.if defined(TARGET_64BIT) -SYSTEM_LD+=-m elf64btsmip_fbsd -HACK_EXTRA_FLAGS+=-Wl,-m,elf64btsmip_fbsd -.endif -.else -CFLAGS+=-EL -SYSTEM_LD+=-EL -EXTRA_FLAGS+=-EL -TRAMP_LDFLAGS+=-Wl,-EL -HACK_EXTRA_FLAGS+=-EL -Wl,-EL -.if defined(TARGET_64BIT) -SYSTEM_LD+=-m elf64ltsmip_fbsd -HACK_EXTRA_FLAGS+=-Wl,-m,elf64ltsmip_fbsd -.endif -.endif - # We add the -fno-pic flag to kernels because otherwise performance # is extremely poor, as well as -mno-abicalls to force no ABI usage. CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS) Index: sys/conf/ldscript.mips.octeon1.32 =================================================================== --- sys/conf/ldscript.mips.octeon1.32 (.../head) (revision 204018) +++ sys/conf/ldscript.mips.octeon1.32 (.../user/imp/tbemd) (revision 204018) @@ -7,7 +7,7 @@ ENTRY(_start) SECTIONS { - . = KERNLOADADDR + SIZEOF_HEADERS; + . = KERNLOADADDR; .text . : { *(.text) *(.dynamic) Index: sys/conf/Makefile.pc98 =================================================================== --- sys/conf/Makefile.pc98 (.../head) (revision 204018) +++ sys/conf/Makefile.pc98 (.../user/imp/tbemd) (revision 204018) @@ -30,8 +30,6 @@ .endif .include "$S/conf/kern.pre.mk" -MACHINE=pc98 - MKMODULESENV+= MACHINE=${MACHINE} %BEFORE_DEPEND Index: sys/conf/kmod.mk =================================================================== --- sys/conf/kmod.mk (.../head) (revision 204018) +++ sys/conf/kmod.mk (.../user/imp/tbemd) (revision 204018) @@ -120,11 +120,11 @@ LDFLAGS+= -d -warn-common CFLAGS+= ${DEBUG_FLAGS} -.if ${MACHINE_ARCH} == amd64 +.if ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif @@ -174,7 +174,7 @@ ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} .endif -.if ${MACHINE_ARCH} != amd64 +.if ${MACHINE_CPUARCH} != amd64 ${FULLPROG}: ${KMOD}.kld ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld .if !defined(DEBUG_FLAGS) @@ -187,7 +187,7 @@ CLEANFILES+= export_syms .endif -.if ${MACHINE_ARCH} != amd64 +.if ${MACHINE_CPUARCH} != amd64 ${KMOD}.kld: ${OBJS} .else ${FULLPROG}: ${OBJS} @@ -206,13 +206,13 @@ export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .endif -.if !defined(DEBUG_FLAGS) && ${MACHINE_ARCH} == amd64 +.if !defined(DEBUG_FLAGS) && ${MACHINE_CPUARCH} == amd64 ${OBJCOPY} --strip-debug ${.TARGET} .endif _ILINKS=@ machine -.if ${MACHINE} != ${MACHINE_ARCH} -_ILINKS+=${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_ILINKS+=${MACHINE_CPUARCH} .endif all: objwarn ${PROG} @@ -239,8 +239,8 @@ ${_ILINKS}: @case ${.TARGET} in \ - ${MACHINE_ARCH}) \ - path=${SYSDIR}/${MACHINE_ARCH}/include ;; \ + ${MACHINE_CPUARCH}) \ + path=${SYSDIR}/${MACHINE_CPUARCH}/include ;; \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ @) \ @@ -433,11 +433,11 @@ .endif sh @/kern/genassym.sh genassym.o > ${.TARGET} .if exists(@) -genassym.o: @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c +genassym.o: @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif genassym.o: @ machine ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-fno-common} \ - @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c + @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif lint: ${SRCS} Index: sys/conf/kern.mk =================================================================== --- sys/conf/kern.mk (.../head) (revision 204018) +++ sys/conf/kern.mk (.../user/imp/tbemd) (revision 204018) @@ -11,7 +11,7 @@ CWARNFLAGS= .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ - -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ + -Wmissing-prototypes -Wpointer-arith -Wcast-qual \ -Wundef -Wno-pointer-sign -fformat-extensions .endif # @@ -29,20 +29,20 @@ # operations inside the kernel itself. These operations are exclusively # reserved for user applications. # -.if ${MACHINE_ARCH} == "i386" && ${CC} != "icc" +.if ${MACHINE_CPUARCH} == "i386" && ${CC} != "icc" CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 INLINE_LIMIT?= 8000 .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" INLINE_LIMIT?= 8000 .endif # # For IA-64, we use r13 for the kernel globals pointer and we only use # a very small subset of float registers for integer divides. # -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127 -fpic #-mno-sdata INLINE_LIMIT?= 15000 .endif @@ -52,7 +52,7 @@ # point emulation. This avoids using floating point registers for integer # operations which it has a tendency to do. # -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -mcmodel=medany -msoft-float INLINE_LIMIT?= 15000 .endif @@ -62,7 +62,7 @@ # operations inside the kernel itself. These operations are exclusively # reserved for user applications. # -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mcmodel=kernel -mno-red-zone \ -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow \ -msoft-float -fno-asynchronous-unwind-tables @@ -74,7 +74,7 @@ # floating point registers for integer operations which it has a tendency to do. # Also explicitly disable Altivec instructions inside the kernel. # -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -mno-altivec INLINE_LIMIT?= 15000 .endif @@ -82,7 +82,7 @@ # # For MIPS we also tell gcc to use floating point emulation # -.if ${MACHINE_ARCH} == "mips" +.if ${MACHINE_CPUARCH} == "mips" CFLAGS+= -msoft-float INLINE_LIMIT?= 8000 .endif @@ -104,7 +104,7 @@ # # GCC SSP support. # -.if ${MK_SSP} != "no" && ${CC} != "icc" && ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +.if ${MK_SSP} != "no" && ${CC} != "icc" && ${MACHINE_CPUARCH} != "ia64" && \ + ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" CFLAGS+= -fstack-protector .endif Index: sys/kern/Makefile =================================================================== --- sys/kern/Makefile (.../head) (revision 204018) +++ sys/kern/Makefile (.../user/imp/tbemd) (revision 204018) @@ -28,7 +28,7 @@ # are placed in each source directory. We need to have links to tags files # from the generic directories that are relative to the machine type, even # via remote mounts; therefore we use symlinks to $SYSTAGS, which points at -# ${SYSDIR}/${MACHINE_ARCH}/tags. +# ${SYSDIR}/${MACHINE_CPUARCH}/tags. SYSTAGS=/var/db/sys_tags SYSDIR=/sys @@ -51,7 +51,7 @@ links:: rm -f ${SYSTAGS} - ln -s ${SYSDIR}/${MACHINE_ARCH}/tags ${SYSTAGS} + ln -s ${SYSDIR}/${MACHINE_CPUARCH}/tags ${SYSTAGS} -for i in ${DGEN}; do \ (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }) done -for i in ${ARCH}; do \ Index: sys/kern/kern_sysctl.c =================================================================== --- sys/kern/kern_sysctl.c (.../head) (revision 204018) +++ sys/kern/kern_sysctl.c (.../user/imp/tbemd) (revision 204018) @@ -827,7 +827,7 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_ARGS) { char *p; - int error, oid[CTL_MAXNAME], len; + int error, oid[CTL_MAXNAME], len = 0; struct sysctl_oid *op = 0; SYSCTL_ASSERT_LOCKED(); Index: sys/boot/arm/uboot/ldscript.armbe =================================================================== --- sys/boot/arm/uboot/ldscript.armbe (.../head) (revision 0) +++ sys/boot/arm/uboot/ldscript.armbe (.../user/imp/tbemd) (revision 204018) @@ -0,0 +1,134 @@ +/* $FreeBSD: user/imp/tbemd/sys/boot/arm/uboot/ldscript.armbe -1 $ */ + +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0x1000000 + SIZEOF_HEADERS; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rela.text : + { *(.rela.text) *(.rela.gnu.linkonce.t*) } + .rela.data : + { *(.rela.data) *(.rela.gnu.linkonce.d*) } + .rela.rodata : + { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } + .rela.got : { *(.rela.got) } + .rela.got1 : { *(.rela.got1) } + .rela.got2 : { *(.rela.got2) } + .rela.ctors : { *(.rela.ctors) } + .rela.dtors : { *(.rela.dtors) } + .rela.init : { *(.rela.init) } + .rela.fini : { *(.rela.fini) } + .rela.bss : { *(.rela.bss) } + .rela.plt : { *(.rela.plt) } + .rela.sdata : { *(.rela.sdata) } + .rela.sbss : { *(.rela.sbss) } + .rela.sdata2 : { *(.rela.sdata2) } + .rela.sbss2 : { *(.rela.sbss2) } + .text : + { + *(.text) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } =0 + _etext = .; + PROVIDE (etext = .); + .init : { *(.init) } =0 + .fini : { *(.fini) } =0 + .rodata : { *(.rodata) *(.gnu.linkonce.r*) } + .rodata1 : { *(.rodata1) } + .sdata2 : { *(.sdata2) } + .sbss2 : { *(.sbss2) } + /* Adjust the address for the data segment to the next page up. */ + . = ((. + 0x1000) & ~(0x1000 - 1)); + .data : + { + *(.data) + *(.gnu.linkonce.d*) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .got1 : { *(.got1) } + .dynamic : { *(.dynamic) } + /* Put .ctors and .dtors next to the .got2 section, so that the pointers + get relocated with -mrelocatable. Also put in the .fixup pointers. + The current compiler no longer needs this, but keep it around for 2.7.2 */ + PROVIDE (_GOT2_START_ = .); + .got2 : { *(.got2) } + PROVIDE (__CTOR_LIST__ = .); + .ctors : { *(.ctors) } + PROVIDE (__CTOR_END__ = .); + PROVIDE (__DTOR_LIST__ = .); + .dtors : { *(.dtors) } + PROVIDE (__DTOR_END__ = .); + PROVIDE (_FIXUP_START_ = .); + .fixup : { *(.fixup) } + PROVIDE (_FIXUP_END_ = .); + PROVIDE (_GOT2_END_ = .); + PROVIDE (_GOT_START_ = .); + .got : { *(.got) } + .got.plt : { *(.got.plt) } + PROVIDE (_GOT_END_ = .); + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + _edata = .; + PROVIDE (edata = .); + .sbss : + { + PROVIDE (__sbss_start = .); + *(.sbss) + *(.scommon) + *(.dynsbss) + PROVIDE (__sbss_end = .); + } + .plt : { *(.plt) } + .bss : + { + PROVIDE (__bss_start = .); + *(.dynbss) + *(.bss) + *(COMMON) + } + _end = . ; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* These must appear regardless of . */ +} Index: sys/boot/arm/uboot/ldscript.armeb =================================================================== --- sys/boot/arm/uboot/ldscript.armeb (.../head) (revision 0) +++ sys/boot/arm/uboot/ldscript.armeb (.../user/imp/tbemd) (revision 204018) @@ -0,0 +1,134 @@ +/* $FreeBSD$ */ + +OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0x1000000 + SIZEOF_HEADERS; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rela.text : + { *(.rela.text) *(.rela.gnu.linkonce.t*) } + .rela.data : + { *(.rela.data) *(.rela.gnu.linkonce.d*) } + .rela.rodata : + { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } + .rela.got : { *(.rela.got) } + .rela.got1 : { *(.rela.got1) } + .rela.got2 : { *(.rela.got2) } + .rela.ctors : { *(.rela.ctors) } + .rela.dtors : { *(.rela.dtors) } + .rela.init : { *(.rela.init) } + .rela.fini : { *(.rela.fini) } + .rela.bss : { *(.rela.bss) } + .rela.plt : { *(.rela.plt) } + .rela.sdata : { *(.rela.sdata) } + .rela.sbss : { *(.rela.sbss) } + .rela.sdata2 : { *(.rela.sdata2) } + .rela.sbss2 : { *(.rela.sbss2) } + .text : + { + *(.text) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } =0 + _etext = .; + PROVIDE (etext = .); + .init : { *(.init) } =0 + .fini : { *(.fini) } =0 + .rodata : { *(.rodata) *(.gnu.linkonce.r*) } + .rodata1 : { *(.rodata1) } + .sdata2 : { *(.sdata2) } + .sbss2 : { *(.sbss2) } + /* Adjust the address for the data segment to the next page up. */ + . = ((. + 0x1000) & ~(0x1000 - 1)); + .data : + { + *(.data) + *(.gnu.linkonce.d*) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .got1 : { *(.got1) } + .dynamic : { *(.dynamic) } + /* Put .ctors and .dtors next to the .got2 section, so that the pointers + get relocated with -mrelocatable. Also put in the .fixup pointers. + The current compiler no longer needs this, but keep it around for 2.7.2 */ + PROVIDE (_GOT2_START_ = .); + .got2 : { *(.got2) } + PROVIDE (__CTOR_LIST__ = .); + .ctors : { *(.ctors) } + PROVIDE (__CTOR_END__ = .); + PROVIDE (__DTOR_LIST__ = .); + .dtors : { *(.dtors) } + PROVIDE (__DTOR_END__ = .); + PROVIDE (_FIXUP_START_ = .); + .fixup : { *(.fixup) } + PROVIDE (_FIXUP_END_ = .); + PROVIDE (_GOT2_END_ = .); + PROVIDE (_GOT_START_ = .); + .got : { *(.got) } + .got.plt : { *(.got.plt) } + PROVIDE (_GOT_END_ = .); + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + _edata = .; + PROVIDE (edata = .); + .sbss : + { + PROVIDE (__sbss_start = .); + *(.sbss) + *(.scommon) + *(.dynsbss) + PROVIDE (__sbss_end = .); + } + .plt : { *(.plt) } + .bss : + { + PROVIDE (__bss_start = .); + *(.dynbss) + *(.bss) + *(COMMON) + } + _end = . ; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* These must appear regardless of . */ +} Property changes on: sys/boot/arm/uboot/ldscript.armeb ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + FreeBSD=%H Added: svn:eol-style + native Index: sys/boot/arm/uboot/Makefile =================================================================== --- sys/boot/arm/uboot/Makefile (.../head) (revision 204018) +++ sys/boot/arm/uboot/Makefile (.../user/imp/tbemd) (revision 204018) @@ -64,7 +64,7 @@ CFLAGS+= -ffreestanding -LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.arm +LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_ARCH} # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common Index: sys/boot/arm/ixp425/boot2/Makefile =================================================================== --- sys/boot/arm/ixp425/boot2/Makefile (.../head) (revision 204018) +++ sys/boot/arm/ixp425/boot2/Makefile (.../user/imp/tbemd) (revision 204018) @@ -20,7 +20,7 @@ KERNPHYSADDR=0x180000 KERNVIRTADDR=${KERNPHYSADDR} BOOT_STACK=0x200000-4 -M=${MACHINE_ARCH} +M=${MACHINE_CPUARCH} LDFLAGS=-e ${KERNPHYSADDR} -EB -T ldscript.${M} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} S=${.CURDIR}/../../../.. Index: sys/boot/common/Makefile.inc =================================================================== --- sys/boot/common/Makefile.inc (.../head) (revision 204018) +++ sys/boot/common/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -4,14 +4,14 @@ SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= module.c panic.c -.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c .elif ${MACHINE} == "pc98" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.elif ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" SRCS+= load_elf32.c reloc_elf32.c -.elif ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "ia64" +.elif ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "ia64" SRCS+= load_elf64.c reloc_elf64.c .endif Index: sys/boot/uboot/lib/Makefile =================================================================== --- sys/boot/uboot/lib/Makefile (.../head) (revision 204018) +++ sys/boot/uboot/lib/Makefile (.../user/imp/tbemd) (revision 204018) @@ -19,7 +19,7 @@ .endif machine: - ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine + ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine CLEANFILES+= machine Index: sys/boot/i386/libi386/Makefile =================================================================== --- sys/boot/i386/libi386/Makefile (.../head) (revision 204018) +++ sys/boot/i386/libi386/Makefile (.../user/imp/tbemd) (revision 204018) @@ -53,7 +53,7 @@ # the location of libstand CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: ln -sf ${.CURDIR}/../../../i386/include machine @@ -61,6 +61,6 @@ .include -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine .endif Index: sys/boot/i386/Makefile.inc =================================================================== --- sys/boot/i386/Makefile.inc (.../head) (revision 204018) +++ sys/boot/i386/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -9,7 +9,7 @@ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 LDFLAGS+= -nostdlib -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 -march=i386 LDFLAGS+= -m elf_i386_fbsd AFLAGS+= --32 Index: sys/boot/i386/boot2/Makefile =================================================================== --- sys/boot/i386/boot2/Makefile (.../head) (revision 204018) +++ sys/boot/i386/boot2/Makefile (.../user/imp/tbemd) (revision 204018) @@ -94,7 +94,7 @@ ORG1=`printf "%d" ${ORG1}` \ REL1=`printf "%d" ${REL1}` > ${.TARGET} -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend boot2.s: machine CLEANFILES+= machine machine: Index: sys/boot/i386/zfsboot/Makefile =================================================================== --- sys/boot/i386/zfsboot/Makefile (.../head) (revision 204018) +++ sys/boot/i386/zfsboot/Makefile (.../user/imp/tbemd) (revision 204018) @@ -98,7 +98,7 @@ ORG1=`printf "%d" ${ORG1}` \ REL1=`printf "%d" ${REL1}` > ${.TARGET} -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend zfsboot.s: machine CLEANFILES+= machine machine: Index: sys/boot/i386/gptzfsboot/Makefile =================================================================== --- sys/boot/i386/gptzfsboot/Makefile (.../head) (revision 204018) +++ sys/boot/i386/gptzfsboot/Makefile (.../user/imp/tbemd) (revision 204018) @@ -64,7 +64,7 @@ zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend zfsboot.o: machine CLEANFILES+= machine machine: Index: sys/boot/i386/libfirewire/Makefile =================================================================== --- sys/boot/i386/libfirewire/Makefile (.../head) (revision 204018) +++ sys/boot/i386/libfirewire/Makefile (.../user/imp/tbemd) (revision 204018) @@ -16,7 +16,7 @@ CFLAGS+= -Wformat -Wall -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: ln -sf ${.CURDIR}/../../../i386/include machine @@ -24,7 +24,7 @@ .include -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine .endif Index: sys/boot/i386/loader/Makefile =================================================================== --- sys/boot/i386/loader/Makefile (.../head) (revision 204018) +++ sys/boot/i386/loader/Makefile (.../user/imp/tbemd) (revision 204018) @@ -119,7 +119,7 @@ .include -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine CLEANFILES+= machine machine: Index: sys/boot/i386/gptboot/Makefile =================================================================== --- sys/boot/i386/gptboot/Makefile (.../head) (revision 204018) +++ sys/boot/i386/gptboot/Makefile (.../user/imp/tbemd) (revision 204018) @@ -67,7 +67,7 @@ gptboot.o: ${.CURDIR}/../../common/ufsread.c -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend gptboot.o: machine CLEANFILES+= machine machine: Index: sys/boot/ofw/libofw/Makefile =================================================================== --- sys/boot/ofw/libofw/Makefile (.../head) (revision 204018) +++ sys/boot/ofw/libofw/Makefile (.../user/imp/tbemd) (revision 204018) @@ -13,7 +13,7 @@ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. CFLAGS+= -ffreestanding -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float .endif @@ -23,7 +23,7 @@ .endif machine: - ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine + ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine CLEANFILES+= machine Index: sys/boot/zfs/Makefile =================================================================== --- sys/boot/zfs/Makefile (.../head) (revision 204018) +++ sys/boot/zfs/Makefile (.../user/imp/tbemd) (revision 204018) @@ -10,23 +10,23 @@ CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs CFLAGS+= -ffreestanding -.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_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 -march=i386 .endif CFLAGS+= -Wformat -Wall -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: ln -sf ${.CURDIR}/../../i386/include machine @@ -34,6 +34,6 @@ .include -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine .endif Index: sys/boot/efi/libefi/Makefile =================================================================== --- sys/boot/efi/libefi/Makefile (.../head) (revision 204018) +++ sys/boot/efi/libefi/Makefile (.../user/imp/tbemd) (revision 204018) @@ -7,7 +7,7 @@ libefi.c time.c CFLAGS+= -I${.CURDIR}/../include -CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH:S/amd64/i386/} +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH:S/amd64/i386/} CFLAGS+= -I${.CURDIR}/../../../../lib/libstand # Pick up the bootstrap header for some interface items Index: sys/boot/ia64/efi/Makefile =================================================================== --- sys/boot/ia64/efi/Makefile (.../head) (revision 204018) +++ sys/boot/ia64/efi/Makefile (.../user/imp/tbemd) (revision 204018) @@ -9,21 +9,21 @@ INTERNALPROG= SRCS= conf.c efimd.c main.c pal.S start.S vers.c -.PATH: ${.CURDIR}/../../../${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/../../../${MACHINE_CPUARCH}/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../common CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../efi/include -CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH} +CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I${.CURDIR}/../../../../lib/libstand -LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} +LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_CPUARCH} LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic ${PROG}: ${LDSCRIPT} -NEWVERSWHAT= "EFI boot" ${MACHINE_ARCH} +NEWVERSWHAT= "EFI boot" ${MACHINE_CPUARCH} vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} @@ -42,7 +42,7 @@ fi ${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \ -j .rela.dyn -j .reloc -j .sdata -j .text \ - --target=efi-app-${MACHINE_ARCH} ${.ALLSRC} ${.TARGET} + --target=efi-app-${MACHINE_CPUARCH} ${.ALLSRC} ${.TARGET} CLEANFILES= vers.c loader.efi Index: sys/boot/ia64/ski/Makefile =================================================================== --- sys/boot/ia64/ski/Makefile (.../head) (revision 204018) +++ sys/boot/ia64/ski/Makefile (.../user/imp/tbemd) (revision 204018) @@ -17,10 +17,10 @@ CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I${.CURDIR}/../../../../lib/libstand -LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} +LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_CPUARCH} LDFLAGS= -Wl,-T${LDSCRIPT} -NEWVERSWHAT= "SKI boot" ${MACHINE_ARCH} +NEWVERSWHAT= "SKI boot" ${MACHINE_CPUARCH} vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} Index: sys/boot/ia64/common/Makefile =================================================================== --- sys/boot/ia64/common/Makefile (.../head) (revision 204018) +++ sys/boot/ia64/common/Makefile (.../user/imp/tbemd) (revision 204018) @@ -9,7 +9,7 @@ SRCS= autoload.c bootinfo.c copy.c devicename.c exec.c CFLAGS+= -I${.CURDIR}/../../efi/include -CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH} +CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I${.CURDIR}/../../../../lib/libstand @@ -17,7 +17,7 @@ BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH CFLAGS+= -I${.CURDIR}/../../ficl -CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_ARCH} +CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH} .endif .PATH: ${.CURDIR}/../../common Index: sys/boot/Makefile =================================================================== --- sys/boot/Makefile (.../head) (revision 204018) +++ sys/boot/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,21 +8,21 @@ .endif # Build EFI library. -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "ia64" SUBDIR+= efi .endif # Build Open Firmware library. -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" SUBDIR+= ofw .endif # Build U-Boot library. -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" SUBDIR+= uboot .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE} == "i386" SUBDIR+= zfs .endif Index: sys/boot/ficl/Makefile =================================================================== --- sys/boot/ficl/Makefile (.../head) (revision 204018) +++ sys/boot/ficl/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,20 +1,20 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} +.PATH: ${.CURDIR}/${MACHINE_CPUARCH:S/amd64/i386/} BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o CFLAGS+= -ffreestanding -.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_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float .endif .if ${MACHINE} == "pc98" @@ -41,18 +41,18 @@ # Optional OO extension softwords #SOFTWORDS+= oo.fr classes.fr -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 -march=i386 -I. .endif -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} \ +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \ -I${.CURDIR}/../common softcore.c: ${SOFTWORDS} softcore.awk (cd ${.CURDIR}/softwords; cat ${SOFTWORDS} \ | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET} -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" ${SRCS:M*.c:R:S/$/.o/g}: machine beforedepend ${OBJS}: machine Index: sys/modules/cyclic/Makefile =================================================================== --- sys/modules/cyclic/Makefile (.../head) (revision 204018) +++ sys/modules/cyclic/Makefile (.../user/imp/tbemd) (revision 204018) @@ -4,13 +4,13 @@ KMOD= cyclic SRCS= cyclic.c - + SRCS+= vnode_if.h CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris \ -I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../.. \ - -I${.CURDIR}/../../cddl/dev/cyclic/${MACHINE_ARCH} + -I${.CURDIR}/../../cddl/dev/cyclic/${MACHINE_CPUARCH} CFLAGS+= -DDEBUG=1 Index: sys/modules/uart/Makefile =================================================================== --- sys/modules/uart/Makefile (.../head) (revision 204018) +++ sys/modules/uart/Makefile (.../user/imp/tbemd) (revision 204018) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR}/../../dev/uart -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" uart_bus_ebus= uart_bus_ebus.c ofw_bus_if= ofw_bus_if.h .endif Index: sys/modules/sound/sound/Makefile =================================================================== --- sys/modules/sound/sound/Makefile (.../head) (revision 204018) +++ sys/modules/sound/sound/Makefile (.../user/imp/tbemd) (revision 204018) @@ -44,7 +44,7 @@ EXPORT_SYMS= YES # XXX evaluate -.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc" # Create an empty opt_isa.h in order to keep kmod.mk from linking in an # existing one from KERNBUILDDIR which possibly has DEV_ISA defined so # sound.ko is always built without isadma support. Index: sys/modules/sound/driver/Makefile =================================================================== --- sys/modules/sound/driver/Makefile (.../head) (revision 204018) +++ sys/modules/sound/driver/Makefile (.../user/imp/tbemd) (revision 204018) @@ -5,17 +5,17 @@ SUBDIR+= neomagic sb16 sb8 sbc solo spicds t4dwave via8233 SUBDIR+= via82c686 vibes driver uaudio -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SUBDIR+= cmi mss .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" .if ${MACHINE} == "sparc64" SUBDIR+= audiocs .endif .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= ai2s davbus .endif Index: sys/modules/opensolaris/Makefile =================================================================== --- sys/modules/opensolaris/Makefile (.../head) (revision 204018) +++ sys/modules/opensolaris/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,8 +8,8 @@ opensolaris_kmem.c \ opensolaris_misc.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" -.PATH: ${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "ia64" || ${MACHINE_CPUARCH} == "sparc64" +.PATH: ${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_CPUARCH} SRCS+= opensolaris_atomic.S .else SRCS+= opensolaris_atomic.c Index: sys/modules/linprocfs/Makefile =================================================================== --- sys/modules/linprocfs/Makefile (.../head) (revision 204018) +++ sys/modules/linprocfs/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,7 +8,7 @@ linprocfs.c \ opt_compat.h -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+=-DCOMPAT_LINUX32 .endif Index: sys/modules/le/Makefile =================================================================== --- sys/modules/le/Makefile (.../head) (revision 204018) +++ sys/modules/le/Makefile (.../user/imp/tbemd) (revision 204018) @@ -7,7 +7,7 @@ SRCS+= ${if_le_ledma} if_le_pci.c lance.c ${lebuffer_sbus} SRCS+= bus_if.h device_if.h ${isa_if} ${ofw_bus_if} pci_if.h -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .if ${MACHINE} == "pc98" if_le_cbus= if_le_cbus.c .else Index: sys/modules/dtrace/dtrace/Makefile =================================================================== --- sys/modules/dtrace/dtrace/Makefile (.../head) (revision 204018) +++ sys/modules/dtrace/dtrace/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -ARCHDIR= ${MACHINE_ARCH} +ARCHDIR= ${MACHINE_CPUARCH} .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace .PATH: ${.CURDIR}/../../../cddl/kern @@ -12,7 +12,7 @@ dtrace_asm.S \ dtrace_subr.c -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= dis_tables.c \ instr_size.c .endif @@ -25,7 +25,7 @@ # These are needed for assym.s SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= opt_apic.h .endif Index: sys/modules/dtrace/fasttrap/Makefile =================================================================== --- sys/modules/dtrace/fasttrap/Makefile (.../head) (revision 204018) +++ sys/modules/dtrace/fasttrap/Makefile (.../user/imp/tbemd) (revision 204018) @@ -10,7 +10,7 @@ -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel .endif Index: sys/modules/dtrace/Makefile.inc =================================================================== --- sys/modules/dtrace/Makefile.inc (.../head) (revision 204018) +++ sys/modules/dtrace/Makefile.inc (.../user/imp/tbemd) (revision 204018) @@ -5,7 +5,7 @@ load : -kldload cyclic -kldload dtrace -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" -kldload sdt -kldload lockstat -kldload fbt @@ -18,7 +18,7 @@ unload : -kldunload systrace -kldunload profile -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" -kldunload prototype -kldunload fbt -kldunload lockstat Index: sys/modules/dtrace/Makefile =================================================================== --- sys/modules/dtrace/Makefile (.../head) (revision 204018) +++ sys/modules/dtrace/Makefile (.../user/imp/tbemd) (revision 204018) @@ -14,9 +14,9 @@ sdt \ systrace -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SUBDIR+= fbt -.elif ${MACHINE_ARCH} == "i386" +.elif ${MACHINE_CPUARCH} == "i386" SUBDIR+= fbt .endif Index: sys/modules/agp/Makefile =================================================================== --- sys/modules/agp/Makefile (.../head) (revision 204018) +++ sys/modules/agp/Makefile (.../user/imp/tbemd) (revision 204018) @@ -4,14 +4,14 @@ KMOD= agp SRCS= agp.c agp_if.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= agp_i810.c agp_intel.c agp_via.c agp_sis.c agp_ali.c agp_amd.c \ agp_nvidia.c agp_ati.c .endif .if ${MACHINE} == "i386" SRCS+= agp_amd64.c .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SRCS+= agp_amd64.c agp_i810.c agp_via.c .endif SRCS+= device_if.h bus_if.h agp_if.h pci_if.h Index: sys/modules/scc/Makefile =================================================================== --- sys/modules/scc/Makefile (.../head) (revision 204018) +++ sys/modules/scc/Makefile (.../user/imp/tbemd) (revision 204018) @@ -5,7 +5,7 @@ .if ${MACHINE} == "sparc64" scc_bfe= scc_bfe_ebus.c scc_bfe_sbus.c .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" scc_bfe= scc_bfe_macio.c scc_bfe_quicc.c .endif Index: sys/modules/hwpmc/Makefile =================================================================== --- sys/modules/hwpmc/Makefile (.../head) (revision 204018) +++ sys/modules/hwpmc/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,31 +8,31 @@ SRCS= hwpmc_mod.c hwpmc_logging.c vnode_if.h -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c hwpmc_piv.c hwpmc_tsc.c SRCS+= hwpmc_x86.c SRCS+= device_if.h bus_if.h .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" SRCS+= hwpmc_arm.c .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c hwpmc_piv.c hwpmc_ppro.c SRCS+= hwpmc_pentium.c hwpmc_tsc.c hwpmc_x86.c SRCS+= device_if.h bus_if.h .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" SRCS+= hwpmc_ia64.c .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" SRCS+= hwpmc_powerpc.c .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" SRCS+= hwpmc_sparc64.c .endif Index: sys/modules/svr4/Makefile =================================================================== --- sys/modules/svr4/Makefile (.../head) (revision 204018) +++ sys/modules/svr4/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../${MACHINE_ARCH}/svr4 ${.CURDIR}/../../compat/svr4 +.PATH: ${.CURDIR}/../../${MACHINE_CPUARCH}/svr4 ${.CURDIR}/../../compat/svr4 KMOD= svr4 SRCS= svr4_sysent.c svr4_sysvec.c opt_compat.h opt_svr4.h \ vnode_if.h imgact_svr4.c svr4_signal.c svr4_fcntl.c \ Index: sys/modules/bge/Makefile =================================================================== --- sys/modules/bge/Makefile (.../head) (revision 204018) +++ sys/modules/bge/Makefile (.../user/imp/tbemd) (revision 204018) @@ -5,7 +5,7 @@ KMOD= if_bge SRCS= if_bge.c miibus_if.h miidevs.h device_if.h bus_if.h pci_if.h -.if ${MACHINE_ARCH} == sparc64 +.if ${MACHINE_CPUARCH} == sparc64 SRCS+= ofw_bus_if.h .endif Index: sys/modules/zfs/Makefile =================================================================== --- sys/modules/zfs/Makefile (.../head) (revision 204018) +++ sys/modules/zfs/Makefile (.../user/imp/tbemd) (revision 204018) @@ -27,8 +27,8 @@ SRCS+= opensolaris_vfs.c SRCS+= opensolaris_zone.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" -.PATH: ${SUNW}/common/atomic/${MACHINE_ARCH} +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "ia64" || ${MACHINE_CPUARCH} == "sparc64" +.PATH: ${SUNW}/common/atomic/${MACHINE_CPUARCH} SRCS+= opensolaris_atomic.S .else .PATH: ${.CURDIR}/../../cddl/compat/opensolaris/kern Index: sys/modules/Makefile =================================================================== --- sys/modules/Makefile (.../head) (revision 204018) +++ sys/modules/Makefile (.../user/imp/tbemd) (revision 204018) @@ -310,7 +310,7 @@ ${_zfs} \ zlib \ -.if ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_CPUARCH} != "powerpc" _syscons= syscons _vpo= vpo .endif @@ -338,7 +338,7 @@ _pflog= pflog .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" # XXX some of these can move to the general case when de-i386'ed # XXX some of these can move now, but are untested on other architectures. _3dfx= 3dfx @@ -476,7 +476,7 @@ .endif .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" _aac= aac _acpi= acpi _agp= agp @@ -564,7 +564,7 @@ .endif .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" # Modules not enabled on ia64 (as compared to i386) include: # aac acpi aout apm atspeaker drm ibcs2 linprocfs linux ncv # nsp s3 sbni stg vesa @@ -599,7 +599,7 @@ _xe= xe .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _an= an _bm= bm _cpufreq= cpufreq @@ -608,7 +608,7 @@ _sound= sound .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" _auxio= auxio _em= em _epic= epic Index: sys/modules/procfs/Makefile =================================================================== --- sys/modules/procfs/Makefile (.../head) (revision 204018) +++ sys/modules/procfs/Makefile (.../user/imp/tbemd) (revision 204018) @@ -34,7 +34,7 @@ echo "#define COMPAT_FREEBSD4 1" >> ${.TARGET} echo "#define COMPAT_FREEBSD5 1" >> ${.TARGET} echo "#define COMPAT_FREEBSD6 1" >> ${.TARGET} -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" echo "#define COMPAT_IA32 1" >> ${.TARGET} echo "#define COMPAT_LINUX32 1" >> ${.TARGET} .endif Index: sys/modules/acpi/acpi/Makefile =================================================================== --- sys/modules/acpi/acpi/Makefile (.../head) (revision 204018) +++ sys/modules/acpi/acpi/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "ia64" .error "ACPI can only be compiled into the kernel on the amd64 and ia64 platforms" .endif @@ -22,7 +22,7 @@ ${.CURDIR}/../../../pci \ ${.CURDIR}/../../../dev/acpica \ ${.CURDIR}/../../../dev/acpica/Osd \ - ${.CURDIR}/../../../${MACHINE_ARCH}/acpica + ${.CURDIR}/../../../${MACHINE_CPUARCH}/acpica KMOD= acpi @@ -97,13 +97,13 @@ SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SRCS+= opt_global.h CLEANFILES+= acpi_wakedata.h .endif acpi_wakecode.h: acpi_wakecode.S assym.s - ${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \ - MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica + ${MAKE} -f ${.CURDIR}/../../../${MACHINE_CPUARCH}/acpica/Makefile \ + MAKESRCPATH=${.CURDIR}/../../../${MACHINE_CPUARCH}/acpica .include Index: sys/modules/hptmv/Makefile =================================================================== --- sys/modules/hptmv/Makefile (.../head) (revision 204018) +++ sys/modules/hptmv/Makefile (.../user/imp/tbemd) (revision 204018) @@ -13,7 +13,7 @@ SRCS+= mv.c entry.c ioctl.c hptproc.c gui_lib.c OBJS+= hptmvraid.o -.if $(MACHINE_ARCH) == "amd64" +.if $(MACHINE_CPUARCH) == "amd64" HPTMV_RAID_O = amd64-elf.raid.o.uu .else HPTMV_RAID_O = i386-elf.raid.o.uu @@ -48,5 +48,5 @@ .endif CFLAGS = ${DEBUGOPT} - + .include Index: sys/modules/usb/Makefile =================================================================== --- sys/modules/usb/Makefile (.../head) (revision 204018) +++ sys/modules/usb/Makefile (.../user/imp/tbemd) (revision 204018) @@ -35,16 +35,16 @@ SUBDIR += usfs umass urio SUBDIR += quirk template -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" _urtw= urtw .endif -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" _at91dci= at91dci _atmegadci= atmegadci .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" _urtw= urtw .endif Index: sys/modules/ndis/Makefile =================================================================== --- sys/modules/ndis/Makefile (.../head) (revision 204018) +++ sys/modules/ndis/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,11 +8,11 @@ SRCS+= device_if.h bus_if.h pci_if.h vnode_if.h SRCS+= opt_bus.h opt_usb.h usb_if.h usbdevs.h -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SRCS+= winx64_wrap.S .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= winx32_wrap.S .endif Index: sys/modules/syscons/Makefile =================================================================== --- sys/modules/syscons/Makefile (.../head) (revision 204018) +++ sys/modules/syscons/Makefile (.../user/imp/tbemd) (revision 204018) @@ -13,11 +13,11 @@ ${_star} \ ${_warp} -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" _apm= apm .endif -.if ${MACHINE_ARCH} != "sparc64" +.if ${MACHINE_CPUARCH} != "sparc64" _daemon= daemon _dragon= dragon _fire= fire Index: sys/modules/cpufreq/Makefile =================================================================== --- sys/modules/cpufreq/Makefile (.../head) (revision 204018) +++ sys/modules/cpufreq/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,7 +1,7 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../dev/cpufreq \ - ${.CURDIR}/../../${MACHINE_ARCH}/cpufreq + ${.CURDIR}/../../${MACHINE_CPUARCH}/cpufreq KMOD= cpufreq SRCS= ichss.c Index: sys/modules/mem/Makefile =================================================================== --- sys/modules/mem/Makefile (.../head) (revision 204018) +++ sys/modules/mem/Makefile (.../user/imp/tbemd) (revision 204018) @@ -2,17 +2,17 @@ .PATH: ${.CURDIR}/../../dev/mem .PATH: ${.CURDIR}/../../${MACHINE}/${MACHINE} -.PATH: ${.CURDIR}/../../${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/../../${MACHINE_CPUARCH}/${MACHINE_CPUARCH} KMOD= mem SRCS= memdev.c mem.c -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= memutil.c .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= i686_mem.c k6_mem.c .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SRCS+= amd64_mem.c .endif SRCS+= bus_if.h device_if.h Index: sys/modules/amr/Makefile =================================================================== --- sys/modules/amr/Makefile (.../head) (revision 204018) +++ sys/modules/amr/Makefile (.../user/imp/tbemd) (revision 204018) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/amr SUBDIR= amr_cam -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SUBDIR+= amr_linux .endif Index: sys/modules/mfi/Makefile =================================================================== --- sys/modules/mfi/Makefile (.../head) (revision 204018) +++ sys/modules/mfi/Makefile (.../user/imp/tbemd) (revision 204018) @@ -4,7 +4,7 @@ SUBDIR= mfip -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SUBDIR+= mfi_linux .endif Index: sys/modules/ppc/Makefile =================================================================== --- sys/modules/ppc/Makefile (.../head) (revision 204018) +++ sys/modules/ppc/Makefile (.../user/imp/tbemd) (revision 204018) @@ -6,18 +6,18 @@ opt_ppc.h opt_isa.h \ ppc.c ppc_pci.c ppc_puc.c -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SRCS+= ppc_acpi.c ppc_isa.c .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" .if ${MACHINE} != "pc98" SRCS+= ppc_acpi.c .endif SRCS+= ppc_isa.c .endif -.if ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_CPUARCH} == "ia64" SRCS+= ppc_acpi.c .endif Index: sys/modules/hptrr/Makefile =================================================================== --- sys/modules/hptrr/Makefile (.../head) (revision 204018) +++ sys/modules/hptrr/Makefile (.../user/imp/tbemd) (revision 204018) @@ -9,6 +9,6 @@ OBJS = hptrr_lib.o hptrr_lib.o: - uudecode -p < ${HPTRR}/$(MACHINE_ARCH)-elf.hptrr_lib.o.uu > hptrr_lib.o + uudecode -p < ${HPTRR}/$(MACHINE_CPUARCH)-elf.hptrr_lib.o.uu > hptrr_lib.o .include Index: sys/modules/i2c/controllers/pcf/Makefile =================================================================== --- sys/modules/i2c/controllers/pcf/Makefile (.../head) (revision 204018) +++ sys/modules/i2c/controllers/pcf/Makefile (.../user/imp/tbemd) (revision 204018) @@ -6,12 +6,12 @@ SRCS= ${envctrl} pcf.c ${pcf_ebus} ${pcf_isa} SRCS+= bus_if.h device_if.h iicbus_if.h ${isa_if} ${ofw_bus_if} -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" isa_if= isa_if.h pcf_isa= pcf_isa.c .endif -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "sparc64" envctrl= envctrl.c ofw_bus_if= ofw_bus_if.h pcf_ebus= pcf_ebus.c Index: sys/modules/aac/Makefile =================================================================== --- sys/modules/aac/Makefile (.../head) (revision 204018) +++ sys/modules/aac/Makefile (.../user/imp/tbemd) (revision 204018) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR}/../../dev/aac -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SUBDIR= aac_linux .endif Index: sys/modules/cxgb/Makefile =================================================================== --- sys/modules/cxgb/Makefile (.../head) (revision 204018) +++ sys/modules/cxgb/Makefile (.../user/imp/tbemd) (revision 204018) @@ -28,11 +28,11 @@ #_tom = tom .endif -.if ${MACHINE_ARCH} == "i386" && exists(${_toe_header}) +.if ${MACHINE_CPUARCH} == "i386" && exists(${_toe_header}) _iw_cxgb = iw_cxgb .endif -.if ${MACHINE_ARCH} == "amd64" && exists(${_toe_header}) +.if ${MACHINE_CPUARCH} == "amd64" && exists(${_toe_header}) _iw_cxgb = iw_cxgb .endif Index: sys/modules/vx/Makefile =================================================================== --- sys/modules/vx/Makefile (.../head) (revision 204018) +++ sys/modules/vx/Makefile (.../user/imp/tbemd) (revision 204018) @@ -4,7 +4,7 @@ KMOD= if_vx SRCS= if_vx.c if_vx_pci.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= if_vx_eisa.c .endif SRCS+= device_if.h bus_if.h pci_if.h eisa_if.h Index: sys/modules/linux/Makefile =================================================================== --- sys/modules/linux/Makefile (.../head) (revision 204018) +++ sys/modules/linux/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,11 +1,11 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" SFX= 32 CFLAGS+=-DCOMPAT_IA32 -DCOMPAT_LINUX32 .endif -.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_ARCH}/linux${SFX} +.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_CPUARCH}/linux${SFX} KMOD= linux SRCS= linux${SFX}_dummy.c linux_emul.c linux_file.c \ @@ -18,13 +18,13 @@ # XXX: for assym.s SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= opt_apic.h .endif OBJS= linux${SFX}_locore.o linux${SFX}_support.o -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h .endif Index: sys/modules/smbfs/Makefile =================================================================== --- sys/modules/smbfs/Makefile (.../head) (revision 204018) +++ sys/modules/smbfs/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,7 +1,7 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../crypto/des \ - ${.CURDIR}/../../crypto/des/arch/${MACHINE_ARCH} \ + ${.CURDIR}/../../crypto/des/arch/${MACHINE_CPUARCH} \ ${.CURDIR}/../../kern \ ${.CURDIR}/../../libkern \ ${.CURDIR}/../../netsmb \ @@ -21,7 +21,7 @@ # NETSMBCRYPTO SRCS+= des_ecb.c des_setkey.c -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= des_enc.S .else SRCS+= des_enc.c Index: sys/modules/linsysfs/Makefile =================================================================== --- sys/modules/linsysfs/Makefile (.../head) (revision 204018) +++ sys/modules/linsysfs/Makefile (.../user/imp/tbemd) (revision 204018) @@ -8,7 +8,7 @@ linsysfs.c \ opt_compat.h -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" CFLAGS+=-DCOMPAT_LINUX32 .endif Index: sys/modules/asr/Makefile =================================================================== --- sys/modules/asr/Makefile (.../head) (revision 204018) +++ sys/modules/asr/Makefile (.../user/imp/tbemd) (revision 204018) @@ -7,7 +7,7 @@ SRCS+= opt_scsi.h opt_cam.h SRCS+= device_if.h bus_if.h pci_if.h -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" SRCS+= opt_asr.h .endif Index: sys/modules/io/Makefile =================================================================== --- sys/modules/io/Makefile (.../head) (revision 204018) +++ sys/modules/io/Makefile (.../user/imp/tbemd) (revision 204018) @@ -1,7 +1,7 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../dev/io -.PATH: ${.CURDIR}/../../${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${.CURDIR}/../../${MACHINE_CPUARCH}/${MACHINE_CPUARCH} KMOD= io SRCS= iodev.c io.c Index: sys/vm/default_pager.c =================================================================== --- sys/vm/default_pager.c (.../head) (revision 204018) +++ sys/vm/default_pager.c (.../user/imp/tbemd) (revision 204018) @@ -80,7 +80,7 @@ vm_ooffset_t offset, struct ucred *cred) { vm_object_t object; - struct uidinfo *uip; + struct uidinfo *uip = NULL; if (handle != NULL) panic("default_pager_alloc: handle specified"); Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /head:r203399-204016