Module Name:    src
Committed By:   mrg
Date:           Thu Apr 29 01:51:40 UTC 2021

Modified Files:
        src/external/gpl3/gcc/dist/gcc/config/arm: arm.h bpabi.h netbsd-eabi.h
            netbsd-elf.h

Log Message:
netbsd-eabi.h was never merged from the now present upstream version.
reduce diffs to upstream here and in other files in this subdir.

remove unused ARM_EABI_UNWIND_TABLES and __UNWIND_TABLES__.

clang defines __UNWIND_TABLES__, but doing this in GCC triggers the
need for more libgcc / libc unwind functionality to be added, and this
code has never been enabled for netbsd/earm.  (could potentially clean
up unused code in libc now, or, revive this once the full support has
been implemented..)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h
cvs rdiff -u -r1.16 -r1.17 \
    src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
cvs rdiff -u -r1.17 -r1.18 \
    src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.22 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.23
--- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.22	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h	Thu Apr 29 01:51:39 2021
@@ -963,8 +963,8 @@ extern const int arm_arch_cde_coproc_bit
 /* ttype entries (the only interesting data references used)
    use TARGET2 relocations.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
-    (((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
-     : DW_EH_PE_absptr)
+  (((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
+			       : DW_EH_PE_absptr)
 #endif
 
 /* The native (Norcroft) Pascal compiler for the ARM passes the static chain

Index: src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.12 src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.13
--- src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.12	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h	Thu Apr 29 01:51:39 2021
@@ -28,12 +28,9 @@
 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS
 
 /* Assume that AAPCS ABIs should adhere to the full BPABI.  */
-//#undef TARGET_BPABI
 #define TARGET_BPABI (TARGET_AAPCS_BASED)
 
 /* BPABI targets use EABI frame unwinding tables.  */
-#undef ARM_EABI_UNWIND_TABLES
-#define ARM_EABI_UNWIND_TABLES 1
 #undef ARM_UNWIND_INFO
 #define ARM_UNWIND_INFO 1
 

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.16 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.17
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.16	Tue Dec  1 02:39:08 2020
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h	Thu Apr 29 01:51:39 2021
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
-   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002-2020 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GCC.
@@ -22,10 +22,16 @@
 #undef MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS { "mabi=aapcs-linux" }
 
-#define TARGET_LINKER_EABI_SUFFIX \
-    (TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_SOFT \
-     ? "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=hard:_eabihf;:_eabi}}}" \
-     : "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=soft:_eabi;:_eabihf}}}")
+#define TARGET_LINKER_EABI_SUFFIX_SOFT \
+  "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=hard:_eabihf;:_eabi}}}"
+#define TARGET_LINKER_EABI_SUFFIX_HARD \
+  "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=soft:_eabi;:_eabihf}}}"
+
+#define TARGET_LINKER_EABI_SUFFIX			\
+  (TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_SOFT	\
+   ? TARGET_LINKER_EABI_SUFFIX_SOFT			\
+   : TARGET_LINKER_EABI_SUFFIX_HARD)
+
 #define TARGET_LINKER_BIG_EMULATION "armelfb_nbsd%(linker_eabi_suffix)"
 #define TARGET_LINKER_LITTLE_EMULATION "armelf_nbsd%(linker_eabi_suffix)"
 
@@ -41,8 +47,6 @@
 #undef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
 
-#undef ARM_EABI_UNWIND_TABLES
-#define ARM_EABI_UNWIND_TABLES 0
 #undef ARM_UNWIND_INFO
 #define ARM_UNWIND_INFO 0
 #undef ARM_DWARF_UNWIND_TABLES
@@ -57,8 +61,6 @@
       NETBSD_OS_CPP_BUILTINS_ELF();		\
       if (ARM_DWARF_UNWIND_TABLES)		\
 	builtin_define ("__ARM_DWARF_EH__");	\
-      if (ARM_EABI_UNWIND_TABLES)		\
-	builtin_define ("__UNWIND_TABLES__");	\
     }						\
   while (0)
 
@@ -73,13 +75,15 @@
 
 #undef SIZE_TYPE
 #define SIZE_TYPE "long unsigned int"
- 
+
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
 #undef SUBTARGET_EXTRA_ASM_SPEC
