Introduce MACHINE_CPUARCH.

MACHINE is the specific kernel architecture for this machine.
MACHINE_ARCH is the specific CPU type (abi, word size, etc).
MACHINE_CPUARCH is the family of CPUs that's supported.

Most of the tree conflates MACHINE_ARCH and MACHINE_CPUARCH since
historically they have been identical.  However, there's now a reason
to to split the two concepts.  NetBSD calls this MACHINE_CPU, but
that's already used for something else in FreeBSD, so MACHINE_CPUARCH
was selected instead.

However, the sources in the tree have had a KLUDGE in the tree called
TARGET_BIG_ENDIAN to select which endian to compile the code for.
However, this is a cumbersome and awkward solution.  MACHINE_ARCH
really does need to be different for different endian because users
use it for things like their path.  Yet, the source tree also used
MACHINE_ARCH to figure out the MD code to use.  This source often
supports multiple MACHINE_ARCHs.  'mips' supports 32 (and soon 64) bit
word sizes as well as big and little endian.  'arm' support both
endians.  powerpc will soon support both 32-bit and 64-bit.

These patches start to unwind this confusion.  It implements
MACHINE_ARCH of mipsel, mipseb for the two endians of MIPS, as well as
arm and armeb for ARM.  The names for ARM are historical accidents
(ARM was primarily little endian until relatively recently).  These
names follow the NetBSD convetions.

With these changes, "make buildworld TARGET=mips TARGET_ARCH=mipsel"
finishes.  armeb and mipseb should work, but haven't been tested yet.

Committed as one big chunk so that people can comment on the patches
as a whole and suggest improvements.
This commit is contained in:
imp 2010-02-03 21:29:06 +00:00
parent ccc086d6ff
commit de1c0e3861
162 changed files with 522 additions and 467 deletions

View File

@ -29,7 +29,7 @@
.include <bsd.own.mk>
.if ${MACHINE_ARCH} == "mips"
.if ${MACHINE_CPUARCH} == "mips"
MK_RESCUE=no # not yet
.endif
@ -129,7 +129,7 @@ TARGET= ${TARGET_ARCH}
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
@ -1095,10 +1095,10 @@ _prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc
# all shared libraries for ELF.
#
_startup_libs= gnu/lib/csu
.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf)
_startup_libs+= lib/csu/${MACHINE_ARCH}-elf
.if exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf)
_startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf
.else
_startup_libs+= lib/csu/${MACHINE_ARCH}
_startup_libs+= lib/csu/${MACHINE_CPUARCH}
.endif
_startup_libs+= gnu/lib/libgcc
_startup_libs+= lib/libc

View File

@ -33,7 +33,8 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \
#MAN= pax.1 tar.1 cpio.1
#LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio
.if ${MACHINE_ARCH} == "arm"
# This is verboten
.if ${MACHINE_CPUARCH} == "arm"
WARNS?= 3
.endif

View File

@ -64,9 +64,9 @@ CFLAGS+= -I${.OBJDIR} \
#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

View File

@ -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+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
CFLAGS+= -DWANTS_MUTEX_OWNED
CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread
CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys
CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include
CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include
DPADD= ${LIBPTHREAD} ${LIBZ}
LDADD= -lpthread -lz

View File

@ -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

View File

@ -23,7 +23,7 @@ BIN1= auth.conf \
.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

View File

@ -4,7 +4,7 @@
PROG= morse
MAN= morse.6
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS += -DSPEAKER=\"/dev/speaker\"
.endif

View File

@ -23,18 +23,18 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
MKDEP= -DCRT_BEGIN
.if ${MACHINE_ARCH} == "ia64"
.if ${MACHINE_CPUARCH} == "ia64"
BEGINSRC= crtbegin.asm
ENDSRC= crtend.asm
CFLAGS+= -x assembler-with-cpp # Ugly hack
CFLAGS+= -include osreldate.h
.undef SRCS # hack for 'make depend'
.endif
.if ${MACHINE_ARCH} == "powerpc"
.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

View File

@ -26,7 +26,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
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 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
# Platform specific bits.
# When upgrading GCC, get the following definitions from config/<cpu>/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 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
# _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 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \
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 @@ OBJ_GRPS = STD DIV
#
# 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

View File

@ -23,8 +23,9 @@ CFLAGS+= -I${.CURDIR} -I. -I${SRCDIR} -I${SRCDIR}/config/posix
VERSION_MAP= ${SRCDIR}/libgomp.map
# Target-specific OpenMP configuration
.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == i386 || \
${MACHINE_ARCH} == 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

View File

@ -13,7 +13,7 @@ LIB= stdc++
SHLIB_MAJOR= 6
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
.if ${MACHINE_ARCH} == "arm"
.if ${MACHINE_CPUARCH} == "arm"
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
.endif
CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
@ -66,14 +66,14 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
SRCS+= cp-demangle.c
# MD headers location
.if ${MACHINE_ARCH} == "sparc64"
.if ${MACHINE_CPUARCH} == "sparc64"
MARCHDIR= sparc
.elif ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU} != 'i386'
.elif ${MACHINE_CPUARCH} == "i386" && ${MACHINE_CPU} != 'i386'
MARCHDIR= i486
.elif ${MACHINE_ARCH} == "amd64"
.elif ${MACHINE_CPUARCH} == "amd64"
MARCHDIR= i486
.else
MARCHDIR= ${MACHINE_ARCH}
MARCHDIR= ${MACHINE_CPUARCH}
.endif
.if exists(${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h)
@ -82,7 +82,7 @@ ATOMICITY_H= ${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h
ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_mutex/atomicity.h
.endif
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
.if exists(${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h)
ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h
.endif

View File

@ -21,7 +21,7 @@ SUBDIR= ${_binutils} \
sort \
${_texinfo}
.if ${MACHINE_ARCH} == "mips"
.if ${MACHINE_CPUARCH} == "mips"
MK_GDB=no # not yet
.endif

View File

@ -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 @@ RELTOP:= ..
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}} == "")

View File

@ -20,7 +20,7 @@ SRCS+= app.c as.c atof-generic.c atof-ieee.c bignum-copy.c \
# 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 @@ SRCS+= tc-ppc.c
# 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+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
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

View File

@ -8,13 +8,7 @@ GDBDIR= ${.CURDIR}/../../../../contrib/gdb
.PATH: ${SRCDIR}/opcodes ${SRCDIR}/binutils
# For FSF GDB files, use their CPU (arch) name; for our files use ours.
.if ${TARGET_ARCH} == "sparc64"
GDB_CPU= sparc
.elif ${TARGET_ARCH} == "amd64"
GDB_CPU= i386
.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 @@ WARNS?= 0
CFLAGS+= -DCROSS_COMPILE=1
.endif
CFLAGS+= -DDEFAULT_BFD_ARCH=bfd_${GDB_CPU}_arch
CFLAGS+= -I${.CURDIR}/${TARGET_ARCH}
CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH}
CFLAGS+= -I${SRCDIR}/binutils -I${SRCDIR}/bfd
CFLAGS+= -I${GDBDIR}/gdb -I${GDBDIR}/gdb/config
CFLAGS+= -I$(.CURDIR)
@ -121,8 +115,8 @@ init.c: ${XSRCS}
tm.h:
echo '#include "${GDB_CPU}/tm-fbsd.h"' > ${.TARGET}
.if exists(${.CURDIR}/fbsd-kgdb-${TARGET_ARCH}.h)
echo '#include "fbsd-kgdb-${TARGET_ARCH}.h"' >> ${.TARGET}
.if exists(${.CURDIR}/fbsd-kgdb-${TARGET_CPUARCH}.h)
echo '#include "fbsd-kgdb-${TARGET_CPUARCH}.h"' >> ${.TARGET}
.endif
.for H in nm-fbsd xm-${GDB_CPU}
@ -131,7 +125,7 @@ ${H:C/-.*$//}.h:
.endfor
kvm-fbsd-machine.h:
ln -sf ${.CURDIR}/kvm-fbsd-${TARGET_ARCH}.h ${.TARGET}
ln -sf ${.CURDIR}/kvm-fbsd-${TARGET_CPUARCH}.h ${.TARGET}
GDB_VERSION= "5.2.1 (FreeBSD)"
gdbversion.c: Makefile

View File

@ -1,6 +1,6 @@
# $FreeBSD$
.if defined(TARGET_BIG_ENDIAN)
.if ${TARGET_ARCH} == "armeb"
NATIVE_EMULATION= armelfb_fbsd
.else
NATIVE_EMULATION= armelf_fbsd

View File

@ -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

View File

@ -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 @@ SRCS+= cpu-arm.c \
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

View File

@ -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 \

View File

@ -30,6 +30,13 @@ CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
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

View File

@ -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 @@ TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD
.if ${TARGET_ARCH} == "sparc64"
TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
.endif
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb"
TARGET_BIG_ENDIAN=t
.endif

View File

@ -75,10 +75,6 @@ OBJS-md+= ${GCC_CPU}-c.o
# 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 \

View File

@ -22,13 +22,13 @@ LIBIBERTY= libiberty.a
# 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+= elfos.h
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+= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt
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

View File

@ -2,7 +2,7 @@
SUBDIR= doc libgdb gdb gdbtui kgdb
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "powerpc"
SUBDIR+=gdbserver
.endif

View File

@ -16,8 +16,16 @@ OBJ_ROOT= ${.OBJDIR}/../..
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=
@ -31,7 +39,7 @@ GDB_CROSS_DEBUGGER=
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

View File

@ -14,19 +14,19 @@ SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \
server.c signals.c target.c utils.c
SRCS+= fbsd-low.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c
.endif
.if ${MACHINE_ARCH} == "arm"
.if ${MACHINE_CPUARCH} == "arm"
SRCS+= fbsd-arm-low.c reg-arm.c
.endif
.if ${MACHINE_ARCH} == "powerpc"
.if ${MACHINE_CPUARCH} == "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

View File

@ -1,6 +1,14 @@
# $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=

View File

@ -115,8 +115,8 @@ INCSLINKS+= machine/$i ${INCLUDEDIR}/$i
INCSLINKS+= sys/$i ${INCLUDEDIR}/$i
.endfor
.if ${MACHINE} != ${MACHINE_ARCH}
_MARCH=${MACHINE_ARCH}
.if ${MACHINE} != ${MACHINE_CPUARCH}
_MARCH=${MACHINE_CPUARCH}
.endif
.include <bsd.prog.mk>

View File

@ -43,10 +43,10 @@ SUBDIR= ${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm msun \
${_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 @@ _libnetgraph= libnetgraph
_libypclnt= libypclnt
.endif
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
.if ${MK_NCP} != "no"
_libncp= libncp
.endif
@ -103,12 +103,12 @@ _libsmb= libsmb
_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 @@ _libsmb= libsmb
_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

View File

@ -1,6 +1,7 @@
# $FreeBSD$
.include <bsd.own.mk>
.include <bsd.endian.mk>
# BIND version number
.if defined(BIND_DIR) && exists(${BIND_DIR}/version)
@ -45,7 +46,7 @@ CFLAGS+= -DOPENSSL
CFLAGS+= -DUSE_MD5
# Endianness
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
.if ${TARGET_ENDIANNESS} == 4321
CFLAGS+= -DWORDS_BIGENDIAN
.endif
@ -64,10 +65,10 @@ CFLAGS+= -I${LIB_BIND_DIR}
.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

View File

@ -15,7 +15,7 @@ LIB=c
SHLIB_MAJOR= 7
WARNS?= 2
CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
CFLAGS+=-I${.CURDIR}/${MACHINE_CPUARCH}
CFLAGS+=-DNLS
CLEANFILES+=tags
INSTALL_PIC_ARCHIVE=
@ -36,7 +36,7 @@ MDASM=
MIASM=
NOASM=
.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
.include "${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc"
.include "${.CURDIR}/db/Makefile.inc"
.include "${.CURDIR}/compat-43/Makefile.inc"
.include "${.CURDIR}/gdtoa/Makefile.inc"
@ -49,9 +49,9 @@ NOASM=
.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 @@ NOASM=
.include "${.CURDIR}/rpc/Makefile.inc"
.include "${.CURDIR}/uuid/Makefile.inc"
.include "${.CURDIR}/xdr/Makefile.inc"
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips"
.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
.include "${.CURDIR}/softfloat/Makefile.inc"
.endif
.if ${MK_NIS} != "no"
@ -109,16 +109,16 @@ KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \
strcat.c strcmp.c strcpy.c strlen.c strncpy.c
libkern: libkern.gen libkern.${MACHINE_ARCH}
libkern: libkern.gen libkern.${MACHINE_CPUARCH}
libkern.gen: ${KQSRCS} ${KSRCS}
cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
libkern.${MACHINE_ARCH}:: ${KMSRCS}
libkern.${MACHINE_CPUARCH}:: ${KMSRCS}
.if defined(KMSRCS) && !empty(KMSRCS)
cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_CPUARCH}
.endif
.include <bsd.lib.mk>
# Disable warnings in contributed sources.

View File

@ -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

View File

@ -2,7 +2,7 @@
# $FreeBSD$
# machine-independent gen sources
.PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen
.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/gen ${.CURDIR}/gen
SRCS+= __getosreldate.c __xuname.c \
_once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \
@ -38,8 +38,8 @@ SRCS+= __getosreldate.c __xuname.c \
SYM_MAPS+=${.CURDIR}/gen/Symbol.map
# machine-dependent gen sources
.if exists(${.CURDIR}/${MACHINE_ARCH}/gen/Makefile.inc)
.include "${.CURDIR}/${MACHINE_ARCH}/gen/Makefile.inc"
.if exists(${.CURDIR}/${MACHINE_CPUARCH}/gen/Makefile.inc)
.include "${.CURDIR}/${MACHINE_CPUARCH}/gen/Makefile.inc"
.endif
MAN+= alarm.3 arc4random.3 \

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -2,7 +2,7 @@
# $FreeBSD$
# machine-independent stdlib sources
.PATH: ${.CURDIR}/${MACHINE_ARCH}/stdlib ${.CURDIR}/stdlib
.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/stdlib ${.CURDIR}/stdlib
MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
bsearch.c div.c exit.c getenv.c getopt.c getopt_long.c \
@ -16,7 +16,7 @@ MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
SYM_MAPS+= ${.CURDIR}/stdlib/Symbol.map
# machine-dependent stdlib sources
.sinclude "${.CURDIR}/${MACHINE_ARCH}/stdlib/Makefile.inc"
.sinclude "${.CURDIR}/${MACHINE_CPUARCH}/stdlib/Makefile.inc"
MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 bsearch.3 \
div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \

View File

@ -1,7 +1,7 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
# $FreeBSD$
.PATH: ${.CURDIR}/${MACHINE_ARCH}/string ${.CURDIR}/string
.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/string ${.CURDIR}/string
CFLAGS+= -I${.CURDIR}/locale
@ -26,8 +26,8 @@ SYM_MAPS+= ${.CURDIR}/string/Symbol.map
# machine-dependent string sources
.if exists(${.CURDIR}/${MACHINE_ARCH}/string/Makefile.inc)
.include "${.CURDIR}/${MACHINE_ARCH}/string/Makefile.inc"
.if exists(${.CURDIR}/${MACHINE_CPUARCH}/string/Makefile.inc)
.include "${.CURDIR}/${MACHINE_CPUARCH}/string/Makefile.inc"
.endif
MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \

View File

@ -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:

View File

@ -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

View File

@ -7,9 +7,9 @@ NO_PIC=
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

View File

@ -1,6 +1,6 @@
# $FreeBSD$
.if ${MACHINE_ARCH} == "ia64"
.if ${MACHINE_CPUARCH} == "ia64"
_open_disk= open_ia64_disk.c
.else
_change = change.c

View File

@ -23,10 +23,10 @@ SHLIB_MAJOR= 4
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
@ -46,7 +46,7 @@ SYMBOL_MAPS=${.CURDIR}/kse.map
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"

View File

@ -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

View File

@ -1,6 +1,6 @@
# $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
CFLAGS+=-DSYSTEM_SCOPE_ONLY

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 \

View File

@ -11,10 +11,11 @@ CFLAGS+=-DSUN4V
WARNS?= 0
SRCS= kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
SRCS= kvm.c kvm_${MACHINE_CPUARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm"
SRCS+= kvm_minidump_${MACHINE_ARCH}.c
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
${MACHINE_CPUARCH} == "arm"
SRCS+= kvm_minidump_${MACHINE_CPUARCH}.c
.endif
INCS= kvm.h

View File

@ -22,7 +22,7 @@ MAN+= pmc_start.3
MAN+= pmclog.3
# PMC-dependent manual pages
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
MAN+= pmc.atom.3
MAN+= pmc.core.3
MAN+= pmc.core2.3
@ -33,7 +33,7 @@ MAN+= pmc.p4.3
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

View File

@ -20,23 +20,23 @@ WARNS?= 0
CFLAGS+= -ffreestanding -Wformat
CFLAGS+= -I${.CURDIR}
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
CFLAGS+= -mno-sse3
.endif
.if ${MACHINE} == "pc98"
CFLAGS+= -Os
.endif
.if ${MACHINE_ARCH} == "powerpc"
.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 @@ SRCS+= ntoh.c
# 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+= bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S
SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S
.endif
.if ${MACHINE_ARCH} == "powerpc"
.if ${MACHINE_CPUARCH} == "powerpc"
.PATH: ${.CURDIR}/../libc/quad
SRCS+= ashldi3.c ashrdi3.c
.PATH: ${.CURDIR}/../libc/powerpc/gen
@ -90,10 +90,10 @@ SRCS+= syncicache.c
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 @@ SRCS+= splitfs.c
.include <bsd.lib.mk>
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend ${OBJS}: machine
cleandepend: cleanmachine
cleanmachine:

View File

@ -19,10 +19,10 @@ WARNS?= 3
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 @@ CFLAGS+=-D_PTHREADS_INVARIANTS
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"

View File

@ -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

View File

@ -1,5 +1,5 @@
# $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
SRCS+= pthread_md.c

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
# $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
SRCS+= pthread_md.c

View File

@ -1,5 +1,5 @@
# $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
SRCS+= pthread_md.c

View File

@ -1,5 +1,5 @@
# $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
SRCS+= pthread_md.c

View File

@ -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

View File

@ -1,6 +1,6 @@
# $FreeBSD$
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}
LIB= thread_db
SHLIB_MAJOR= 3

View File

@ -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 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \
# Location of fpmath.h and _fpmath.h
LIBCDIR= ${.CURDIR}/../libc
CFLAGS+= -I${.CURDIR}/src -I${LIBCDIR}/include \
-I${LIBCDIR}/${MACHINE_ARCH}
-I${LIBCDIR}/${MACHINE_CPUARCH}
SYM_MAPS+= ${.CURDIR}/Symbol.map
VERSION_DEF= ${LIBCDIR}/Versions.def

View File

@ -1,4 +1,4 @@
# $FreeBSD$
user: # $FreeBSD/imp/tbemd/libexec/rtld-elf/Makefile 201380 2010-01-02 09:50:19Z ed $
.include <bsd.own.mk>
MK_SSP= no
@ -10,7 +10,7 @@ SRCS= rtld_start.S \
MAN= rtld.1
CSTD?= gnu99
CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD
CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/${MACHINE_CPUARCH} -I${.CURDIR}
LDFLAGS+= -nostdlib -e .rtld_start
WARNS?= 2
INSTALLFLAGS= -C -b
@ -25,7 +25,7 @@ LDFLAGS+= -shared -Wl,-Bsymbolic
DPADD= ${LIBC_PIC}
LDADD= -lc_pic -lssp_nonshared
.if ${MACHINE_ARCH} != "ia64"
.if ${MACHINE_CPUARCH} != "ia64"
.if ${MK_SYMVER} == "yes"
LIBCDIR= ${.CURDIR}/../../lib/libc
VERSION_DEF= ${LIBCDIR}/Versions.def
@ -35,14 +35,14 @@ LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
${PROG}: ${VERSION_MAP}
.if exists(${.CURDIR}/${MACHINE_ARCH}/Symbol.map)
SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_ARCH}/Symbol.map
.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map)
SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map
.endif
.endif
.endif
.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc)
.include "${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc"
.endif
# Since moving rtld-elf to /libexec, we need to create a symlink.
@ -52,7 +52,7 @@ beforeinstall:
-chflags noschg ${DESTDIR}/usr/libexec/${PROG}
.endif
.PATH: ${.CURDIR}/${MACHINE_ARCH}
.PATH: ${.CURDIR}/${MACHINE_CPUARCH}
.include <bsd.symver.mk>
.include <bsd.prog.mk>

