aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaya Rashish <coypu@sdf.org>2018-06-18 17:28:53 +0000
committerJeff Law <law@gcc.gnu.org>2018-06-18 11:28:53 -0600
commit4f9eae9fd88ea2de19b7660b03fa6d49217ab211 (patch)
treea0ba86f5881315bdeec18fd2ac3e57fd5728a712
parent410fb7d7b097d3167e1212693a22bdc0f3a1efdf (diff)
downloadgcc-4f9eae9fd88ea2de19b7660b03fa6d49217ab211.zip
gcc-4f9eae9fd88ea2de19b7660b03fa6d49217ab211.tar.gz
gcc-4f9eae9fd88ea2de19b7660b03fa6d49217ab211.tar.bz2
crossconfig.m4: Handle OpenBSD just like NetBSD.
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
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/alpha/elf.h26
-rw-r--r--gcc/config/alpha/linux.h26
-rw-r--r--gcc/config/alpha/openbsd.h33
-rw-r--r--libstdc++-v3/ChangeLog5
-rwxr-xr-xlibstdc++-v3/configure2
-rw-r--r--libstdc++-v3/crossconfig.m42
7 files changed, 75 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6a386d9..b344965 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -14,6 +14,16 @@
(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
diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
index db76661..2a767f1 100644
--- a/gcc/config/alpha/elf.h
+++ b/gcc/config/alpha/elf.h
@@ -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
diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h
index 9ef3206..2bf52fe 100644
--- a/gcc/config/alpha/linux.h
+++ b/gcc/config/alpha/linux.h
@@ -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}}"
diff --git a/gcc/config/alpha/openbsd.h b/gcc/config/alpha/openbsd.h
index aa369d7..9f03515 100644
--- a/gcc/config/alpha/openbsd.h
+++ b/gcc/config/alpha/openbsd.h
@@ -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"
+
#define LOCAL_LABEL_PREFIX "."
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index d598558..0af7c93 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 7bad764..5a017be 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -66148,7 +66148,7 @@ fi
done
;;
- *-netbsd*)
+ *-netbsd* | *-openbsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index 669d87f..0dbfe40 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -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