PERFORCE change 109503 for review
Warner Losh
imp at FreeBSD.org
Wed Nov 8 01:28:32 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=109503
Change 109503 by imp at imp_lighthouse on 2006/11/08 01:28:02
Remove if 0
Affected files ...
.. //depot/projects/arm/src/gnu/usr.bin/binutils/Makefile.inc0#3 edit
.. //depot/projects/arm/src/gnu/usr.bin/binutils/as/Makefile#5 edit
.. //depot/projects/arm/src/gnu/usr.bin/cc/Makefile.inc#5 edit
.. //depot/projects/arm/src/gnu/usr.bin/cc/Makefile.tgt#4 edit
.. //depot/projects/arm/src/gnu/usr.bin/gdb/Makefile.inc#2 edit
.. //depot/projects/arm/src/gnu/usr.bin/gdb/kgdb/Makefile#2 edit
.. //depot/projects/arm/src/gnu/usr.bin/gdb/libgdb/Makefile#2 edit
.. //depot/projects/arm/src/lib/libc/Makefile#3 edit
.. //depot/projects/arm/src/lib/libpthread/Makefile#3 edit
.. //depot/projects/arm/src/lib/libthr/Makefile#3 edit
.. //depot/projects/arm/src/lib/msun/Makefile#2 edit
.. //depot/projects/arm/src/share/mk/bsd.endian.mk#3 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#25 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/kb920x_board.c#2 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#12 edit
Differences ...
==== //depot/projects/arm/src/gnu/usr.bin/binutils/Makefile.inc0#3 (text+ko) ====
@@ -38,7 +38,7 @@
.PATH: ${.CURDIR}/${TARGET_ARCH}
.endif
-ARCHS= ${TARGET_ARCH}
+ARCHS= ${TARGET_ARCH:S/armeb/arm/}
.for _arch in ${CROSS_ARCH}
.if (${ARCHS:R:M${_arch:R}} == "")
@@ -47,7 +47,5 @@
.endfor
.for _arch in ${ARCHS}
-.if exists(${.CURDIR}/Makefile.${_arch})
.include "${.CURDIR}/Makefile.${_arch}"
-.endif
.endfor
==== //depot/projects/arm/src/gnu/usr.bin/binutils/as/Makefile#5 (text+ko) ====
@@ -1,5 +1,6 @@
# $FreeBSD: src/gnu/usr.bin/binutils/as/Makefile,v 1.18 2006/10/09 04:52:14 kmacy Exp $
+.include <bsd.own.mk>
# BINDIR
.include "${.CURDIR}/../../Makefile.inc"
@@ -27,6 +28,8 @@
.elif ${TARGET_ARCH} == "sparc64"
# change back to tc-sparc.c when new binutils is imported
SRCS+= tc-sparc-fixed.c
+.elif ${TARGET_ARCH} == "armeb"
+SRCS+= tc-arm.c
.else
SRCS+= tc-${TARGET_ARCH}.c
.endif
==== //depot/projects/arm/src/gnu/usr.bin/cc/Makefile.inc#5 (text+ko) ====
@@ -11,7 +11,7 @@
.include "Makefile.tgt"
# Machine description.
-.if ${TARGET_ARCH} == "arm"
+.if ${GCC_CPU} == "arm"
MD_FILE= ${.OBJDIR}/arm-diked.md
.else
MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md
@@ -50,11 +50,11 @@
LIBCC_INT= ${.CURDIR}/../cc_int/libcc_int.a
.endif
-.if ${TARGET_ARCH} == "arm"
+.if ${GCC_CPU} == "arm"
CLEANFILES+= arm-diked.md ${GCC_CPU}.md.orig fpa.md cirrus.md iwmmxt.md
.endif
-.if ${TARGET_ARCH} == "arm"
+.if ${GCC_CPU} == "arm"
${.OBJDIR}/arm-diked.md:
cp ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md .
#XXX: Those are not patched but are included by arm.md
==== //depot/projects/arm/src/gnu/usr.bin/cc/Makefile.tgt#4 (text+ko) ====
@@ -10,6 +10,9 @@
.if defined(TARGET_BIG_ENDIAN)
CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END
.endif
+.elif ${TARGET_ARCH} == "armeb"
+GCC_CPU= arm
+CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END
.elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
GCC_CPU= i386
.elif ${TARGET_ARCH} == "ia64"
==== //depot/projects/arm/src/gnu/usr.bin/gdb/Makefile.inc#2 (text+ko) ====
@@ -1,5 +1,7 @@
# $FreeBSD: src/gnu/usr.bin/gdb/Makefile.inc,v 1.13 2004/12/21 08:47:00 ru Exp $
+.include <bsd.own.mk>
+
VERSION= "6.1.1 [FreeBSD]"
VENDOR= marcel
@@ -16,10 +18,11 @@
OBJ_BU= ${OBJ_ROOT}/binutils
OBJ_GDB= ${OBJ_ROOT}/gdb
-TARGET_ARCH?= ${MACHINE_ARCH}
-TARGET_SUBDIR= ${BMAKE_GDB}/arch/${TARGET_ARCH}
+# XXX not sure that blurring the endians is the thing to do here.
+TARG_ARCH?= ${MACHINE_CPU_ARCH}
+TARGET_SUBDIR= ${BMAKE_GDB}/arch/${TARG_ARCH}
-.if ${TARGET_ARCH} != ${MACHINE_ARCH}
+.if ${TARG_ARCH} != ${MACHINE_CPU_ARCH}
GDB_CROSS_DEBUGGER=
.endif
@@ -31,7 +34,7 @@
CFLAGS+= -DHAVE_CONFIG_H -DRL_NO_COMPAT -DMI_OUT=1 -DTUI=1
CFLAGS+= -I.
CFLAGS+= -I${TARGET_SUBDIR}
-CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARGET_ARCH}
+CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARG_ARCH}
CFLAGS+= -I${CNTRB_GDB}/gdb
CFLAGS+= -I${CNTRB_GDB}/gdb/config
CFLAGS+= -I${CNTRB_GDB}/include
@@ -42,7 +45,7 @@
.if defined(GDB_CROSS_DEBUGGER)
CFLAGS+= -DCROSS_DEBUGGER
-GDB_SUFFIX= -${TARGET_ARCH}
+GDB_SUFFIX= -${TARG_ARCH}
NO_MAN=
.endif
==== //depot/projects/arm/src/gnu/usr.bin/gdb/kgdb/Makefile#2 (text+ko) ====
@@ -1,7 +1,7 @@
# $FreeBSD: src/gnu/usr.bin/gdb/kgdb/Makefile,v 1.6 2005/02/20 23:06:03 kan Exp $
PROG= kgdb${GDB_SUFFIX}
-SRCS= main.c kthr.c trgt.c trgt_${TARGET_ARCH}.c
+SRCS= main.c kthr.c trgt.c trgt_${TARG_ARCH}.c
WARNS?= 2
BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
==== //depot/projects/arm/src/gnu/usr.bin/gdb/libgdb/Makefile#2 (text+ko) ====
@@ -1,6 +1,8 @@
# $FreeBSD: src/gnu/usr.bin/gdb/libgdb/Makefile,v 1.11 2006/04/10 09:00:19 ru Exp $
-TARGET_ARCH?= ${MACHINE_ARCH}
+.include <bsd.own.mk>
+
+TARG_ARCH?= ${MACHINE_CPU_ARCH}
LIB= gdb
INTERNALLIB=
@@ -53,7 +55,7 @@
CFLAGS+= -D${stupid_gnu}=${stupid_gnu:S/^x//}
.endfor
-.if ${TARGET_ARCH} == ${MACHINE_ARCH}
+.if ${TARG_ARCH} == ${MACHINE_CPU_ARCH}
_fork_child= fork-child.c
_infptrace= infptrace.c
_inftarg= inftarg.c
@@ -72,7 +74,7 @@
echo 'const char version[] = ${VERSION};' >> ${.TARGET}
echo 'const char host_name[] = "${MACHINE_ARCH}-${VENDOR}-freebsd";' \
>> ${.TARGET}
- echo 'const char target_name[] = "${TARGET_ARCH}-${VENDOR}-freebsd";' \
+ echo 'const char target_name[] = "${TARG_ARCH}-${VENDOR}-freebsd";' \
>> ${.TARGET}
.include <bsd.lib.mk>
==== //depot/projects/arm/src/lib/libc/Makefile#3 (text+ko) ====
@@ -15,7 +15,7 @@
SHLIB_MAJOR= 7
WARNS?= 2
CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
-CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
+CFLAGS+=-I${.CURDIR}/${MACHINE_CPU_ARCH}
CLEANFILES+=tags
INSTALL_PIC_ARCHIVE=
PRECIOUSLIB=
@@ -28,7 +28,7 @@
MIASM=
NOASM=
-.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
+.include "${.CURDIR}/${MACHINE_CPU_ARCH}/Makefile.inc"
.include "${.CURDIR}/db/Makefile.inc"
.include "${.CURDIR}/compat-43/Makefile.inc"
.include "${.CURDIR}/gdtoa/Makefile.inc"
@@ -56,7 +56,7 @@
.include "${.CURDIR}/rpc/Makefile.inc"
.include "${.CURDIR}/uuid/Makefile.inc"
.include "${.CURDIR}/xdr/Makefile.inc"
-.if ${MACHINE_ARCH} == "arm"
+.if ${MACHINE_CPU_ARCH} == "arm"
.include "${.CURDIR}/softfloat/Makefile.inc"
.endif
.if ${MK_NIS} != "no"
@@ -100,14 +100,14 @@
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_CPU_ARCH}
libkern.gen: ${KQSRCS} ${KSRCS}
cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
-libkern.${MACHINE_ARCH}:: ${KMSRCS}
+libkern.${MACHINE_CPU_ARCH}:: ${KMSRCS}
.if defined(KMSRCS) && !empty(KMSRCS)
- cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
+ cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_CPU_ARCH}
.endif
.include <bsd.lib.mk>
==== //depot/projects/arm/src/lib/libpthread/Makefile#3 (text+ko) ====
@@ -7,6 +7,8 @@
# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
# (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the
# system call stubs.
+.include <bsd.own.mk>
+
.if ${MACHINE_ARCH} == "sparc64"
LIB=kse
.else
@@ -17,10 +19,10 @@
CFLAGS+=-DPTHREAD_KERNEL
CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
-I${.CURDIR}/../../include
-CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include
+CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPU_ARCH}/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_CPU_ARCH}
CFLAGS+=-fno-builtin
# Uncomment this if you want libpthread to contain debug information for
@@ -46,7 +48,7 @@
PRECIOUSLIB=
-.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
+.include "${.CURDIR}/arch/${MACHINE_CPU_ARCH}/Makefile.inc"
.include "${.CURDIR}/support/Makefile.inc"
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"
==== //depot/projects/arm/src/lib/libthr/Makefile#3 (text+ko) ====
@@ -19,10 +19,10 @@
CFLAGS+=-DPTHREAD_KERNEL
CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
-I${.CURDIR}/../../include
-CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include
+CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPU_ARCH}/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_CPU_ARCH}
CFLAGS+=-I${.CURDIR}/../libthread_db
CFLAGS+=-Winline
@@ -38,7 +38,7 @@
PRECIOUSLIB=
-.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
+.include "${.CURDIR}/arch/${MACHINE_CPU_ARCH}/Makefile.inc"
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"
==== //depot/projects/arm/src/lib/msun/Makefile#2 (text+ko) ====
@@ -12,10 +12,16 @@
#
#
+.include <bsd.own.mk>
+
.if ${MACHINE_ARCH} == "i386"
ARCH_SUBDIR= i387
+.elif exists(${MACHINE_ARCH}/Makefile.inc)
+ARCH_SUBDIR= ${MACHINE_ARCH}
+.elif exists(${MACHINE_CPU_ARCH}/Makefile.inc)
+ARCH_SUBDIR=${MACHINE_CPU_ARCH}
.else
-ARCH_SUBDIR= ${MACHINE_ARCH}
+.error "Can't find ${MACHINE_ARCH} or ${MACHINE_CPU_ARCH} makefile"
.endif
.include "${ARCH_SUBDIR}/Makefile.inc"
==== //depot/projects/arm/src/share/mk/bsd.endian.mk#3 (text+ko) ====
@@ -1,12 +1,19 @@
# $FreeBSD: src/share/mk/bsd.endian.mk,v 1.3 2006/08/22 07:51:10 ru Exp $
-.if ${MACHINE_ARCH} == "amd64" || \
+# Hack to transition people away from TARGET_BIG_ENDIAN to armeb. After
+# transition, just add "arm" and "armeb" below and delete this hack.
+.if (${MACHINE_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN)) || \
+ ${MACHINE_ARCH} == "armeb"
+TARGET_ENDIANNESS=4321
+.elif ${MACHINE_ARCH} == "arm"
+TARGET_ENDIANNESS=1234
+.elif ${MACHINE_ARCH} == "amd64" || \
${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "ia64" || \
- (${MACHINE_ARCH} == "arm" && !defined(ARM_BIG_ENDIAN))
+ ${MACHINE_ARCH} == "ia64"
TARGET_ENDIANNESS= 1234
.elif ${MACHINE_ARCH} == "powerpc" || \
- ${MACHINE_ARCH} == "sparc64" || \
- ${MACHINE_ARCH} == "arm"
+ ${MACHINE_ARCH} == "sparc64"
TARGET_ENDIANNESS= 4321
+.else
+.error "Don't know the endianness of this architecture"
.endif
==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#25 (text+ko) ====
@@ -30,6 +30,7 @@
#include "lib.h"
#include "sd-card.h"
#include "ee.h"
+#include "board.h"
#define RBX_ASKNAME 0x0 /* -a */
#define RBX_SINGLE 0x1 /* -s */
@@ -141,15 +142,13 @@
}
}
-// Each board has to provide one of these.
-void board_init(void);
-
int
main(void)
{
int autoboot, c = 0;
ino_t ino;
+printf("MAIN\n");
board_init();
EMAC_Init();
sdcard_init();
==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/kb920x_board.c#2 (text+ko) ====
@@ -6,6 +6,7 @@
#include "emac.h"
#include "lib.h"
#include "ee.h"
+#include "board.h"
extern unsigned char mac[];
==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#12 (text) ====
@@ -53,7 +53,6 @@
register unsigned value;
volatile sdram_size_t *p = (sdram_size_t *)SDRAM_BASE;
-#if 0
#ifdef BOOT_TSC
// For the TSC board, we turn ON the one LED we have while
// early in boot.
@@ -61,7 +60,6 @@
AT91C_BASE_PIOC->PIO_OER = AT91C_PIO_PC10;
AT91C_BASE_PIOC->PIO_CODR = AT91C_PIO_PC10;
#endif
-#endif
// configure clocks
// assume:
More information about the p4-projects
mailing list