From owner-p4-projects@FreeBSD.ORG Fri Jul 21 14:06:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 542FD16A4DF; Fri, 21 Jul 2006 14:06:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDE9316A4E0 for ; Fri, 21 Jul 2006 14:06:08 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 531D143D45 for ; Fri, 21 Jul 2006 14:06:08 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6LE687U064315 for ; Fri, 21 Jul 2006 14:06:08 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6LE67P7064312 for perforce@freebsd.org; Fri, 21 Jul 2006 14:06:07 GMT (envelope-from cognet@freebsd.org) Date: Fri, 21 Jul 2006 14:06:07 GMT Message-Id: <200607211406.k6LE67P7064312@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 102055 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jul 2006 14:06:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=102055 Change 102055 by cognet@cognet on 2006/07/21 14:05:40 Get the toolchain to defaults to big-endian if ARM_BIG_ENDIAN is defined. Affected files ... .. //depot/projects/arm/contrib-arm.diff#6 edit .. //depot/projects/arm/gnu-arm.diff#14 edit Differences ... ==== //depot/projects/arm/contrib-arm.diff#6 (text+ko) ==== @@ -4,7 +4,7 @@ retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 armelf_fbsd.sh --- contrib/binutils/ld/emulparams/armelf_fbsd.sh 22 Feb 2002 04:18:15 -0000 1.1.1.1 -+++ contrib/binutils/ld/emulparams/armelf_fbsd.sh 29 Aug 2005 12:39:39 -0000 ++++ contrib/binutils/ld/emulparams/armelf_fbsd.sh 21 Jul 2006 12:51:15 -0000 @@ -1,2 +1,7 @@ . ${srcdir}/emulparams/armelf.sh . ${srcdir}/emulparams/elf_fbsd.sh @@ -13,6 +13,16 @@ + +unset STACK_ADDR +unset EMBEDDED +Index: contrib/binutils/ld/emulparams/armelfb_fbsd.sh +=================================================================== +RCS file: contrib/binutils/ld/emulparams/armelfb_fbsd.sh +diff -N contrib/binutils/ld/emulparams/armelfb_fbsd.sh +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ contrib/binutils/ld/emulparams/armelfb_fbsd.sh 21 Jul 2006 12:52:38 -0000 +@@ -0,0 +1,3 @@ ++. ${srcdir}/emulparams/armelf_fbsd.sh ++ ++OUTPUT_FORMAT="elf32-bigarm" Index: contrib/gcc/config/arm/arm.md =================================================================== RCS file: /cognet/ncvs/src/contrib/gcc/config/arm/arm.md,v @@ -66,7 +76,7 @@ retrieving revision 1.1.1.3 diff -u -p -r1.1.1.3 freebsd.h --- contrib/gcc/config/arm/freebsd.h 28 Jul 2004 03:11:35 -0000 1.1.1.3 -+++ contrib/gcc/config/arm/freebsd.h 29 Aug 2005 12:39:39 -0000 ++++ contrib/gcc/config/arm/freebsd.h 21 Jul 2006 00:50:25 -0000 @@ -22,7 +22,10 @@ #undef SUBTARGET_EXTRA_SPECS @@ -89,11 +99,15 @@ /************************[ Target stuff ]***********************************/ -@@ -67,3 +71,75 @@ +@@ -67,3 +71,80 @@ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)"); + ++#ifndef TARGET_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT 0 ++#endif ++ +#undef TARGET_DEFAULT +#define TARGET_DEFAULT \ + (ARM_FLAG_APCS_32 \ @@ -101,7 +115,8 @@ + | ARM_FLAG_APCS_FRAME \ + | ARM_FLAG_ATPCS \ + | ARM_FLAG_VFP \ -+ | ARM_FLAG_MMU_TRAPS) ++ | ARM_FLAG_MMU_TRAPS \ ++ | TARGET_ENDIAN_DEFAULT) + +#undef TYPE_OPERAND_FMT +#define TYPE_OPERAND_FMT "%%%s" ==== //depot/projects/arm/gnu-arm.diff#14 (text+ko) ==== @@ -62,6 +62,25 @@ MK_GDB= no # not yet .endif +Index: gnu/usr.bin/binutils/as/Makefile +=================================================================== +RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/as/Makefile,v +retrieving revision 1.16 +diff -u -p -r1.16 Makefile +--- gnu/usr.bin/binutils/as/Makefile 21 Dec 2004 09:59:40 -0000 1.16 ++++ gnu/usr.bin/binutils/as/Makefile 21 Jul 2006 11:03:28 -0000 +@@ -35,6 +35,11 @@ CFLAGS+= -DDEFAULT_ARCH=\"v9-64\" + .else + CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\" + .endif ++ ++.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) ++CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1 ++.endif ++ + CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\" + CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\" + CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\" Index: gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h =================================================================== RCS file: gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h @@ -77,11 +96,15 @@ RCS file: gnu/usr.bin/binutils/ld/Makefile.arm diff -N gnu/usr.bin/binutils/ld/Makefile.arm --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ gnu/usr.bin/binutils/ld/Makefile.arm 6 Jul 2006 23:54:06 -0000 -@@ -0,0 +1,12 @@ ++++ gnu/usr.bin/binutils/ld/Makefile.arm 21 Jul 2006 12:53:38 -0000 +@@ -0,0 +1,16 @@ +# $FreeBSD$ + ++.if defined(ARM_BIG_ENDIAN) ++NATIVE_EMULATION= armelfb_fbsd ++.else +NATIVE_EMULATION= armelf_fbsd ++.endif + +SRCS+= e${NATIVE_EMULATION}.c +CLEANFILES+= e${NATIVE_EMULATION}.c @@ -96,11 +119,17 @@ RCS file: gnu/usr.bin/binutils/libbfd/Makefile.arm diff -N gnu/usr.bin/binutils/libbfd/Makefile.arm --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ gnu/usr.bin/binutils/libbfd/Makefile.arm 7 Jul 2006 21:11:14 -0000 -@@ -0,0 +1,43 @@ ++++ gnu/usr.bin/binutils/libbfd/Makefile.arm 21 Jul 2006 00:22:53 -0000 +@@ -0,0 +1,49 @@ +# $FreeBSD$ + ++.if defined(ARM_BIG_ENDIAN) ++DEFAULT_VECTOR= bfd_elf32_bigarm_vec ++ADDITIONAL_VECTOR= bfd_elf32_littlearm_vec ++.else +DEFAULT_VECTOR= bfd_elf32_littlearm_vec ++ADDITIONAL_VECTOR= bfd_elf32_bigarm_vec ++.endif + +SRCS+= \ + cpu-arm.c \ @@ -111,7 +140,7 @@ + elf32-arm-fbsd.c \ + elf32-target.h +VECS+= ${DEFAULT_VECTOR} \ -+ bfd_elf32_bigarm_vec ++ ${ADDITIONAL_VECTOR} + +.if ${TARGET_ARCH} == "arm" +CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} @@ -141,6 +170,47 @@ + echo '#include "elf32-arm.h"' >> ${.TARGET} + + +Index: gnu/usr.bin/binutils/libiberty/Makefile +=================================================================== +RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/libiberty/Makefile,v +retrieving revision 1.24 +diff -u -p -r1.24 Makefile +--- gnu/usr.bin/binutils/libiberty/Makefile 14 Feb 2005 12:10:13 -0000 1.24 ++++ gnu/usr.bin/binutils/libiberty/Makefile 21 Jul 2006 11:10:34 -0000 +@@ -18,4 +18,8 @@ WARNS?= 1 + CFLAGS+= -DHAVE_CONFIG_H + INTERNALLIB= + ++.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) ++CFLAGS+= -DARM_BIG_ENDIAN ++.endif ++ + .include +Index: gnu/usr.bin/binutils/libiberty/config.h +=================================================================== +RCS file: /cognet/ncvs/src/gnu/usr.bin/binutils/libiberty/config.h,v +retrieving revision 1.6 +diff -u -p -r1.6 config.h +--- gnu/usr.bin/binutils/libiberty/config.h 16 Jun 2004 07:09:41 -0000 1.6 ++++ gnu/usr.bin/binutils/libiberty/config.h 21 Jul 2006 14:02:16 -0000 +@@ -7,7 +7,7 @@ + + + /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ +-#ifdef __sparc64__ ++#if defined(__sparc64__) || defined(__ARMEB__) + #define BYTEORDER 4321 + #else + #define BYTEORDER 1234 +@@ -325,7 +325,7 @@ + + /* Define if the host machine stores words of multi-word integers in + big-endian order. */ +-#ifdef __sparc64__ ++#if defined(__sparc64__) || defined(__ARMEB__) + #define HOST_WORDS_BIG_ENDIAN 1 + #endif + Index: gnu/usr.bin/binutils/libopcodes/Makefile.arm =================================================================== RCS file: gnu/usr.bin/binutils/libopcodes/Makefile.arm @@ -152,13 +222,31 @@ + +SRCS+= arm-dis.c +CFLAGS+= -DARCH_arm +Index: gnu/usr.bin/cc/cc_int/Makefile +=================================================================== +RCS file: /cognet/ncvs/src/gnu/usr.bin/cc/cc_int/Makefile,v +retrieving revision 1.46 +diff -u -p -r1.46 Makefile +--- gnu/usr.bin/cc/cc_int/Makefile 14 Jan 2006 20:48:50 -0000 1.46 ++++ gnu/usr.bin/cc/cc_int/Makefile 21 Jul 2006 00:30:44 -0000 +@@ -80,6 +80,10 @@ insn-$F.c: ${.OBJDIR}/../cc_tools/gen$F + CFLAGS+= -DHAVE_CONFIG_H + CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC + ++.if ${TARGET_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) ++CFLAGS += -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END ++.endif ++ + # c-pch.o needs extra defines. Replicate the rule here rather than + # pollute compiler command line for all other files. + c-pch.o: c-pch.c Index: gnu/usr.bin/cc/cc_tools/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/cc/cc_tools/Makefile,v retrieving revision 1.82 diff -u -p -r1.82 Makefile --- gnu/usr.bin/cc/cc_tools/Makefile 17 Mar 2006 18:54:23 -0000 1.82 -+++ gnu/usr.bin/cc/cc_tools/Makefile 6 Jul 2006 23:54:06 -0000 ++++ gnu/usr.bin/cc/cc_tools/Makefile 21 Jul 2006 11:15:28 -0000 @@ -216,7 +216,9 @@ CLEANFILES+= fini .if ${TARGET_ARCH} == "amd64" TARGET_INC= i386/biarch64.h @@ -169,7 +257,7 @@ .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/unix.h TARGET_INC+= ${GCC_CPU}/att.h -@@ -236,6 +238,11 @@ TARGET_INC+= ${GCC_CPU}/elf.h +@@ -236,6 +238,14 @@ TARGET_INC+= ${GCC_CPU}/elf.h TARGET_INC+= ${GCC_CPU}/sysv4.h .endif .endif @@ -177,6 +265,9 @@ +TARGET_INC+= ${GCC_CPU}/elf.h +TARGET_INC+= ${GCC_CPU}/aout.h +TARGET_INC+= ${GCC_CPU}/${GCC_CPU}.h ++. if defined(ARM_BIG_ENDIAN) ++CFLAGS+= -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END ++. endif +.endif TARGET_INC+= ${GCC_CPU}/freebsd.h .if ${TARGET_ARCH} == "amd64"