| 1 |
709 |
jeremybenn |
/* Definitions for target OS TPF for GNU compiler, for IBM S/390 hardware
|
| 2 |
|
|
Copyright (C) 2003, 2004, 2005, 2007, 2009,
|
| 3 |
|
|
2010, 2011 Free Software Foundation, Inc.
|
| 4 |
|
|
Contributed by P.J. Darcy (darcypj@us.ibm.com),
|
| 5 |
|
|
Hartmut Penner (hpenner@de.ibm.com), and
|
| 6 |
|
|
Ulrich Weigand (uweigand@de.ibm.com).
|
| 7 |
|
|
|
| 8 |
|
|
This file is part of GCC.
|
| 9 |
|
|
|
| 10 |
|
|
GCC is free software; you can redistribute it and/or modify it under
|
| 11 |
|
|
the terms of the GNU General Public License as published by the Free
|
| 12 |
|
|
Software Foundation; either version 3, or (at your option) any later
|
| 13 |
|
|
version.
|
| 14 |
|
|
|
| 15 |
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
| 16 |
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
| 17 |
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
| 18 |
|
|
for more details.
|
| 19 |
|
|
|
| 20 |
|
|
You should have received a copy of the GNU General Public License
|
| 21 |
|
|
along with GCC; see the file COPYING3. If not see
|
| 22 |
|
|
<http://www.gnu.org/licenses/>. */
|
| 23 |
|
|
|
| 24 |
|
|
#ifndef _TPF_H
|
| 25 |
|
|
#define _TPF_H
|
| 26 |
|
|
|
| 27 |
|
|
/* TPF wants the following macros defined/undefined as follows. */
|
| 28 |
|
|
#undef TARGET_TPF
|
| 29 |
|
|
#define TARGET_TPF 1
|
| 30 |
|
|
#undef ASM_APP_ON
|
| 31 |
|
|
#define ASM_APP_ON "#APP\n"
|
| 32 |
|
|
#undef ASM_APP_OFF
|
| 33 |
|
|
#define ASM_APP_OFF "#NO_APP\n"
|
| 34 |
|
|
#define NO_IMPLICIT_EXTERN_C
|
| 35 |
|
|
#define TARGET_POSIX_IO
|
| 36 |
|
|
|
| 37 |
|
|
#undef SIZE_TYPE
|
| 38 |
|
|
#define SIZE_TYPE ("long unsigned int")
|
| 39 |
|
|
#undef PTRDIFF_TYPE
|
| 40 |
|
|
#define PTRDIFF_TYPE ("long int")
|
| 41 |
|
|
#undef WCHAR_TYPE
|
| 42 |
|
|
#define WCHAR_TYPE "int"
|
| 43 |
|
|
#undef WCHAR_TYPE_SIZE
|
| 44 |
|
|
#define WCHAR_TYPE_SIZE 32
|
| 45 |
|
|
|
| 46 |
|
|
|
| 47 |
|
|
/* TPF OS specific stack-pointer offset. */
|
| 48 |
|
|
#undef STACK_POINTER_OFFSET
|
| 49 |
|
|
#define STACK_POINTER_OFFSET 448
|
| 50 |
|
|
|
| 51 |
|
|
/* When building for TPF, set a generic default target that is 64 bits. Also
|
| 52 |
|
|
enable TPF profiling support and the standard backchain by default. */
|
| 53 |
|
|
#undef TARGET_DEFAULT
|
| 54 |
|
|
#define TARGET_DEFAULT (MASK_TPF_PROFILING | MASK_64BIT | MASK_ZARCH \
|
| 55 |
|
|
| MASK_HARD_DFP | MASK_BACKCHAIN)
|
| 56 |
|
|
|
| 57 |
|
|
/* Exception handling. */
|
| 58 |
|
|
|
| 59 |
|
|
/* Select a format to encode pointers in exception handling data. */
|
| 60 |
|
|
#undef ASM_PREFERRED_EH_DATA_FORMAT
|
| 61 |
|
|
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr
|
| 62 |
|
|
|
| 63 |
|
|
/* TPF OS specific compiler settings. */
|
| 64 |
|
|
#undef TARGET_OS_CPP_BUILTINS
|
| 65 |
|
|
#define TARGET_OS_CPP_BUILTINS() \
|
| 66 |
|
|
do \
|
| 67 |
|
|
{ \
|
| 68 |
|
|
builtin_define_std ("tpf"); \
|
| 69 |
|
|
builtin_assert ("system=tpf"); \
|
| 70 |
|
|
builtin_define ("__ELF__"); \
|
| 71 |
|
|
} \
|
| 72 |
|
|
while (0)
|
| 73 |
|
|
|
| 74 |
|
|
|
| 75 |
|
|
#define EXTRA_SPECS \
|
| 76 |
|
|
{ "entry_spec", ENTRY_SPEC }
|
| 77 |
|
|
|
| 78 |
|
|
/* Make TPF specific spec file settings here. */
|
| 79 |
|
|
|
| 80 |
|
|
#undef STARTFILE_SPEC
|
| 81 |
|
|
#define STARTFILE_SPEC \
|
| 82 |
|
|
"%{mmain:crt0%O%s} crtbeginS%O%s crt3%O%s"
|
| 83 |
|
|
|
| 84 |
|
|
#undef ENDFILE_SPEC
|
| 85 |
|
|
#define ENDFILE_SPEC "crtendS%O%s"
|
| 86 |
|
|
|
| 87 |
|
|
#undef CC1_SPEC
|
| 88 |
|
|
#define CC1_SPEC "%{!fverbose-asm: -fverbose-asm}"
|
| 89 |
|
|
|
| 90 |
|
|
/* The GNU C++ standard library requires that these macros be defined. */
|
| 91 |
|
|
#undef CPLUSPLUS_CPP_SPEC
|
| 92 |
|
|
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
|
| 93 |
|
|
|
| 94 |
|
|
#undef ASM_SPEC
|
| 95 |
|
|
#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*} \
|
| 96 |
|
|
-alshd=%b.lst"
|
| 97 |
|
|
|
| 98 |
|
|
/* It would be nice to get the system linker script define the ones that it
|
| 99 |
|
|
needed. */
|
| 100 |
|
|
#undef LIB_SPEC
|
| 101 |
|
|
#define LIB_SPEC "-lCTIS -lCISO -lCLBM -lCTAL -lCFVS -lCTBX -lCTXO \
|
| 102 |
|
|
-lCJ00 -lCTDF -lCOMX -lCOMS -lCTHD -lCTAD -lTPFSTUB"
|
| 103 |
|
|
|
| 104 |
|
|
#undef TARGET_C99_FUNCTIONS
|
| 105 |
|
|
#define TARGET_C99_FUNCTIONS 1
|
| 106 |
|
|
|
| 107 |
|
|
#define ENTRY_SPEC "%{mmain:-entry=_start} \
|
| 108 |
|
|
%{!mmain:-entry=0}"
|
| 109 |
|
|
|
| 110 |
|
|
/* All linking is done shared on TPF-OS. */
|
| 111 |
|
|
/* FIXME: When binutils patch for new emulation is committed
|
| 112 |
|
|
then change emulation to elf64_s390_tpf. */
|
| 113 |
|
|
#undef LINK_SPEC
|
| 114 |
|
|
#define LINK_SPEC \
|
| 115 |
|
|
"-m elf64_s390 \
|
| 116 |
|
|
%{static:%estatic is not supported on TPF-OS} \
|
| 117 |
|
|
%{shared: -shared} \
|
| 118 |
|
|
%{!shared:-shared} \
|
| 119 |
|
|
%(entry_spec)"
|
| 120 |
|
|
|
| 121 |
|
|
/* IBM copies these libraries over with these names. */
|
| 122 |
|
|
#define MATH_LIBRARY "CLBM"
|
| 123 |
|
|
#define LIBSTDCXX "CPP1"
|
| 124 |
|
|
#endif /* ! _TPF_H */
|