1 /* Definitions for Linux for S/390.
2 Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007
3 Free Software Foundation, Inc.
4 Contributed by Hartmut Penner (hpenner@de.ibm.com) and
5 Ulrich Weigand (uweigand@de.ibm.com).
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
26 /* Target specific version string. */
28 #ifdef DEFAULT_TARGET_64BIT
30 #define TARGET_VERSION fprintf (stderr, " (Linux for zSeries)");
33 #define TARGET_VERSION fprintf (stderr, " (Linux for S/390)");
37 /* Target specific type definitions. */
39 /* ??? Do we really want long as size_t on 31-bit? */
41 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned int")
43 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
46 #define WCHAR_TYPE "int"
47 #undef WCHAR_TYPE_SIZE
48 #define WCHAR_TYPE_SIZE 32
51 /* Target specific preprocessor settings. */
53 #define TARGET_OS_CPP_BUILTINS() \
56 LINUX_TARGET_OS_CPP_BUILTINS(); \
61 /* Target specific assembler settings. */
64 #define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}"
67 /* Target specific linker settings. */
69 #ifdef DEFAULT_TARGET_64BIT
70 #define MULTILIB_DEFAULTS { "m64" }
72 #define MULTILIB_DEFAULTS { "m31" }
75 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
76 #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
80 "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
85 %{rdynamic:-export-dynamic} \
87 %{m31:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
88 %{m64:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}}"
90 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
92 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
94 #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
96 #ifdef TARGET_LIBC_PROVIDES_SSP
97 /* s390 glibc provides __stack_chk_guard in 0x14(tp),
98 s390x glibc provides it at 0x28(tp). */
99 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
102 /* Define if long doubles should be mangled as 'g'. */
103 #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING