svn commit: r203446 - in user/imp/tbemd: . bin/pax
cddl/lib/libdtrace cddl/lib/libzpool contrib/smbfs etc
games/morse gnu/lib/csu gnu/lib/libgcc gnu/lib/libgomp
gnu/lib/libstdc++ gnu/usr.bin gnu/us...
Warner Losh
imp at FreeBSD.org
Wed Feb 3 21:29:07 UTC 2010
Author: imp
Date: Wed Feb 3 21:29:06 2010
New Revision: 203446
URL: http://svn.freebsd.org/changeset/base/203446
Log:
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.
Modified:
user/imp/tbemd/Makefile.inc1
user/imp/tbemd/bin/pax/Makefile
user/imp/tbemd/cddl/lib/libdtrace/Makefile
user/imp/tbemd/cddl/lib/libzpool/Makefile
user/imp/tbemd/contrib/smbfs/Makefile
user/imp/tbemd/etc/Makefile
user/imp/tbemd/games/morse/Makefile
user/imp/tbemd/gnu/lib/csu/Makefile
user/imp/tbemd/gnu/lib/libgcc/Makefile
user/imp/tbemd/gnu/lib/libgomp/Makefile
user/imp/tbemd/gnu/lib/libstdc++/Makefile
user/imp/tbemd/gnu/usr.bin/Makefile
user/imp/tbemd/gnu/usr.bin/binutils/Makefile.inc0
user/imp/tbemd/gnu/usr.bin/binutils/as/Makefile
user/imp/tbemd/gnu/usr.bin/binutils/gdb/Makefile
user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.arm
user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.mips
user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.arm
user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.mips
user/imp/tbemd/gnu/usr.bin/cc/Makefile.inc
user/imp/tbemd/gnu/usr.bin/cc/Makefile.tgt
user/imp/tbemd/gnu/usr.bin/cc/cc_int/Makefile
user/imp/tbemd/gnu/usr.bin/cc/cc_tools/Makefile
user/imp/tbemd/gnu/usr.bin/gdb/Makefile
user/imp/tbemd/gnu/usr.bin/gdb/Makefile.inc
user/imp/tbemd/gnu/usr.bin/gdb/gdbserver/Makefile
user/imp/tbemd/gnu/usr.bin/gdb/libgdb/Makefile
user/imp/tbemd/include/Makefile
user/imp/tbemd/lib/Makefile
user/imp/tbemd/lib/bind/config.mk
user/imp/tbemd/lib/libc/Makefile
user/imp/tbemd/lib/libc/compat-43/Makefile.inc
user/imp/tbemd/lib/libc/gen/Makefile.inc
user/imp/tbemd/lib/libc/locale/Makefile.inc
user/imp/tbemd/lib/libc/quad/Makefile.inc
user/imp/tbemd/lib/libc/softfloat/Makefile.inc
user/imp/tbemd/lib/libc/stdlib/Makefile.inc
user/imp/tbemd/lib/libc/string/Makefile.inc
user/imp/tbemd/lib/libc/sys/Makefile.inc
user/imp/tbemd/lib/libc_r/sys/Makefile.inc
user/imp/tbemd/lib/libcompat/Makefile
user/imp/tbemd/lib/libdisk/Makefile
user/imp/tbemd/lib/libkse/Makefile
user/imp/tbemd/lib/libkse/arch/amd64/Makefile.inc
user/imp/tbemd/lib/libkse/arch/arm/Makefile.inc
user/imp/tbemd/lib/libkse/arch/i386/Makefile.inc
user/imp/tbemd/lib/libkse/arch/ia64/Makefile.inc
user/imp/tbemd/lib/libkse/arch/powerpc/Makefile.inc
user/imp/tbemd/lib/libkse/arch/sparc64/Makefile.inc
user/imp/tbemd/lib/libkse/support/Makefile.inc
user/imp/tbemd/lib/libkvm/Makefile
user/imp/tbemd/lib/libpmc/Makefile
user/imp/tbemd/lib/libstand/Makefile
user/imp/tbemd/lib/libthr/Makefile
user/imp/tbemd/lib/libthr/arch/amd64/Makefile.inc
user/imp/tbemd/lib/libthr/arch/arm/Makefile.inc
user/imp/tbemd/lib/libthr/arch/i386/Makefile.inc
user/imp/tbemd/lib/libthr/arch/ia64/Makefile.inc
user/imp/tbemd/lib/libthr/arch/mips/Makefile.inc
user/imp/tbemd/lib/libthr/arch/powerpc/Makefile.inc
user/imp/tbemd/lib/libthr/arch/sparc64/Makefile.inc
user/imp/tbemd/lib/libthr/support/Makefile.inc
user/imp/tbemd/lib/libthread_db/Makefile
user/imp/tbemd/lib/msun/Makefile
user/imp/tbemd/libexec/rtld-elf/Makefile
user/imp/tbemd/libexec/rtld-elf/amd64/Makefile.inc
user/imp/tbemd/libexec/rtld-elf/i386/Makefile.inc
user/imp/tbemd/rescue/rescue/Makefile
user/imp/tbemd/sbin/Makefile
user/imp/tbemd/sbin/atm/atmconfig/Makefile
user/imp/tbemd/sbin/bsdlabel/Makefile
user/imp/tbemd/sbin/camcontrol/Makefile
user/imp/tbemd/sbin/gbde/Makefile
user/imp/tbemd/sbin/newfs_msdos/Makefile
user/imp/tbemd/sbin/routed/Makefile
user/imp/tbemd/sbin/sunlabel/Makefile
user/imp/tbemd/secure/lib/libcrypto/Makefile
user/imp/tbemd/share/man/man4/Makefile
user/imp/tbemd/share/man/man5/Makefile
user/imp/tbemd/share/mk/bsd.cpu.mk
user/imp/tbemd/share/mk/bsd.endian.mk
user/imp/tbemd/share/mk/bsd.lib.mk
user/imp/tbemd/share/mk/bsd.sys.mk
user/imp/tbemd/share/mk/sys.mk
user/imp/tbemd/sys/boot/Makefile
user/imp/tbemd/sys/boot/arm/ixp425/boot2/Makefile
user/imp/tbemd/sys/boot/common/Makefile.inc
user/imp/tbemd/sys/boot/efi/libefi/Makefile
user/imp/tbemd/sys/boot/ficl/Makefile
user/imp/tbemd/sys/boot/i386/Makefile.inc
user/imp/tbemd/sys/boot/i386/boot2/Makefile
user/imp/tbemd/sys/boot/i386/gptboot/Makefile
user/imp/tbemd/sys/boot/i386/gptzfsboot/Makefile
user/imp/tbemd/sys/boot/i386/libfirewire/Makefile
user/imp/tbemd/sys/boot/i386/libi386/Makefile
user/imp/tbemd/sys/boot/i386/loader/Makefile
user/imp/tbemd/sys/boot/i386/zfsboot/Makefile
user/imp/tbemd/sys/boot/ia64/common/Makefile
user/imp/tbemd/sys/boot/ia64/efi/Makefile
user/imp/tbemd/sys/boot/ia64/ski/Makefile
user/imp/tbemd/sys/boot/ofw/libofw/Makefile
user/imp/tbemd/sys/boot/uboot/lib/Makefile
user/imp/tbemd/sys/boot/zfs/Makefile
user/imp/tbemd/sys/conf/Makefile.mips
user/imp/tbemd/sys/conf/kern.mk
user/imp/tbemd/sys/conf/kern.post.mk
user/imp/tbemd/sys/conf/kern.pre.mk
user/imp/tbemd/sys/conf/kmod.mk
user/imp/tbemd/sys/kern/Makefile
user/imp/tbemd/sys/modules/Makefile
user/imp/tbemd/sys/modules/aac/Makefile
user/imp/tbemd/sys/modules/acpi/acpi/Makefile
user/imp/tbemd/sys/modules/agp/Makefile
user/imp/tbemd/sys/modules/amr/Makefile
user/imp/tbemd/sys/modules/asr/Makefile
user/imp/tbemd/sys/modules/bge/Makefile
user/imp/tbemd/sys/modules/cpufreq/Makefile
user/imp/tbemd/sys/modules/cxgb/Makefile
user/imp/tbemd/sys/modules/cyclic/Makefile
user/imp/tbemd/sys/modules/dtrace/Makefile
user/imp/tbemd/sys/modules/dtrace/Makefile.inc
user/imp/tbemd/sys/modules/dtrace/dtrace/Makefile
user/imp/tbemd/sys/modules/dtrace/fasttrap/Makefile
user/imp/tbemd/sys/modules/hptmv/Makefile
user/imp/tbemd/sys/modules/hptrr/Makefile
user/imp/tbemd/sys/modules/hwpmc/Makefile
user/imp/tbemd/sys/modules/i2c/controllers/pcf/Makefile
user/imp/tbemd/sys/modules/io/Makefile
user/imp/tbemd/sys/modules/le/Makefile
user/imp/tbemd/sys/modules/linprocfs/Makefile
user/imp/tbemd/sys/modules/linsysfs/Makefile
user/imp/tbemd/sys/modules/linux/Makefile
user/imp/tbemd/sys/modules/mem/Makefile
user/imp/tbemd/sys/modules/mfi/Makefile
user/imp/tbemd/sys/modules/ndis/Makefile
user/imp/tbemd/sys/modules/opensolaris/Makefile
user/imp/tbemd/sys/modules/ppc/Makefile
user/imp/tbemd/sys/modules/procfs/Makefile
user/imp/tbemd/sys/modules/scc/Makefile
user/imp/tbemd/sys/modules/smbfs/Makefile
user/imp/tbemd/sys/modules/sound/driver/Makefile
user/imp/tbemd/sys/modules/sound/sound/Makefile
user/imp/tbemd/sys/modules/svr4/Makefile
user/imp/tbemd/sys/modules/syscons/Makefile
user/imp/tbemd/sys/modules/uart/Makefile
user/imp/tbemd/sys/modules/usb/Makefile
user/imp/tbemd/sys/modules/vx/Makefile
user/imp/tbemd/sys/modules/zfs/Makefile
user/imp/tbemd/usr.bin/Makefile
user/imp/tbemd/usr.bin/ldd/Makefile
user/imp/tbemd/usr.bin/truss/Makefile
user/imp/tbemd/usr.bin/xlint/Makefile.inc
user/imp/tbemd/usr.sbin/Makefile
user/imp/tbemd/usr.sbin/ac/Makefile
user/imp/tbemd/usr.sbin/amd/Makefile.inc
user/imp/tbemd/usr.sbin/apm/Makefile
user/imp/tbemd/usr.sbin/crunch/crunchide/Makefile
user/imp/tbemd/usr.sbin/kldxref/Makefile
user/imp/tbemd/usr.sbin/powerd/Makefile
user/imp/tbemd/usr.sbin/sade/Makefile
user/imp/tbemd/usr.sbin/sysinstall/Makefile
user/imp/tbemd/usr.sbin/tcpdump/tcpdump/Makefile
Modified: user/imp/tbemd/Makefile.inc1
==============================================================================
--- user/imp/tbemd/Makefile.inc1 Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/Makefile.inc1 Wed Feb 3 21:29:06 2010 (r203446)
@@ -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_nons
# 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
Modified: user/imp/tbemd/bin/pax/Makefile
==============================================================================
--- user/imp/tbemd/bin/pax/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/bin/pax/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -33,7 +33,8 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache
#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
Modified: user/imp/tbemd/cddl/lib/libdtrace/Makefile
==============================================================================
--- user/imp/tbemd/cddl/lib/libdtrace/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/cddl/lib/libdtrace/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/cddl/lib/libzpool/Makefile
==============================================================================
--- user/imp/tbemd/cddl/lib/libzpool/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/cddl/lib/libzpool/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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/cont
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
Modified: user/imp/tbemd/contrib/smbfs/Makefile
==============================================================================
--- user/imp/tbemd/contrib/smbfs/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/contrib/smbfs/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/etc/Makefile
==============================================================================
--- user/imp/tbemd/etc/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/etc/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/games/morse/Makefile
==============================================================================
--- user/imp/tbemd/games/morse/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/games/morse/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/gnu/lib/csu/Makefile
==============================================================================
--- user/imp/tbemd/gnu/lib/csu/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/lib/csu/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -23,18 +23,18 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}
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
Modified: user/imp/tbemd/gnu/lib/libgcc/Makefile
==============================================================================
--- user/imp/tbemd/gnu/lib/libgcc/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/lib/libgcc/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -26,7 +26,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F
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 _udi
# 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 floatuns
# _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 __divsf
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
Modified: user/imp/tbemd/gnu/lib/libgomp/Makefile
==============================================================================
--- user/imp/tbemd/gnu/lib/libgomp/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/lib/libgomp/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -23,8 +23,9 @@ CFLAGS+= -I${.CURDIR} -I. -I${SRCDIR} -I
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
Modified: user/imp/tbemd/gnu/lib/libstdc++/Makefile
==============================================================================
--- user/imp/tbemd/gnu/lib/libstdc++/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/lib/libstdc++/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
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/${MARC
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
Modified: user/imp/tbemd/gnu/usr.bin/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -21,7 +21,7 @@ SUBDIR= ${_binutils} \
sort \
${_texinfo}
-.if ${MACHINE_ARCH} == "mips"
+.if ${MACHINE_CPUARCH} == "mips"
MK_GDB=no # not yet
.endif
Modified: user/imp/tbemd/gnu/usr.bin/binutils/Makefile.inc0
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/binutils/Makefile.inc0 Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/binutils/Makefile.inc0 Wed Feb 3 21:29:06 2010 (r203446)
@@ -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}} == "")
Modified: user/imp/tbemd/gnu/usr.bin/binutils/as/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/binutils/as/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/binutils/as/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -20,7 +20,7 @@ SRCS+= app.c as.c atof-generic.c atof-ie
# 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
Modified: user/imp/tbemd/gnu/usr.bin/binutils/gdb/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/binutils/gdb/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/binutils/gdb/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -8,13 +8,7 @@ GDBDIR= ${.CURDIR}/../../../../contrib/g
.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
Modified: user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.arm
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.arm Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.arm Wed Feb 3 21:29:06 2010 (r203446)
@@ -1,6 +1,6 @@
# $FreeBSD$
-.if defined(TARGET_BIG_ENDIAN)
+.if ${TARGET_ARCH} == "armeb"
NATIVE_EMULATION= armelfb_fbsd
.else
NATIVE_EMULATION= armelf_fbsd
Modified: user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.mips
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.mips Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/binutils/ld/Makefile.mips Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.arm
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.arm Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.arm Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.mips
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.mips Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/binutils/libbfd/Makefile.mips Wed Feb 3 21:29:06 2010 (r203446)
@@ -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 \
Modified: user/imp/tbemd/gnu/usr.bin/cc/Makefile.inc
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/cc/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/cc/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -30,6 +30,13 @@ CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SI
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
Modified: user/imp/tbemd/gnu/usr.bin/cc/Makefile.tgt
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/cc/Makefile.tgt Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/cc/Makefile.tgt Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
.if ${TARGET_ARCH} == "sparc64"
TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
.endif
+.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb"
+TARGET_BIG_ENDIAN=t
+.endif
Modified: user/imp/tbemd/gnu/usr.bin/cc/cc_int/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/cc/cc_int/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/cc/cc_int/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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 \
Modified: user/imp/tbemd/gnu/usr.bin/cc/cc_tools/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/cc/cc_tools/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/cc/cc_tools/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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}/
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
Modified: user/imp/tbemd/gnu/usr.bin/gdb/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/gdb/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/gdb/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/gnu/usr.bin/gdb/Makefile.inc
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/gdb/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/gdb/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/gnu/usr.bin/gdb/gdbserver/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/gdb/gdbserver/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/gdb/gdbserver/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -14,19 +14,19 @@ SRCS= inferiors.c mem-break.c regcache.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
Modified: user/imp/tbemd/gnu/usr.bin/gdb/libgdb/Makefile
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/gdb/libgdb/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/gnu/usr.bin/gdb/libgdb/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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=
Modified: user/imp/tbemd/include/Makefile
==============================================================================
--- user/imp/tbemd/include/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/include/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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>
Modified: user/imp/tbemd/lib/Makefile
==============================================================================
--- user/imp/tbemd/lib/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -43,10 +43,10 @@ SUBDIR= ${_csu} libc libbsm libauditd li
${_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
Modified: user/imp/tbemd/lib/bind/config.mk
==============================================================================
--- user/imp/tbemd/lib/bind/config.mk Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/bind/config.mk Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/lib/libc/Makefile
==============================================================================
--- user/imp/tbemd/lib/libc/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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 ashr
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.
Modified: user/imp/tbemd/lib/libc/compat-43/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/compat-43/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/compat-43/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/lib/libc/gen/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/gen/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/gen/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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 \
Modified: user/imp/tbemd/lib/libc/locale/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/locale/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/locale/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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 \
Modified: user/imp/tbemd/lib/libc/quad/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/quad/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/quad/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/lib/libc/softfloat/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/softfloat/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/softfloat/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/lib/libc/stdlib/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/stdlib/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/stdlib/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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 ate
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 \
Modified: user/imp/tbemd/lib/libc/string/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/string/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/string/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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 \
Modified: user/imp/tbemd/lib/libc/sys/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc/sys/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc/sys/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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:
Modified: user/imp/tbemd/lib/libc_r/sys/Makefile.inc
==============================================================================
--- user/imp/tbemd/lib/libc_r/sys/Makefile.inc Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libc_r/sys/Makefile.inc Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/lib/libcompat/Makefile
==============================================================================
--- user/imp/tbemd/lib/libcompat/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libcompat/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -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
Modified: user/imp/tbemd/lib/libdisk/Makefile
==============================================================================
--- user/imp/tbemd/lib/libdisk/Makefile Wed Feb 3 21:26:54 2010 (r203445)
+++ user/imp/tbemd/lib/libdisk/Makefile Wed Feb 3 21:29:06 2010 (r203446)
@@ -1,6 +1,6 @@
# $FreeBSD$
-.if ${MACHINE_ARCH} == "ia64"
+.if ${MACHINE_CPUARCH} == "ia64"
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list