]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
crossconfig.m4: Handle OpenBSD just like NetBSD.
authorMaya Rashish <coypu@sdf.org>
Mon, 18 Jun 2018 17:28:53 +0000 (17:28 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 18 Jun 2018 17:28:53 +0000 (11:28 -0600)
2018-06-18  Maya Rashish  <coypu@sdf.org>

* crossconfig.m4: Handle OpenBSD just like NetBSD.
* configure: Rebuilt.

* config/alpha/openbsd.h (TARGET_DEFAULT): Define.
(LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
(INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.

* config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
here to ...
* config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.

From-SVN: r261707

gcc/ChangeLog
gcc/config/alpha/elf.h
gcc/config/alpha/linux.h
gcc/config/alpha/openbsd.h
libstdc++-v3/ChangeLog
libstdc++-v3/configure
libstdc++-v3/crossconfig.m4

index 6a386d93691ef4444aa0791c829b7bd145621c10..b3449654b1e08c0dca22dfd307be5fa01a7161cf 100644 (file)
        (strlen_check_and_optimize_stmt): Same.
        * doc/extend.texi (Other Builtins): Document strnlen.
 
+2018-06-18  Maya Rashish  <coypu@sdf.org>
+
+       * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
+       (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
+       (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
+
+       * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
+       here to ...
+       * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
+
 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
 
        * tree.c (escaped_string::escape): Replace cast to char * by
index db7666161562c1a304c1a676422bf974fbb8959b..2a767f193f2faa0b66b1cacffc09968e02e562c9 100644 (file)
@@ -100,32 +100,6 @@ do {                                                                       \
     ASM_OUTPUT_DEF (FILE, alias, name);                                \
   } while (0)
 
-/* Provide a STARTFILE_SPEC appropriate for ELF.  Here we add the
-   (even more) magical crtbegin.o file which provides part of the
-   support for getting C++ file-scope static object constructed
-   before entering `main'.  */
-
-#undef STARTFILE_SPEC
-#ifdef HAVE_LD_PIE
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
-#else
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
-#endif
-
-/* Provide a ENDFILE_SPEC appropriate for ELF.  Here we tack on the
-   magical crtend.o file which provides part of the support for
-   getting C++ file-scope static object constructed before entering
-   `main', followed by a normal ELF "finalizer" file, `crtn.o'.  */
-
-#undef ENDFILE_SPEC
-#define ENDFILE_SPEC \
-  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
-   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
-
 /* This variable should be set to 'true' if the target ABI requires
    unwinding tables even when exceptions are not used.  */
 #define TARGET_UNWIND_TABLES_DEFAULT true
index 9ef320668c72c13d5418e20832aaf25b81d462a1..2bf52fe78aedc8f1917bce64af6785c5f88786dc 100644 (file)
@@ -78,6 +78,32 @@ along with GCC; see the file COPYING3.  If not see
 
 #define TARGET_POSIX_IO
 
+/* Provide a STARTFILE_SPEC appropriate for ELF.  Here we add the
+   (even more) magical crtbegin.o file which provides part of the
+   support for getting C++ file-scope static object constructed
+   before entering `main'.  */
+
+#undef STARTFILE_SPEC
+#ifdef HAVE_LD_PIE
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
+   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#else
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
+   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#endif
+
+/* Provide a ENDFILE_SPEC appropriate for ELF.  Here we tack on the
+   magical crtend.o file which provides part of the support for
+   getting C++ file-scope static object constructed before entering
+   `main', followed by a normal ELF "finalizer" file, `crtn.o'.  */
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static|static-pie:--start-group} %G %L \
    %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"
index aa369d7630ae4ca8e58f387f986c1c06ce91a0b6..9f035150d8b718aa5b66302a6ed2d56c835b24bd 100644 (file)
@@ -19,6 +19,28 @@ along with GCC; see the file COPYING3.  If not see
 
 /* Controlling the compilation driver.  */
 
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+       (MASK_FPREGS | MASK_IEEE | MASK_IEEE_CONFORMANT)
+
+ #define LINK_SPEC \
+  "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+   %{shared:-shared} %{R*} \
+   %{static:-Bstatic} \
+   %{!static:-Bdynamic} \
+   %{rdynamic:-export-dynamic} \
+   %{assert*} \
+   %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+
+/* As an elf system, we need crtbegin/crtend stuff.  */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+       %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+       %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+       %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
 /* run-time target specifications */
 #define TARGET_OS_CPP_BUILTINS()               \
     do {                                       \
@@ -28,18 +50,27 @@ along with GCC; see the file COPYING3.  If not see
 
 /* Layout of source language data types.  */
 
-/* This must agree with <machine/ansi.h> */
+/* This must agree with <machine/_types.h> */
 #undef SIZE_TYPE
 #define SIZE_TYPE "long unsigned int"
 
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
+#undef INTMAX_TYPE
+#define INTMAX_TYPE "long long int"
+
+#undef UINTMAX_TYPE
+#define UINTMAX_TYPE "long long unsigned int"
+
 #undef WCHAR_TYPE
 #define WCHAR_TYPE "int"
 
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 32
 
+#undef WINT_TYPE
+#define WINT_TYPE "int"
+
 \f
 #define LOCAL_LABEL_PREFIX     "."
index d5985588b4ca60bb4d41e45b794681b418758316..0af7c93227e7bd11d35b4f3ad3c44826ed70bbcf 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-18  Maya Rashish  <coypu@sdf.org>
+
+       * crossconfig.m4: Handle OpenBSD just like NetBSD.
+       * configure: Rebuilt.
+
 2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
 
        P0754R2 <version> header
index 7bad76486a0bcfe7628604c8fcc7b02556a7ca5a..5a017beaabe0a0d0b9af1bbe0f2388e7aea79271 100755 (executable)
@@ -66148,7 +66148,7 @@ fi
 done
 
     ;;
-  *-netbsd*)
+  *-netbsd* | *-openbsd*)
     SECTION_FLAGS='-ffunction-sections -fdata-sections'
 
 
index 669d87f7602e10fe9140cd92277b8590589cb211..0dbfe4057bd50b0f2690f479736b2807c7dd6a1e 100644 (file)
@@ -201,7 +201,7 @@ case "${host}" in
     AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
     AC_CHECK_FUNCS(_wfopen)
     ;;
-  *-netbsd*)
+  *-netbsd* | *-openbsd*)
     SECTION_FLAGS='-ffunction-sections -fdata-sections'
     AC_SUBST(SECTION_FLAGS) 
     GLIBCXX_CHECK_LINKER_FEATURES