Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc Simplify or1k config.gcc configury bits. ...



details:   https://anonhg.NetBSD.org/src/rev/14de02eb5398
branches:  trunk
changeset: 332371:14de02eb5398
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Sep 19 00:24:28 2014 +0000

description:
Simplify or1k config.gcc configury bits.  use gcc_cv_initfini_array=yes
to enable initfini.  remove hacked initfini support and use the common gcc
implementation.  Rerun native-gcc.

diffstat:

 external/gpl3/gcc/dist/gcc/config.gcc                    |   70 ++++----
 external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h          |   40 -----
 external/gpl3/gcc/dist/gcc/config/or1k/or1k.c            |   46 -----
 external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/c++config.h |  118 +++++++-------
 external/gpl3/gcc/usr.bin/gcc/arch/or1k/auto-host.h      |    2 +-
 external/gpl3/gcc/usr.bin/gcc/arch/or1k/configargs.h     |    2 +-
 6 files changed, 97 insertions(+), 181 deletions(-)

diffs (truncated from 551 to 300 lines):

diff -r 1ae5c5deb666 -r 14de02eb5398 external/gpl3/gcc/dist/gcc/config.gcc
--- a/external/gpl3/gcc/dist/gcc/config.gcc     Thu Sep 18 23:37:51 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config.gcc     Fri Sep 19 00:24:28 2014 +0000
@@ -2071,40 +2071,42 @@
        use_collect2=no
        use_gcc_stdint=wrap
        ;;
-or1k-*-elf*)
-       tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ${cpu_type}/elf.h"
-       extra_parts="crti.o crtbegin.o crtend.o crtn.o"
-       tmake_file=or1k/t-or1k
-       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
-       ;;
-or1k-*-linux-*)
-       tm_file="${tm_file} dbxelf.h elfos.h or1k/elf.h gnu-user.h linux.h or1k/linux-gas.h or1k/linux-elf.h uclibc-stdint.h"
-       tmake_file="or1k/t-or1k or1k/t-linux ${tmake_file}"
-       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
-       ;;
-or1k-*-netbsd*)
-       tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h netbsd-stdint.h or1k/netbsd.h"
-       #tmake_file="or1k/t-or1k ${tmake_file}"
-       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
-       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
-       ;;
-or1knd-*-elf*)
-       tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ${cpu_type}/elf.h"
-       extra_parts="crti.o crtbegin.o crtend.o crtn.o"
-       tmake_file=or1k/t-or1knd
-       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
-       ;;
-or1knd-*-linux-*)
-       tm_file="${tm_file} dbxelf.h elfos.h or1k/elf.h linux.h or1k/linux-gas.h or1k/linux-elf.h uclibc-stdint.h"
-       tmake_file="or1k/t-or1knd or1k/t-linux ${tmake_file}"
-       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
-       ;;
-or1knd-*-netbsd*)
-       tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h netbsd-stdint.h or1k/netbsd.h"
-       #tmake_file="or1k/t-or1k ${tmake_file}"
-       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
-       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
-       ;;
+or1k*-*-elf*)
+       tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ${cpu_type}/elf.h"
+       extra_parts="crti.o crtbegin.o crtend.o crtn.o"
+       case ${target} in
+         or1knd-*)
+           tmake_file=or1k/t-or1knd
+           tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
+           ;;
+         *)
+           tmake_file=or1k/t-or1k
+           tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
+           ;;
+       esac
+       ;;
+or1k*-*-linux-*)
+       tm_file="${tm_file} dbxelf.h elfos.h or1k/elf.h gnu-user.h linux.h or1k/linux-gas.h or1k/linux-elf.h uclibc-stdint.h"
+       case ${target} in
+         or1knd-*)
+           tmake_file="or1k/t-or1knd or1k/t-linux ${tmake_file}"
+           tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
+           ;;
+         *)
+           tmake_file="or1k/t-or1k or1k/t-linux ${tmake_file}"
+           tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
+           ;;
+       esac
+       ;;
+or1k*-*-netbsd*)
+       tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h netbsd-stdint.h or1k/netbsd.h"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+       case ${target} in
+         or1knd-*) tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF" ;;
+         *) tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON" ;;
+       esac
+       gcc_cv_initfini_array=yes
+       ;;
 pdp11-*-*)
        tm_file="${tm_file} newlib-stdint.h"
        use_gcc_stdint=wrap
diff -r 1ae5c5deb666 -r 14de02eb5398 external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h
--- a/external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h   Thu Sep 18 23:37:51 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h   Fri Sep 19 00:24:28 2014 +0000
@@ -65,43 +65,3 @@
   (/*MASK_HARD_FLOAT |*/ MASK_DOUBLE_FLOAT \
    | MASK_HARD_DIV | MASK_HARD_MUL \
    | MASK_MASK_CMOV | MASK_MASK_ROR | MASK_MASK_SEXT)
