From owner-svn-src-projects@FreeBSD.ORG Sun Aug 12 00:25:36 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ADC4106564A; Sun, 12 Aug 2012 00:25:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 149E38FC08; Sun, 12 Aug 2012 00:25:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7C0PZrP016219; Sun, 12 Aug 2012 00:25:35 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7C0PZG9016213; Sun, 12 Aug 2012 00:25:35 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201208120025.q7C0PZG9016213@svn.freebsd.org> From: Andrew Turner Date: Sun, 12 Aug 2012 00:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239203 - in projects/arm_eabi: contrib/gcc/config/arm gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov gnu/usr.bin/cc X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2012 00:25:36 -0000 Author: andrew Date: Sun Aug 12 00:25:35 2012 New Revision: 239203 URL: http://svn.freebsd.org/changeset/base/239203 Log: Start to support building either ABI. There is currently no way to choose to use the old ABI but that will be fixed. Modified: projects/arm_eabi/contrib/gcc/config/arm/freebsd.h projects/arm_eabi/gnu/lib/csu/Makefile projects/arm_eabi/gnu/lib/libgcc/Makefile projects/arm_eabi/gnu/lib/libgcov/Makefile projects/arm_eabi/gnu/usr.bin/cc/Makefile.inc Modified: projects/arm_eabi/contrib/gcc/config/arm/freebsd.h ============================================================================== --- projects/arm_eabi/contrib/gcc/config/arm/freebsd.h Sat Aug 11 23:48:39 2012 (r239202) +++ projects/arm_eabi/contrib/gcc/config/arm/freebsd.h Sun Aug 12 00:25:35 2012 (r239203) @@ -29,8 +29,13 @@ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } #undef SUBTARGET_EXTRA_ASM_SPEC +#ifdef TARGET_ARM_EABI #define SUBTARGET_EXTRA_ASM_SPEC \ "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4} %{fpic|fpie:-k} %{fPIC|fPIE:-k}" +#else +#define SUBTARGET_EXTRA_ASM_SPEC \ + "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}" +#endif /* Default to full FPA if -mhard-float is specified. */ #undef SUBTARGET_ASM_FLOAT_SPEC @@ -63,6 +68,7 @@ #define TARGET_ENDIAN_DEFAULT 0 #endif +#ifdef TARGET_ARM_EABI /* We default to a soft-float ABI so that binaries can run on all target hardware. */ #undef TARGET_DEFAULT_FLOAT_ABI @@ -79,6 +85,19 @@ TARGET_BPABI_CPP_BUILTINS(); \ } \ while (false) +#else +/* Default it to use ATPCS with soft-VFP. */ +#undef TARGET_DEFAULT +#define TARGET_DEFAULT \ + (MASK_APCS_FRAME \ + | TARGET_ENDIAN_DEFAULT) + +#undef ARM_DEFAULT_ABI +#define ARM_DEFAULT_ABI ARM_ABI_ATPCS + +#undef FPUTYPE_DEFAULT +#define FPUTYPE_DEFAULT FPUTYPE_VFP +#endif /* Define the actual types of some ANSI-mandated types. Needs to agree with . GCC defaults come from c-decl.c, Modified: projects/arm_eabi/gnu/lib/csu/Makefile ============================================================================== --- projects/arm_eabi/gnu/lib/csu/Makefile Sat Aug 11 23:48:39 2012 (r239202) +++ projects/arm_eabi/gnu/lib/csu/Makefile Sun Aug 12 00:25:35 2012 (r239203) @@ -24,6 +24,10 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN +.if ${TARGET_CPUARCH} == "arm" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${MACHINE_CPUARCH} == "ia64" BEGINSRC= crtbegin.asm ENDSRC= crtend.asm Modified: projects/arm_eabi/gnu/lib/libgcc/Makefile ============================================================================== --- projects/arm_eabi/gnu/lib/libgcc/Makefile Sat Aug 11 23:48:39 2012 (r239202) +++ projects/arm_eabi/gnu/lib/libgcc/Makefile Sun Aug 12 00:25:35 2012 (r239203) @@ -15,6 +15,10 @@ MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" +.if ${TARGET_CPUARCH} == "arm" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${TARGET_CPUARCH} == "mips" LIB= gcc .endif Modified: projects/arm_eabi/gnu/lib/libgcov/Makefile ============================================================================== --- projects/arm_eabi/gnu/lib/libgcov/Makefile Sat Aug 11 23:48:39 2012 (r239202) +++ projects/arm_eabi/gnu/lib/libgcov/Makefile Sun Aug 12 00:25:35 2012 (r239203) @@ -15,6 +15,11 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. + +.if ${TARGET_CPUARCH} == "arm" +CFLAGS+= -DTARGET_ARM_EABI +.endif + # # Library members defined in libgcov.c. # Defined in libgcov.c, included only in gcov library Modified: projects/arm_eabi/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- projects/arm_eabi/gnu/usr.bin/cc/Makefile.inc Sat Aug 11 23:48:39 2012 (r239202) +++ projects/arm_eabi/gnu/usr.bin/cc/Makefile.inc Sun Aug 12 00:25:35 2012 (r239203) @@ -26,6 +26,10 @@ CSTD?= gnu89 CFLAGS+= -DCROSS_COMPILE .endif +.if ${TARGET_CPUARCH} == "arm" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${TARGET_ARCH} == "armeb" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif