/* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
- Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003-2020 Free Software Foundation, Inc.
Contributed by P.J. Darcy (darcypj@us.ibm.com),
- Hartmut Penner (hpenner@de.ibm.com), and
- Ulrich Weigand (uweigand@de.ibm.com).
+ Hartmut Penner (hpenner@de.ibm.com), and
+ Ulrich Weigand (uweigand@de.ibm.com).
This file is part of GCC.
#define ASM_APP_ON "#APP\n"
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
-#define NO_IMPLICIT_EXTERN_C
#define TARGET_POSIX_IO
#undef SIZE_TYPE
#define WCHAR_TYPE_SIZE 32
-/* Basic record keeping for the TPF OS name. */
-#undef TARGET_VERSION
-#define TARGET_VERSION fprintf (stderr, " (TPF: zSeries)");
-
/* TPF OS specific stack-pointer offset. */
#undef STACK_POINTER_OFFSET
-#define STACK_POINTER_OFFSET 448
+#define STACK_POINTER_OFFSET 448
/* When building for TPF, set a generic default target that is 64 bits. Also
enable TPF profiling support and the standard backchain by default. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_TPF_PROFILING | MASK_64BIT | MASK_ZARCH \
- | MASK_HARD_FLOAT | MASK_BACKCHAIN)
+ | MASK_HARD_DFP | MASK_BACKCHAIN)
/* Exception handling. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-#undef ASM_SPEC
-#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*} \
- -alshd=%b.lst"
+/* Rewrite -march=arch* options to the original CPU name in order to
+ make it work with older binutils. */
+#undef ASM_SPEC
+#define ASM_SPEC \
+ "%{m31&m64}%{mesa&mzarch}%{march=z*}" \
+ "%{march=arch5:-march=z900}" \
+ "%{march=arch6:-march=z990}" \
+ "%{march=arch7:-march=z9-ec}" \
+ "%{march=arch8:-march=z10}" \
+ "%{march=arch9:-march=z196}" \
+ "%{march=arch10:-march=zEC12}" \
+ "%{march=arch11:-march=z13}" \
+ " -alshd=%b.lst"
-/* It would be nice to get the system linker script define the ones that it
- needed. */
#undef LIB_SPEC
#define LIB_SPEC "-lCTIS -lCISO -lCLBM -lCTAL -lCFVS -lCTBX -lCTXO \
- -lCJ00 -lCTDF -lCOMX -lCOMS -lCTHD -lCTAD -lTPFSTUB"
-
-#undef TARGET_C99_FUNCTIONS
-#define TARGET_C99_FUNCTIONS 1
+ -lCJ00 -lCTDF -lCOMX -lCOMS -lCTHD -lCTAD -lTPFSTUB"
#define ENTRY_SPEC "%{mmain:-entry=_start} \
- %{!mmain:-entry=0}"
+ %{!mmain:-entry=0}"
/* All linking is done shared on TPF-OS. */
/* FIXME: When binutils patch for new emulation is committed
%{!shared:-shared} \
%(entry_spec)"
-#define MD_UNWIND_SUPPORT "config/s390/tpf-unwind.h"
-
/* IBM copies these libraries over with these names. */
-#define MATH_LIBRARY "-lCLBM"
-#define LIBSTDCXX "-lCPP1"
+#define MATH_LIBRARY "CLBM"
+#define LIBSTDCXX "CPP1"
+
+#undef TARGET_LIBC_HAS_FUNCTION
+#define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function
+
+/* GAS supports it, but the debuggers don't, so avoid it. */
+#define SUPPORTS_DISCRIMINATOR 0
+
#endif /* ! _TPF_H */