View File

@ -2,4 +2,4 @@ CFLAGS+= -elf
LDFLAGS+= -elf
# Uncomment this to build the dynamic linker as an executable instead
# of a shared library:
#LDSCRIPT= ${.CURDIR}/${MACHINE_ARCH}/elf_rtld.x
#LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x

View File

@ -2,4 +2,4 @@ CFLAGS+= -elf
LDFLAGS+= -elf
# Uncomment this to build the dynamic linker as an executable instead
# of a shared library:
#LDSCRIPT= ${.CURDIR}/${MACHINE_ARCH}/elf_rtld.x
#LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x

View File

@ -145,7 +145,7 @@ CRUNCH_LIBS+= -lzfs -lnvpair -luutil -lavl
.endif
CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk
CRUNCH_ALIAS_bsdlabel= disklabel
#.if ${MK_NCP} != "no"
@ -161,15 +161,15 @@ CRUNCH_PROGS_sbin+= bsdlabel
CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98
.endif
.if ${MACHINE_ARCH} == "ia64"
.if ${MACHINE_CPUARCH} == "ia64"
CRUNCH_PROGS_sbin+= mca
.endif
.if ${MACHINE_ARCH} == "sparc64"
.if ${MACHINE_CPUARCH} == "sparc64"
CRUNCH_PROGS_sbin+= bsdlabel sunlabel
.endif
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
CRUNCH_PROGS_sbin+= bsdlabel fdisk
CRUNCH_ALIAS_bsdlabel= disklabel
.endif

View File

@ -115,7 +115,7 @@ _ping6= ping6
_rtsol= rtsol
.endif
.if ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "powerpc"
.if ${MACHINE_CPUARCH} != "ia64" && ${MACHINE_CPUARCH} != "powerpc"
_bsdlabel= bsdlabel
.endif
@ -127,7 +127,7 @@ _quotacheck= quotacheck
_routed= routed
.endif
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
.if ${MACHINE} == "i386"
_fdisk= fdisk
.elif ${MACHINE} == "pc98"
@ -136,19 +136,19 @@ _fdisk_pc98= fdisk_pc98
_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

View File

@ -27,7 +27,8 @@ LDADD= -lbsnmp
CLEANFILES+= oid.h
.endif
.if ${MACHINE_ARCH} == "arm"
# XXX - this is verboten
.if ${MACHINE_CPUARCH} == "arm"
WARNS?= 3
.endif

View File

@ -8,7 +8,7 @@ SRCS= bsdlabel.c geom_bsd_enc.c
#MAN= bsdlabel.5
MAN+= bsdlabel.8
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disklabel
MLINKS= bsdlabel.8 disklabel.8
.endif

View File

@ -7,7 +7,8 @@ SRCS+= modeedit.c
.else
CFLAGS+= -DMINIMALISTIC
.endif
.if ${MACHINE_ARCH} == "arm"
# This is verboten
.if ${MACHINE_CPUARCH} == "arm"
WARNS?= 3
.endif
DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL}

