summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-02-03 21:29:06 +0000
committerimp <imp@FreeBSD.org>2010-02-03 21:29:06 +0000
commitde1c0e3861ebfc261230fdfbdd6314a40203f185 (patch)
treef8862b6f83ffc50e16f16cd536c523effb558582 /lib/libc
parentccc086d6ffcb0e32a24935bb3571f200d26ac6c9 (diff)
downloadFreeBSD-src-de1c0e3861ebfc261230fdfbdd6314a40203f185.zip
FreeBSD-src-de1c0e3861ebfc261230fdfbdd6314a40203f185.tar.gz
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.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/Makefile20
-rw-r--r--lib/libc/compat-43/Makefile.inc2
-rw-r--r--lib/libc/gen/Makefile.inc6
-rw-r--r--lib/libc/locale/Makefile.inc2
-rw-r--r--lib/libc/quad/Makefile.inc4
-rw-r--r--lib/libc/softfloat/Makefile.inc4
-rw-r--r--lib/libc/stdlib/Makefile.inc4
-rw-r--r--lib/libc/string/Makefile.inc6
-rw-r--r--lib/libc/sys/Makefile.inc6
9 files changed, 27 insertions, 27 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index b58b6cb..0747368 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -15,7 +15,7 @@ LIB=c
SHLIB_MAJOR= 7
WARNS?= 2
CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
-CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
+CFLAGS+=-I${.CURDIR}/${MACHINE_CPUARCH}
CFLAGS+=-DNLS
CLEANFILES+=tags
INSTALL_PIC_ARCHIVE=
@@ -36,7 +36,7 @@ MDASM=
MIASM=
NOASM=
-.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
+.include "${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc"
.include "${.CURDIR}/db/Makefile.inc"
.include "${.CURDIR}/compat-43/Makefile.inc"
.include "${.CURDIR}/gdtoa/Makefile.inc"
@@ -49,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.
diff --git a/lib/libc/compat-43/Makefile.inc b/lib/libc/compat-43/Makefile.inc
index 8505ff2..e8ec364 100644
--- a/lib/libc/compat-43/Makefile.inc
+++ b/lib/libc/compat-43/Makefile.inc
@@ -2,7 +2,7 @@
# $FreeBSD$
# compat-43 sources
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/compat-43 ${.CURDIR}/compat-43
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/compat-43 ${.CURDIR}/compat-43
SRCS+= creat.c gethostid.c getwd.c killpg.c sethostid.c setpgrp.c \
setrgid.c setruid.c sigcompat.c
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 2f562da..e849891 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -2,7 +2,7 @@
# $FreeBSD$
# machine-independent gen sources
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/gen ${.CURDIR}/gen
SRCS+= __getosreldate.c __xuname.c \
_once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \
@@ -38,8 +38,8 @@ SRCS+= __getosreldate.c __xuname.c \
SYM_MAPS+=${.CURDIR}/gen/Symbol.map
# machine-dependent gen sources
-.if exists(${.CURDIR}/${MACHINE_ARCH}/gen/Makefile.inc)
-.include "${.CURDIR}/${MACHINE_ARCH}/gen/Makefile.inc"
+.if exists(${.CURDIR}/${MACHINE_CPUARCH}/gen/Makefile.inc)
+.include "${.CURDIR}/${MACHINE_CPUARCH}/gen/Makefile.inc"
.endif
MAN+= alarm.3 arc4random.3 \
diff --git a/lib/libc/locale/Makefile.inc b/lib/libc/locale/Makefile.inc
index 074c4d9..8cf5beb 100644
--- a/lib/libc/locale/Makefile.inc
+++ b/lib/libc/locale/Makefile.inc
@@ -2,7 +2,7 @@
# $FreeBSD$
# locale sources
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/locale ${.CURDIR}/locale
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/locale ${.CURDIR}/locale
SRCS+= ascii.c big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c \
gb18030.c gb2312.c gbk.c isctype.c iswctype.c \
diff --git a/lib/libc/quad/Makefile.inc b/lib/libc/quad/Makefile.inc
index 14a5b1f..84723a7 100644
--- a/lib/libc/quad/Makefile.inc
+++ b/lib/libc/quad/Makefile.inc
@@ -2,9 +2,9 @@
# $FreeBSD$
# Quad support, if needed
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/quad ${.CURDIR}/quad
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/quad ${.CURDIR}/quad
-.if ${MACHINE_ARCH} == "i386"
+.if ${MACHINE_CPUARCH} == "i386"
SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c
diff --git a/lib/libc/softfloat/Makefile.inc b/lib/libc/softfloat/Makefile.inc
index c786761..c3df0ae 100644
--- a/lib/libc/softfloat/Makefile.inc
+++ b/lib/libc/softfloat/Makefile.inc
@@ -2,10 +2,10 @@
# $FreeBSD$
SOFTFLOAT_BITS?=64
-.PATH: ${MACHINE_ARCH}/softfloat \
+.PATH: ${MACHINE_CPUARCH}/softfloat \
${.CURDIR}/softfloat/bits${SOFTFLOAT_BITS} ${.CURDIR}/softfloat
-CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH}/softfloat -I${.CURDIR}/softfloat
+CFLAGS+= -I${.CURDIR}/${MACHINE_CPUARCH}/softfloat -I${.CURDIR}/softfloat
CFLAGS+= -DSOFTFLOAT_FOR_GCC
SRCS+= softfloat.c
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc
index 1d06dd3..d26f66a 100644
--- a/lib/libc/stdlib/Makefile.inc
+++ b/lib/libc/stdlib/Makefile.inc
@@ -2,7 +2,7 @@
# $FreeBSD$
# machine-independent stdlib sources
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/stdlib ${.CURDIR}/stdlib
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/stdlib ${.CURDIR}/stdlib
MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
bsearch.c div.c exit.c getenv.c getopt.c getopt_long.c \
@@ -16,7 +16,7 @@ MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
SYM_MAPS+= ${.CURDIR}/stdlib/Symbol.map
# machine-dependent stdlib sources
-.sinclude "${.CURDIR}/${MACHINE_ARCH}/stdlib/Makefile.inc"
+.sinclude "${.CURDIR}/${MACHINE_CPUARCH}/stdlib/Makefile.inc"
MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 bsearch.3 \
div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc
index b0a1899..96759d5 100644
--- a/lib/libc/string/Makefile.inc
+++ b/lib/libc/string/Makefile.inc
@@ -1,7 +1,7 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
# $FreeBSD$
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/string ${.CURDIR}/string
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/string ${.CURDIR}/string
CFLAGS+= -I${.CURDIR}/locale
@@ -26,8 +26,8 @@ SYM_MAPS+= ${.CURDIR}/string/Symbol.map
# machine-dependent string sources
-.if exists(${.CURDIR}/${MACHINE_ARCH}/string/Makefile.inc)
-.include "${.CURDIR}/${MACHINE_ARCH}/string/Makefile.inc"
+.if exists(${.CURDIR}/${MACHINE_CPUARCH}/string/Makefile.inc)
+.include "${.CURDIR}/${MACHINE_CPUARCH}/string/Makefile.inc"
.endif
MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 1915c55..05c3e17 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -2,7 +2,7 @@
# $FreeBSD$
# sys sources
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/sys ${.CURDIR}/sys
+.PATH: ${.CURDIR}/${MACHINE_CPUARCH}/sys ${.CURDIR}/sys
# Include the generated makefile containing the *complete* list
# of syscall names in MIASM.
@@ -13,8 +13,8 @@
# MDASM names override the default syscall names in MIASM.
# NOASM will prevent the default syscall code from being generated.
#
-.if exists(${.CURDIR}/${MACHINE_ARCH}/sys/Makefile.inc)
-.include "${.CURDIR}/${MACHINE_ARCH}/sys/Makefile.inc"
+.if exists(${.CURDIR}/${MACHINE_CPUARCH}/sys/Makefile.inc)
+.include "${.CURDIR}/${MACHINE_CPUARCH}/sys/Makefile.inc"
.endif
# Sources common to both syscall interfaces:
OpenPOWER on IntegriCloud