summaryrefslogtreecommitdiff
path: root/gnu/gcc
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2016-09-01 11:03:10 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2016-09-01 11:03:10 +0000
commit9b29a0c9dd265acbfde2fe1fcf012e05035514ba (patch)
tree1b0c67e0d46f20af18036db65ef8577de740be39 /gnu/gcc
parentcc0ba76d1364499a76720de2920f78d97327cc80 (diff)
Switch OpenBSD/armv7 to ARM EABI (soft-float). This is a complete ABI
break which cannot be easily crossed. ok kettenis@ jsg@
Diffstat (limited to 'gnu/gcc')
-rw-r--r--gnu/gcc/gcc/config/arm/openbsd.h18
-rw-r--r--gnu/gcc/gcc/config/arm/openbsd1.h26
-rw-r--r--gnu/gcc/gcc/config/arm/unwind-arm.h2
3 files changed, 37 insertions, 9 deletions
diff --git a/gnu/gcc/gcc/config/arm/openbsd.h b/gnu/gcc/gcc/config/arm/openbsd.h
index f76f1646635..91475ffb8d1 100644
--- a/gnu/gcc/gcc/config/arm/openbsd.h
+++ b/gnu/gcc/gcc/config/arm/openbsd.h
@@ -41,18 +41,20 @@ Boston, MA 02111-1307, USA. */
/* armv5te default cpu. */
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9e
-/* Default is to use APCS-32 mode. */
-
-/* Default it to use ATPCS with soft-VFP. */
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT \
- (MASK_APCS_FRAME \
- | TARGET_ENDIAN_DEFAULT)
+/* We default to a soft-float ABI so that binaries can run on all
+ target hardware. */
+#undef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+/* We default to the "aapcs-linux" ABI so that enums are int-sized by
+ default. */
+#undef ARM_DEFAULT_ABI
+#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
+ builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
OPENBSD_OS_CPP_BUILTINS_ELF(); \
} \
while (0)
@@ -79,7 +81,7 @@ Boston, MA 02111-1307, USA. */
#undef SUBTARGET_EXTRA_ASM_SPEC
#define SUBTARGET_EXTRA_ASM_SPEC \
- "-matpcs %{fpic|fPIC|fpie|fPIE:-k}"
+ "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4} %{fpic|fPIC|fpie|fPIE:-k}"
/* Default floating point model is soft-VFP.
FIXME: -mhard-float currently implies FPA. */
diff --git a/gnu/gcc/gcc/config/arm/openbsd1.h b/gnu/gcc/gcc/config/arm/openbsd1.h
new file mode 100644
index 00000000000..afd2e3b1762
--- /dev/null
+++ b/gnu/gcc/gcc/config/arm/openbsd1.h
@@ -0,0 +1,26 @@
+/* Definitions of target machine for GNU compiler, OpenBSD/arm ELF version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Wasabi Systems, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
+
+/* use EABI frame unwinding tables. */
+#define TARGET_UNWIND_INFO 1
diff --git a/gnu/gcc/gcc/config/arm/unwind-arm.h b/gnu/gcc/gcc/config/arm/unwind-arm.h
index a3040d7ad77..8a1bf2494b5 100644
--- a/gnu/gcc/gcc/config/arm/unwind-arm.h
+++ b/gnu/gcc/gcc/config/arm/unwind-arm.h
@@ -225,7 +225,7 @@ extern "C" {
if (!tmp)
return 0;
-#if defined(linux) || defined(__NetBSD__)
+#if defined(linux) || defined(__NetBSD__) || defined(__OpenBSD__)
/* Pc-relative indirect. */
tmp += ptr;
tmp = *(_Unwind_Word *) tmp;