View File

@ -9,7 +9,8 @@ SRCS+= g_bde_lock.c
# rijndael-fst.c does evil casting things which results in warnings on
# 64 bit machines, the test-vectors check out however, so it works right.
.if ${MACHINE_ARCH} == "i386"
#XXX All the world isn't amd64 or i386
.if ${MACHINE_CPUARCH} == "i386"
WARNS?= 5
.else
WARNS?= 3

View File

@ -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

View File

@ -7,7 +7,8 @@ MAN= routed.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

View File

@ -6,7 +6,7 @@ PROG= sunlabel
SRCS= sunlabel.c geom_sunlabel_enc.c
MAN= sunlabel.8
.if ${MACHINE_ARCH} == "sparc64"
.if ${MACHINE_CPUARCH} == "sparc64"
LINKS= ${BINDIR}/sunlabel ${BINDIR}/disklabel
MLINKS= sunlabel.8 disklabel.8
.endif

View File

@ -49,7 +49,7 @@ INCS+= asn1.h asn1_mac.h asn1t.h
# bf
SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
.if ${MACHINE_CPU:Mi686}
SRCS+= bf-686.s
.else
@ -73,9 +73,9 @@ SRCS+= bn_add.c bn_blind.c bn_const.c bn_ctx.c bn_depr.c bn_div.c \
bn_lib.c bn_mod.c bn_mont.c bn_mpi.c bn_mul.c bn_nist.c bn_opt.c \
bn_prime.c bn_print.c bn_rand.c bn_recp.c bn_shift.c bn_sqr.c \
bn_sqrt.c bn_word.c bn_x931p.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= bn-586.s co-586.s
.elif ${MACHINE_ARCH} == "amd64"
.elif ${MACHINE_CPUARCH} == "amd64"
SRCS+= x86_64-gcc.c
.else
SRCS+= bn_asm.c
@ -89,7 +89,7 @@ INCS+= buffer.h
# cast
SRCS+= c_cfb64.c c_ecb.c c_ofb64.c c_skey.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= cast-586.s
.else
SRCS+= c_enc.c
@ -97,7 +97,7 @@ SRCS+= c_enc.c
INCS+= cast.h
# camellia
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
SRCS+= camellia.c cmll_cbc.c cmll_cfb.c cmll_ctr.c cmll_ecb.c \
cmll_misc.c cmll_ofb.c
INCS+= camellia.h
@ -117,7 +117,7 @@ SRCS+= cbc3_enc.c cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c \
enc_read.c enc_writ.c fcrypt.c ofb64ede.c ofb64enc.c \
ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c read2pwd.c \
rpc_enc.c set_key.c str2key.c xcbc_enc.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= des-586.s crypt586.s
.else
SRCS+= des_enc.c fcrypt_b.c
@ -172,7 +172,7 @@ SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \
m_mdc2.c m_null.c m_ripemd.c m_sha.c m_sha1.c names.c \
openbsd_hw.c p5_crpt.c p5_crpt2.c p_dec.c p_enc.c p_lib.c \
p_open.c p_seal.c p_sign.c p_verify.c
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
SRCS+= e_camellia.c
.endif
INCS+= evp.h
@ -208,7 +208,7 @@ INCS+= md4.h
# md5
SRCS+= md5_dgst.c md5_one.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= md5-586.s
.endif
INCS+= md5.h
@ -255,7 +255,7 @@ INCS+= rc2.h
# rc4
SRCS+= rc4_skey.c rc4_fblk.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= rc4-586.s
.else
SRCS+= rc4_enc.c
@ -264,7 +264,7 @@ INCS+= rc4.h
# rc5
SRCS+= rc5_ecb.c rc5_skey.c rc5cfb64.c rc5ofb64.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= rc5-586.s
.else
SRCS+= rc5_enc.c
@ -284,7 +284,7 @@ INCS+= rsa.h
# sha
SRCS+= sha1_one.c sha1dgst.c sha_dgst.c sha_one.c sha256.c sha512.c
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= sha1-586.s
.endif
INCS+= sha.h
@ -351,10 +351,10 @@ buildinf.h: ${.CURDIR}/Makefile
( echo "#ifndef MK1MF_BUILD"; \
echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
echo " #define CFLAGS \"$(CC)\""; \
echo " #define PLATFORM \"FreeBSD-${MACHINE_ARCH}\""; \
echo " #define PLATFORM \"FreeBSD-${MACHINE_CPUARCH}\""; \
echo "#endif" ) > ${.TARGET}
opensslconf.h: opensslconf-${MACHINE_ARCH}.h
opensslconf.h: opensslconf-${MACHINE_CPUARCH}.h
cp ${.ALLSRC} ${.TARGET}
evp.h: ${LCRYPTO_SRC}/crypto/evp/evp.h
@ -383,11 +383,11 @@ afterinstall:
.include <bsd.lib.mk>
.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