-
-/* Use .{init,fini}_array.  Therefore, we do not want GCC to put
-   anything into the .{init,fini} sections.  */
-#define OR1K_CTORS_SECTION_ASM_OP \
-  "\t.section\t.init_array,\"aw\",@init_array"
-#define OR1K_DTORS_SECTION_ASM_OP \
-  "\t.section\t.fini_array,\"aw\",@fini_array"
-
-#undef INIT_SECTION_ASM_OP
-#undef FINI_SECTION_ASM_OP
-#define INIT_ARRAY_SECTION_ASM_OP OR1K_CTORS_SECTION_ASM_OP
-#define FINI_ARRAY_SECTION_ASM_OP OR1K_DTORS_SECTION_ASM_OP
-
-/* Define CTORS_SECTION_ASM_OP.  */
-#undef CTORS_SECTION_ASM_OP
-#undef DTORS_SECTION_ASM_OP
-#ifndef IN_LIBGCC2
-# define CTORS_SECTION_ASM_OP OR1K_CTORS_SECTION_ASM_OP
-# define DTORS_SECTION_ASM_OP OR1K_DTORS_SECTION_ASM_OP
-#else /* !defined (IN_LIBGCC2) */
-/* The .ctors section is not part of the ABI, so we do not define
-   CTORS_SECTION_ASM_OP when in libgcc; that prevents crtstuff
-   from trying to use it.  We do define it when doing normal
-   compilation, as .init_array can be used instead of .ctors.  */
-/* There is no need to emit begin or end markers when using
-   init_array; the dynamic linker will compute the size of the
-   array itself based on special symbols created by the static
-   linker.  However, we do need to arrange to set up
-   exception-handling here.  */
-#   define CTOR_LIST_BEGIN asm (OR1K_CTORS_SECTION_OP)
-#   define CTOR_LIST_END /* empty */
-#   define DTOR_LIST_BEGIN asm (OR1K_DTORS_SECTION_OP)
-#   define DTOR_LIST_END /* empty */
-#endif /* !defined (IN_LIBCC2) */
-
-#undef TARGET_ASM_CONSTRUCTOR
-#define TARGET_ASM_CONSTRUCTOR or1k_elf_asm_constructor
-#undef TARGET_ASM_DESTRUCTOR
-#define TARGET_ASM_DESTRUCTOR or1k_elf_asm_destructor
-
diff -r 1ae5c5deb666 -r 14de02eb5398 external/gpl3/gcc/dist/gcc/config/or1k/or1k.c
--- a/external/gpl3/gcc/dist/gcc/config/or1k/or1k.c     Thu Sep 18 23:37:51 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/or1k/or1k.c     Fri Sep 19 00:24:28 2014 +0000
@@ -2424,52 +2424,6 @@
     }
 }
 
-#if defined(TARGET_ASM_CONSTRUCTOR) || defined(TARGET_ASM_DESTRUCTOR)
-static void
-or1k_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
-{
-  section *s;
-
-  /* Put these in the .init_array section, using a special relocation.  */
-  if (priority != DEFAULT_INIT_PRIORITY)
-    {
-      char buf[18];
-      sprintf (buf, "%s.%.5u",
-              is_ctor ? ".init_array" : ".fini_array",
-              priority);
-      s = get_section (buf, SECTION_WRITE, NULL_TREE);
-    }
-  else if (is_ctor)
-    s = ctors_section;
-  else
-    s = dtors_section;
-
-  switch_to_section (s);
-  assemble_align (POINTER_SIZE);
-  fputs ("\t.word\t", asm_out_file);
-  output_addr_const (asm_out_file, symbol);
-  fputs ("\n", asm_out_file);
-}
-
-/* Add a function to the list of static constructors.  */
-
-#ifdef TARGET_ASM_CONSTRUCTOR
-static void
-or1k_elf_asm_constructor (rtx symbol, int priority)
-{
-  or1k_elf_asm_cdtor (symbol, priority, /*is_ctor=*/true);
-}
-#endif
-
-#ifdef TARGET_ASM_DESTRUCTOR
-static void
-or1k_elf_asm_destructor (rtx symbol, int priority)
-{
-  or1k_elf_asm_cdtor (symbol, priority, /*is_ctor=*/false);
-}
-#endif
-#endif
-
 #undef  TARGET_FRAME_POINTER_REQUIRED
 #define TARGET_FRAME_POINTER_REQUIRED or1k_frame_pointer_required
 
diff -r 1ae5c5deb666 -r 14de02eb5398 external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/c++config.h
--- a/external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/c++config.h  Thu Sep 18 23:37:51 2014 +0000
+++ b/external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/c++config.h  Fri Sep 19 00:24:28 2014 +0000
@@ -471,31 +471,31 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Define to 1 if you have the `acosf' function. */
-/* #undef _GLIBCXX_HAVE_ACOSF */
+#define _GLIBCXX_HAVE_ACOSF 1
 
 /* Define to 1 if you have the `acosl' function. */
