(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
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
#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}}"
/* 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 { \
/* 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 "."
+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
done
;;
- *-netbsd*)
+ *-netbsd* | *-openbsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
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