View File

@ -610,7 +610,7 @@ MLINKS+=xe.4 if_xe.4
MLINKS+=xl.4 if_xl.4
MLINKS+=zyd.4 if_zyd.4
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
_acpi_aiboost.4=acpi_aiboost.4
_acpi_asus.4= acpi_asus.4
_acpi_dock.4= acpi_dock.4
@ -658,12 +658,12 @@ _wpi.4= wpi.4
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 <bsd.prog.mk>

View File

@ -83,7 +83,7 @@ MLINKS+=resolver.5 resolv.conf.5
MAN+= hesiod.conf.5
.endif
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
_boot.config.5= boot.config.5
.endif

View File

@ -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 @@ MACHINE_CPU = mips
# 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 @@ CPUTYPE = athlon-mp
. 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 @@ CPUTYPE = nocona
# 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 @@ _ICC_CPUCFLAGS = -tpp5
. 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 @@ _CPUCFLAGS = -march=armv5te -D__XSCALE__
. 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 @@ _CPUCFLAGS = -march=24kc
# 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 @@ MACHINE_CPU = i486 i386
. 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

View File

@ -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

View File

@ -53,7 +53,7 @@ STRIP?= -s
.SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .m .C .f .y .l .ln
.if !defined(PICFLAG)
.if ${MACHINE_ARCH} == "sparc64"
.if ${MACHINE_CPUARCH} == "sparc64"
PICFLAG=-fPIC
.else
PICFLAG=-fpic

