mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the expectations of much third-party software. MIPS builds which are little-endian should require and exhibit no changes. Big-endian TARGET_ARCHes must be changed: From: To: mipseb mips mipsn32eb mipsn32 mips64eb mips64 An entry has been added to UPDATING and some foot-shooting protection (complete with warnings which should become errors in the near future) to the top-level base system Makefile.
This commit is contained in:
parent
d31f470d15
commit
84db023ec1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233644
19
Makefile
19
Makefile
@ -132,20 +132,19 @@ _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${
|
||||
|
||||
# Guess machine architecture from machine type, and vice versa.
|
||||
.if !defined(TARGET_ARCH) && defined(TARGET)
|
||||
_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/mips/mipsel/}
|
||||
_TARGET_ARCH= ${TARGET:S/pc98/i386/}
|
||||
.elif !defined(TARGET) && defined(TARGET_ARCH) && \
|
||||
${TARGET_ARCH} != ${MACHINE_ARCH}
|
||||
_TARGET= ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
|
||||
_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/}
|
||||
.endif
|
||||
# Legacy names, for a transition period mips:mips -> mipsel:mips
|
||||
# Legacy names, for another transition period mips:mips(n32|64)?eb -> mips:mips\1
|
||||
.if defined(TARGET) && defined(TARGET_ARCH) && \
|
||||
${TARGET_ARCH} == "mips" && ${TARGET} == "mips"
|
||||
.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb"
|
||||
.if defined(TARGET_BIG_ENDIAN)
|
||||
_TARGET_ARCH=mipseb
|
||||
.else
|
||||
_TARGET_ARCH=mipsel
|
||||
${TARGET} == "mips" && ${TARGET_ARCH:Mmips*eb}
|
||||
_TARGET_ARCH= ${TARGET_ARCH:C/eb$//}
|
||||
.warning "TARGET_ARCH of ${TARGET_ARCH} is deprecated in favor of ${_TARGET_ARCH}"
|
||||
.endif
|
||||
.if defined(TARGET) && ${TARGET} == "mips" && defined(TARGET_BIG_ENDIAN)
|
||||
.warning "TARGET_BIG_ENDIAN is no longer necessary for MIPS. Big-endian is not the default."
|
||||
.endif
|
||||
# arm with TARGET_BIG_ENDIAN -> armeb
|
||||
.if defined(TARGET_ARCH) && ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN)
|
||||
@ -331,7 +330,7 @@ kernel-toolchains:
|
||||
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
|
||||
TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64
|
||||
TARGET_ARCHES_arm?= arm armeb
|
||||
TARGET_ARCHES_mips?= mipsel mipseb mips64el mips64eb mipsn32eb
|
||||
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32
|
||||
TARGET_ARCHES_powerpc?= powerpc powerpc64
|
||||
TARGET_ARCHES_pc98?= i386
|
||||
.for target in ${TARGETS}
|
||||
|
@ -136,7 +136,7 @@ VERSION!= uname -srp
|
||||
VERSION+= ${OSRELDATE}
|
||||
.endif
|
||||
|
||||
KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc powerpc64/powerpc sparc64
|
||||
KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mips/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64
|
||||
.if ${TARGET} == ${TARGET_ARCH}
|
||||
_t= ${TARGET}
|
||||
.else
|
||||
|
7
UPDATING
7
UPDATING
@ -22,6 +22,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS SLOW:
|
||||
machines to maximize performance. (To disable malloc debugging, run
|
||||
ln -s aj /etc/malloc.conf.)
|
||||
|
||||
20120328:
|
||||
Big-endian MIPS TARGET_ARCH values no longer end in "eb". mips64eb
|
||||
is now spelled mips64. mipsn32eb is now spelled mipsn32. mipseb is
|
||||
now spelled mips. This is to aid compatibility with third-party
|
||||
software that expects this naming scheme in uname(3). Little-endian
|
||||
settings are unchanged.
|
||||
|
||||
20120306:
|
||||
Disable by default the option VFS_ALLOW_NONMPSAFE for all supported
|
||||
platforms.
|
||||
|
@ -122,7 +122,7 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
|
||||
.if ${TARGET_CPUARCH} == mips
|
||||
LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
|
||||
# ABIs other than o32 need this
|
||||
.if ${TARGET_ARCH:Mmipse[lb]} == ""
|
||||
.if ${TARGET_ARCH} != "mips" && ${TARGET_ARCH} != "mipsel"
|
||||
LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c
|
||||
LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c
|
||||
LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c
|
||||
|
@ -7,7 +7,7 @@
|
||||
VERSION= "2.17.50 [FreeBSD] 2007-07-03"
|
||||
|
||||
.if defined(TARGET_ARCH)
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
.else
|
||||
TARGET_CPUARCH=${MACHINE_CPUARCH}
|
||||
.endif
|
||||
@ -16,7 +16,8 @@ TARGET_VENDOR?= unknown
|
||||
TARGET_OS?= freebsd
|
||||
BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
|
||||
TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
|
||||
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
|
||||
.if ${TARGET_ARCH} == "armeb" || \
|
||||
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el} == "")
|
||||
TARGET_BIG_ENDIAN=t
|
||||
.endif
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
# MACHINE_CPUARCH, but there's no easy way to export make functions...
|
||||
|
||||
.if defined(TARGET_ARCH)
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
.else
|
||||
TARGET_CPUARCH=${MACHINE_CPUARCH}
|
||||
.endif
|
||||
@ -17,7 +17,8 @@ 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:Mmips*eb} != ""
|
||||
.if ${TARGET_ARCH} == "armeb" || \
|
||||
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el} == "")
|
||||
TARGET_BIG_ENDIAN=t
|
||||
.endif
|
||||
.if ${TARGET_ARCH} == "powerpc64"
|
||||
|
@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb
|
||||
# MACHINE_CPUARCH, but there's no easy way to export make functions...
|
||||
|
||||
.if defined(TARGET_ARCH)
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
.else
|
||||
TARGET_CPUARCH=${MACHINE_CPUARCH}
|
||||
.endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
# MACHINE_CPUARCH, but there's no easy way to export make functions...
|
||||
|
||||
.if defined(TARGET_ARCH)
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
.else
|
||||
TARGET_CPUARCH=${MACHINE_CPUARCH}
|
||||
.endif
|
||||
|
@ -10,8 +10,7 @@ MAN= kafs5.3
|
||||
# Linking with libkrb5 uncovers a bug in binutils.
|
||||
# See http://repo.or.cz/w/binutils.git/commit/ee05170bf71819c99cb5a36a44735c231ae03c56 .
|
||||
#
|
||||
.if ${MACHINE_ARCH} != "mipsn32eb" && ${MACHINE_ARCH} != "mipsel" && \
|
||||
${MACHINE_ARCH} != "mipseb" && ${MACHINE_ARCH} != "mips"
|
||||
.if ${MACHINE} != "mips"
|
||||
LDADD+= -lkrb5
|
||||
LDFLAGS= -Wl,--no-undefined
|
||||
.endif
|
||||
|
@ -270,7 +270,7 @@ When set, it also enforces the following options:
|
||||
Set to not build the Clang C/C++ compiler.
|
||||
.Pp
|
||||
It is a default setting on
|
||||
arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb and sparc64/sparc64.
|
||||
arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32eb and sparc64/sparc64.
|
||||
When set, it also enforces the following options:
|
||||
.Pp
|
||||
.Bl -item -compact
|
||||
@ -384,7 +384,7 @@ Set to build Flattened Device Tree support as part of the base system.
|
||||
This includes the device tree compiler (dtc) and libfdt support library.
|
||||
.Pp
|
||||
It is a default setting on
|
||||
arm/arm, arm/armeb, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc and powerpc/powerpc64.
|
||||
arm/arm, arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64.
|
||||
.It Va WITHOUT_FLOPPY
|
||||
.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru
|
||||
Set to not build or install programs
|
||||
|
@ -10,6 +10,6 @@ TARGET_ENDIANNESS= 1234
|
||||
${MACHINE_ARCH} == "powerpc64" || \
|
||||
${MACHINE_ARCH} == "sparc64" || \
|
||||
${MACHINE_ARCH} == "armeb" || \
|
||||
${MACHINE_ARCH:Mmips*eb} != ""
|
||||
${MACHINE_ARCH:Mmips*} != ""
|
||||
TARGET_ENDIANNESS= 4321
|
||||
.endif
|
||||
|
@ -13,7 +13,7 @@ unix ?= We run FreeBSD, not UNIX.
|
||||
# and/or endian. This is called MACHINE_CPU in NetBSD, but that's used
|
||||
# for something different in FreeBSD.
|
||||
#
|
||||
MACHINE_CPUARCH=${MACHINE_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
.endif
|
||||
|
||||
# If the special target .POSIX appears (without prerequisites or
|
||||
|
@ -6,7 +6,7 @@
|
||||
.include <bsd.own.mk>
|
||||
|
||||
# backwards compat option for older systems.
|
||||
MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
|
||||
# Can be overridden by makeoptions or /etc/make.conf
|
||||
KERNEL_KO?= kernel
|
||||
|
@ -61,7 +61,7 @@
|
||||
#
|
||||
|
||||
# backwards compat option for older systems.
|
||||
MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
|
||||
AWK?= awk
|
||||
KMODLOAD?= /sbin/kldload
|
||||
|
@ -4,5 +4,5 @@
|
||||
|
||||
files "../atheros/files.ar71xx"
|
||||
|
||||
machine mips mipseb
|
||||
machine mips mips
|
||||
cpu CPU_MIPS4KC
|
||||
|
@ -5,5 +5,5 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
files "../cavium/files.octeon1"
|
||||
machine mips mips64eb
|
||||
machine mips mips64
|
||||
cpu CPU_CNMIPS
|
||||
|
@ -7,7 +7,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
machine mips mipseb
|
||||
machine mips mips
|
||||
ident AR71XX_BASE
|
||||
cpu CPU_MIPS4KC
|
||||
makeoptions KERNLOADADDR=0x80050000
|
||||
|
@ -10,7 +10,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
machine mips mipseb
|
||||
machine mips mips
|
||||
ident AR91XX_BASE
|
||||
cpu CPU_MIPS4KC
|
||||
makeoptions KERNLOADADDR=0x80050000
|
||||
|
@ -6,7 +6,7 @@ include "std.SWARM"
|
||||
|
||||
ident SWARM
|
||||
|
||||
machine mips mipseb
|
||||
machine mips mips
|
||||
|
||||
makeoptions ARCH_FLAGS="-mabi=32 -march=mips32"
|
||||
makeoptions LDSCRIPT_NAME= ldscript.mips.cfe
|
||||
|
@ -6,7 +6,7 @@ include "std.SWARM"
|
||||
|
||||
ident SWARM64
|
||||
|
||||
machine mips mips64eb
|
||||
machine mips mips64
|
||||
makeoptions ARCH_FLAGS="-mabi=64 -march=mips64"
|
||||
makeoptions LDSCRIPT_NAME=ldscript.mips.cfe
|
||||
makeoptions KERNLOADADDR=0xffffffff80001000
|
||||
|
@ -9,7 +9,7 @@ ident SWARM64_SMP
|
||||
options SMP
|
||||
options PRINTF_BUFR_SIZE=128
|
||||
|
||||
machine mips mips64eb
|
||||
machine mips mips64
|
||||
makeoptions ARCH_FLAGS="-mabi=64 -march=mips64"
|
||||
makeoptions LDSCRIPT_NAME=ldscript.mips.cfe
|
||||
makeoptions KERNLOADADDR=0xffffffff80001000
|
||||
|
@ -9,7 +9,7 @@ ident SWARM_SMP
|
||||
options SMP
|
||||
options PRINTF_BUFR_SIZE=128
|
||||
|
||||
machine mips mipseb
|
||||
machine mips mips
|
||||
|
||||
makeoptions ARCH_FLAGS="-mabi=32 -march=mips32"
|
||||
makeoptions LDSCRIPT_NAME= ldscript.mips.cfe
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
machine mips mipseb
|
||||
machine mips mips
|
||||
ident XLP
|
||||
|
||||
makeoptions KERNLOADADDR=0x80100000
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
machine mips mips64eb
|
||||
machine mips mips64
|
||||
ident XLP64
|
||||
|
||||
makeoptions ARCH_FLAGS="-march=mips64r2 -mabi=64"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
machine mips mipsn32eb
|
||||
machine mips mipsn32
|
||||
ident XLPN32
|
||||
|
||||
makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32"
|
||||
|
@ -45,7 +45,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
machine mips mipseb
|
||||
machine mips mips
|
||||
ident XLR
|
||||
include "../rmi/std.xlr"
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
machine mips mips64eb
|
||||
machine mips mips64
|
||||
ident XLR64
|
||||
include "../rmi/std.xlr"
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
machine mips mipsn32eb
|
||||
machine mips mipsn32
|
||||
ident XLRN32
|
||||
include "../rmi/std.xlr"
|
||||
|
||||
|
@ -59,14 +59,14 @@
|
||||
#ifndef MACHINE_ARCH
|
||||
#if _BYTE_ORDER == _BIG_ENDIAN
|
||||
#ifdef __mips_n64
|
||||
#define MACHINE_ARCH "mips64eb"
|
||||
#define MACHINE_ARCH "mips64"
|
||||
#ifndef MACHINE_ARCH32
|
||||
#define MACHINE_ARCH32 "mipseb"
|
||||
#define MACHINE_ARCH32 "mips"
|
||||
#endif
|
||||
#elif defined(__mips_n32)
|
||||
#define MACHINE_ARCH "mipsn32eb"
|
||||
#define MACHINE_ARCH "mipsn32"
|
||||
#else
|
||||
#define MACHINE_ARCH "mipseb"
|
||||
#define MACHINE_ARCH "mips"
|
||||
#endif
|
||||
#else
|
||||
#ifdef __mips_n64
|
||||
|
@ -8,7 +8,7 @@ WARNS?= 0
|
||||
# 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/mips.*e[bl]/mips/:C/armeb/arm/}
|
||||
TARGET_CPUARCH= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/}
|
||||
.else
|
||||
TARGET_CPUARCH= ${MACHINE_CPUARCH}
|
||||
TARGET_ARCH= ${MACHINE_ARCH}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# uathload broken for n32 and n64 due to toolchain issues
|
||||
.if ${MACHINE_ARCH:Mmipse[lb]} == ""
|
||||
# uathload broken for n32 and n64 due to toolchain issues, only build for o32
|
||||
.if ${MACHINE_ARCH} != "mips" && ${MACHINE_ARCH} != "mipsel"
|
||||
SUBDIR:= ${SUBDIR:Nuathload}
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user