-#define SUBTARGET_EXTRA_ASM_SPEC	\
-  "-matpcs %{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu} %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
+#define SUBTARGET_EXTRA_ASM_SPEC		\
+  "-matpcs %{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu} "	\
+  "%{fpic|fpie:-k} "				\
+  "%{fPIC|fPIE:-k}"
 
 /* Default to full VFP if -mhard-float is specified.  */
 #undef SUBTARGET_ASM_FLOAT_SPEC
@@ -88,23 +92,23 @@
    %{mfloat-abi=hard:%{!mfpu=*:-mfpu=vfp}}"
 
 #undef SUBTARGET_EXTRA_SPECS
-#define SUBTARGET_EXTRA_SPECS				\
-  { "subtarget_extra_asm_spec",	SUBTARGET_EXTRA_ASM_SPEC }, \
-  { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, \
-  { "linker_eabi_suffix",	TARGET_LINKER_EABI_SUFFIX }, \
-  { "linker_emulation",		TARGET_LINKER_EMULATION }, \
-  { "linker_big_emulation",	TARGET_LINKER_BIG_EMULATION }, \
-  { "linker_little_emulation",	TARGET_LINKER_LITTLE_EMULATION }, \
-  { "be8_link_spec",		BE8_LINK_SPEC }, \
-  { "target_fix_v4bx_spec",	TARGET_FIX_V4BX_SPEC }, \
+#define SUBTARGET_EXTRA_SPECS						\
+  { "subtarget_extra_asm_spec",	SUBTARGET_EXTRA_ASM_SPEC },		\
+  { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, 		\
+  { "linker_eabi_suffix",	TARGET_LINKER_EABI_SUFFIX },		\
+  { "linker_emulation",		TARGET_LINKER_EMULATION },		\
+  { "linker_big_emulation",	TARGET_LINKER_BIG_EMULATION },		\
+  { "linker_little_emulation",	TARGET_LINKER_LITTLE_EMULATION },	\
+  { "be8_link_spec",		BE8_LINK_SPEC }, 			\
+  { "target_fix_v4bx_spec",	TARGET_FIX_V4BX_SPEC },			\
   NETBSD_SUBTARGET_EXTRA_SPECS
 
 #define NETBSD_ENTRY_POINT "__start"
 
 #undef LINK_SPEC
-#define LINK_SPEC \
-  "-X %{mbig-endian:-EB -m %(linker_big_emulation)} \
-   %{mlittle-endian:-EL -m %(linker_liitle_emulation)} \
-   %{!mbig-endian:%{!mlittle-endian:-m %(linker_emulation)}} \
-   %(be8_link_spec) %(target_fix_v4bx_spec) \
-   %(netbsd_link_spec)"
+#define LINK_SPEC						\
+  "-X %{mbig-endian:-EB -m %(linker_big_emulation)} "		\
+  "%{mlittle-endian:-EL -m %(linker_liitle_emulation)} "	\
+  "%{!mbig-endian:%{!mlittle-endian:-m %(linker_emulation)}} "	\
+  "%(be8_link_spec) "						\
+  "%(target_fix_v4bx_spec) %(netbsd_link_spec)"

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.17 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.18
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.17	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h	Thu Apr 29 01:51:39 2021
@@ -70,10 +70,16 @@
   "-matpcs %{mabi=aapcs*:-meabi=5} "	\
   "%{" FPIE_OR_FPIC_SPEC ":-k}"
 
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS					\
+  { "subtarget_extra_asm_spec",	SUBTARGET_EXTRA_ASM_SPEC },	\
+  { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC },	\
+  NETBSD_SUBTARGET_EXTRA_SPECS
+
 /* Default to full VFP if -mfloat-abi=hard is specified.  */
 #undef SUBTARGET_ASM_FLOAT_SPEC
-#define SUBTARGET_ASM_FLOAT_SPEC	\
-  "%{mhard-float:%{!mfpu=*:-mfpu=vfp}}   \
+#define SUBTARGET_ASM_FLOAT_SPEC		\
+  "%{mhard-float:%{!mfpu=*:-mfpu=vfp}}		\
    %{mfloat-abi=hard:%{!mfpu=*:-mfpu=vfp}}"
 
 #define NETBSD_ENTRY_POINT "__start"
@@ -170,5 +176,3 @@ do									\
     (void) sysarch (SYSARCH_ARM_SYNC_ICACHE, &s);			\
   }									\
 while (0)
-//#undef FPUTYPE_DEFAULT
-//#define FPUTYPE_DEFAULT "vfp"

Reply via email to