Date: Sun, 12 Aug 2012 00:25:35 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org 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 Message-ID: <201208120025.q7C0PZG9016213@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <machine/ansi.h>. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208120025.q7C0PZG9016213>