| 1 |
/* Definitions of target machine GNU compiler. VMS common version. |
| 2 |
Copyright (C) 2003-2025 Free Software Foundation, Inc. |
| 3 |
Contributed by Douglas B Rupp ([email protected]). |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 7 |
GCC is free software; you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation; either version 3, or (at your option) |
| 10 |
any later version. |
| 11 |
|
| 12 |
GCC is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with GCC; see the file COPYING3. If not see |
| 19 |
<http://www.gnu.org/licenses/>. */ |
| 20 |
|
| 21 |
#define TARGET_OBJECT_SUFFIX ".obj" |
| 22 |
#define TARGET_EXECUTABLE_SUFFIX ".exe" |
| 23 |
|
| 24 |
#define TARGET_OS_CPP_BUILTINS() \ |
| 25 |
do { \ |
| 26 |
builtin_define_std ("vms"); \ |
| 27 |
builtin_define_std ("VMS"); \ |
| 28 |
builtin_assert ("system=vms"); \ |
| 29 |
SUBTARGET_OS_CPP_BUILTINS(); \ |
| 30 |
builtin_define ("__int64=long long"); \ |
| 31 |
if (flag_vms_pointer_size == VMS_POINTER_SIZE_32) \ |
| 32 |
builtin_define ("__INITIAL_POINTER_SIZE=32"); \ |
| 33 |
else if (flag_vms_pointer_size == VMS_POINTER_SIZE_64) \ |
| 34 |
builtin_define ("__INITIAL_POINTER_SIZE=64"); \ |
| 35 |
if (POINTER_SIZE == 64) \ |
| 36 |
builtin_define ("__LONG_POINTERS=1"); \ |
| 37 |
builtin_define_with_int_value ("__CRTL_VER", vms_c_get_crtl_ver ()); \ |
| 38 |
builtin_define_with_int_value ("__VMS_VER", vms_c_get_vms_ver ()); \ |
| 39 |
} while (0) |
| 40 |
|
| 41 |
extern void vms_c_register_includes (const char *, const char *, int); |
| 42 |
#define TARGET_EXTRA_INCLUDES vms_c_register_includes |
| 43 |
|
| 44 |
/* Tell compiler we want to support VMS pragmas */ |
| 45 |
#define REGISTER_TARGET_PRAGMAS() vms_c_register_pragma () |
| 46 |
|
| 47 |
/* By default, allow $ to be part of an identifier. */ |
| 48 |
#define DOLLARS_IN_IDENTIFIERS 2 |
| 49 |
|
| 50 |
#undef TARGET_ABI_OPEN_VMS |
| 51 |
#define TARGET_ABI_OPEN_VMS 1 |
| 52 |
|
| 53 |
/* "long" is 32 bits, but 64 bits for Ada. */ |
| 54 |
#undef LONG_TYPE_SIZE |
| 55 |
#define LONG_TYPE_SIZE 32 |
| 56 |
#define ADA_LONG_TYPE_SIZE 64 |
| 57 |
|
| 58 |
/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */ |
| 59 |
#undef POINTER_SIZE |
| 60 |
#define POINTER_SIZE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? 32 : 64) |
| 61 |
#define POINTERS_EXTEND_UNSIGNED 0 |
| 62 |
|
| 63 |
/* Always a 32 bit type. */ |
| 64 |
#undef SIZE_TYPE |
| 65 |
#define SIZE_TYPE "unsigned int" |
| 66 |
|
| 67 |
/* ???: Defined as a 'int' by dec-c, but obstack.h doesn't like it. */ |
| 68 |
#undef PTRDIFF_TYPE |
| 69 |
#define PTRDIFF_TYPE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? \ |
| 70 |
"int" : "long long int") |
| 71 |
|
| 72 |
#define SIZETYPE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? \ |
| 73 |
"unsigned int" : "long long unsigned int") |
| 74 |
|
| 75 |
#define C_COMMON_OVERRIDE_OPTIONS vms_c_common_override_options () |
| 76 |
|
| 77 |
/* VMS doesn't support other sections than .text for code. */ |
| 78 |
#define TARGET_ASM_FUNCTION_SECTION vms_function_section |
| 79 |
|
| 80 |
/* Always use 8 bytes addresses in dwarf2 debug info. The default value doesn't |
| 81 |
work as it may be 4 bytes, which won't match gas default (8 bytes for ia64), |
| 82 |
and will thus produce incorrect values. */ |
| 83 |
#define DWARF2_ADDR_SIZE 8 |
| 84 |
|
| 85 |
/* No libm on VMS. */ |
| 86 |
#define MATH_LIBRARY "" |
| 87 |
|
| 88 |
/* Special VMS debugger symbol to record the entry point. */ |
| 89 |
#define VMS_DEBUG_MAIN_POINTER "TRANSFER$BREAK$GO" |
| 90 |
|
| 91 |
#undef TARGET_LIBC_HAS_FUNCTION |
| 92 |
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function |