-/* #undef _GLIBCXX_HAVE_ACOSL */
+#define _GLIBCXX_HAVE_ACOSL 1
 
 /* Define to 1 if you have the `asinf' function. */
-/* #undef _GLIBCXX_HAVE_ASINF */
+#define _GLIBCXX_HAVE_ASINF 1
 
 /* Define to 1 if you have the `asinl' function. */
-/* #undef _GLIBCXX_HAVE_ASINL */
+#define _GLIBCXX_HAVE_ASINL 1
 
 /* Define to 1 if the target assembler supports .symver directive. */
 #define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
 
 /* Define to 1 if you have the `atan2f' function. */
-/* #undef _GLIBCXX_HAVE_ATAN2F */
+#define _GLIBCXX_HAVE_ATAN2F 1
 
 /* Define to 1 if you have the `atan2l' function. */
-/* #undef _GLIBCXX_HAVE_ATAN2L */
+#define _GLIBCXX_HAVE_ATAN2L 1
 
 /* Define to 1 if you have the `atanf' function. */
-/* #undef _GLIBCXX_HAVE_ATANF */
+#define _GLIBCXX_HAVE_ATANF 1
 
 /* Define to 1 if you have the `atanl' function. */
-/* #undef _GLIBCXX_HAVE_ATANL */
+#define _GLIBCXX_HAVE_ATANL 1
 
 /* Define to 1 if you have the `at_quick_exit' function. */
 #define _GLIBCXX_HAVE_AT_QUICK_EXIT 1
@@ -504,25 +504,25 @@
 /* #undef _GLIBCXX_HAVE_CC_TLS */
 
 /* Define to 1 if you have the `ceilf' function. */
-/* #undef _GLIBCXX_HAVE_CEILF */
+#define _GLIBCXX_HAVE_CEILF 1
 
 /* Define to 1 if you have the `ceill' function. */
-/* #undef _GLIBCXX_HAVE_CEILL */
+#define _GLIBCXX_HAVE_CEILL 1
 
 /* Define to 1 if you have the <complex.h> header file. */
 #define _GLIBCXX_HAVE_COMPLEX_H 1
 
 /* Define to 1 if you have the `cosf' function. */
-/* #undef _GLIBCXX_HAVE_COSF */
+#define _GLIBCXX_HAVE_COSF 1
 
 /* Define to 1 if you have the `coshf' function. */
-/* #undef _GLIBCXX_HAVE_COSHF */
+#define _GLIBCXX_HAVE_COSHF 1
 
 /* Define to 1 if you have the `coshl' function. */
-/* #undef _GLIBCXX_HAVE_COSHL */
+#define _GLIBCXX_HAVE_COSHL 1
 
 /* Define to 1 if you have the `cosl' function. */
-/* #undef _GLIBCXX_HAVE_COSL */
+#define _GLIBCXX_HAVE_COSL 1
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #define _GLIBCXX_HAVE_DLFCN_H 1
@@ -591,25 +591,25 @@
 #define _GLIBCXX_HAVE_EXECINFO_H 1
 
 /* Define to 1 if you have the `expf' function. */
-/* #undef _GLIBCXX_HAVE_EXPF */
+#define _GLIBCXX_HAVE_EXPF 1
 
 /* Define to 1 if you have the `expl' function. */
-/* #undef _GLIBCXX_HAVE_EXPL */
+#define _GLIBCXX_HAVE_EXPL 1
 
 /* Define to 1 if you have the `fabsf' function. */
-/* #undef _GLIBCXX_HAVE_FABSF */
+#define _GLIBCXX_HAVE_FABSF 1
 
 /* Define to 1 if you have the `fabsl' function. */
 #define _GLIBCXX_HAVE_FABSL 1
 
 /* Define to 1 if you have the <fenv.h> header file. */
-/* #undef _GLIBCXX_HAVE_FENV_H */
+#define _GLIBCXX_HAVE_FENV_H 1
 
 /* Define to 1 if you have the `finite' function. */
-/* #undef _GLIBCXX_HAVE_FINITE */
+#define _GLIBCXX_HAVE_FINITE 1
 
 /* Define to 1 if you have the `finitef' function. */
-/* #undef _GLIBCXX_HAVE_FINITEF */
+#define _GLIBCXX_HAVE_FINITEF 1
 
 /* Define to 1 if you have the `finitel' function. */
 /* #undef _GLIBCXX_HAVE_FINITEL */
@@ -618,16 +618,16 @@
 #define _GLIBCXX_HAVE_FLOAT_H 1
 
 /* Define to 1 if you have the `floorf' function. */
-/* #undef _GLIBCXX_HAVE_FLOORF */
+#define _GLIBCXX_HAVE_FLOORF 1
 
 /* Define to 1 if you have the `floorl' function. */
-/* #undef _GLIBCXX_HAVE_FLOORL */
+#define _GLIBCXX_HAVE_FLOORL 1



Home | Main Index | Thread Index | Old Index