View File

@ -76,8 +76,8 @@ CWARNFLAGS += -Werror
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}

View File

@ -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 @@ CC ?= c89
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

View File

@ -8,21 +8,21 @@ SUBDIR+= ficl
.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

View File

@ -20,7 +20,7 @@ NO_MAN=
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}/../../../..

View File

@ -4,14 +4,14 @@ SRCS+= boot.c commands.c console.c devopen.c interp.c
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

View File

@ -7,7 +7,7 @@ SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \
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

View File

@ -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 @@ SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
# 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

View File

@ -9,7 +9,7 @@ CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \
-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

View File

@ -94,7 +94,7 @@ boot2.h: boot1.out
ORG1=`printf "%d" ${ORG1}` \
REL1=`printf "%d" ${REL1}` > ${.TARGET}
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend boot2.s: machine
CLEANFILES+= machine
machine:

View File

@ -67,7 +67,7 @@ gptboot.out: ${BTXCRT} gptboot.o sio.o
gptboot.o: ${.CURDIR}/../../common/ufsread.c
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend gptboot.o: machine
CLEANFILES+= machine
machine:

View File

@ -64,7 +64,7 @@ gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o
zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend zfsboot.o: machine
CLEANFILES+= machine
machine:

View File

@ -16,7 +16,7 @@ CFLAGS+= -I${.CURDIR}/../libi386
CFLAGS+= -Wformat -Wall
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
CLEANFILES+= machine
machine:
ln -sf ${.CURDIR}/../../../i386/include machine
@ -24,7 +24,7 @@ machine:
.include <bsd.lib.mk>
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend ${OBJS}: machine
.endif

View File

@ -53,7 +53,7 @@ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../btx/lib \
# 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 @@ machine:
.include <bsd.lib.mk>
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend ${OBJS}: machine
.endif

View File

@ -119,7 +119,7 @@ LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFS} ${LIBI386} -lstand
.include <bsd.prog.mk>
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend ${OBJS}: machine
CLEANFILES+= machine
machine:

View File

@ -98,7 +98,7 @@ zfsboot.h: zfsldr.out
ORG1=`printf "%d" ${ORG1}` \
REL1=`printf "%d" ${REL1}` > ${.TARGET}
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend zfsboot.s: machine
CLEANFILES+= machine
machine:

View File

@ -9,7 +9,7 @@ INTERNALLIB=
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 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
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

View File

@ -9,21 +9,21 @@ PROG= loader.sym
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 @@ loader.efi: loader.sym
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

View File

@ -17,10 +17,10 @@ CFLAGS+= -I${.CURDIR}/../../common
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}

Some files were not shown because too many files have changed in this diff Show More