1 /* Base configuration file for all MINIX targets. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 3 4 This file is part of GCC. 5 6 GCC is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GCC is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GCC; see the file COPYING. If not, write to 18 the Free Software Foundation, 51 Franklin Street, Fifth Floor, 19 Boston, MA 02110-1301, USA. */ 20 21 /* Common MINIX configuration. 22 * This file maps GCC defines to MINIX defines 23 * 24 * For this to work properly, the order in the tm_file variable has 25 * to be the following: 26 * minix-spec.h $arch/minix.h minix.h 27 * 28 * minix-spec.h : specifies default arch-independent values 29 * $arch/minix.h: redefines as needed default minix values 30 * minix.h : maps GCC defines to the minix defines. 31 */ 32 33 /* In case we need to know. */ 34 #define USING_CONFIG_MINIX 1 35 36 #undef TARGET_OS_CPP_BUILTINS 37 #define TARGET_OS_CPP_BUILTINS() MINIX_TARGET_OS_CPP_BUILTINS() 38 39 #if defined(NETBSD_NATIVE) || defined(NETBSD_TOOLS) 40 #undef GPLUSPLUS_INCLUDE_DIR 41 #define GPLUSPLUS_INCLUDE_DIR MINIX_GPLUSPLUS_INCLUDE_DIR 42 43 #undef GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT 44 #define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT MINIX_GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT 45 46 #undef GPLUSPLUS_BACKWARD_INCLUDE_DIR 47 #define GPLUSPLUS_BACKWARD_INCLUDE_DIR MINIX_GPLUSPLUS_BACKWARD_INCLUDE_DIR 48 49 #undef GCC_INCLUDE_DIR 50 #define GCC_INCLUDE_DIR MINIX_GCC_INCLUDE_DIR 51 52 #undef GCC_INCLUDE_DIR_ADD_SYSROOT 53 #define GCC_INCLUDE_DIR_ADD_SYSROOT MINIX_GCC_INCLUDE_DIR_ADD_SYSROOT 54 55 #undef STANDARD_STARTFILE_PREFIX 56 #define STANDARD_STARTFILE_PREFIX MINIX_STANDARD_STARTFILE_PREFIX 57 58 #undef STANDARD_STARTFILE_PREFIX_1 59 #define STANDARD_STARTFILE_PREFIX_1 MINIX_STANDARD_STARTFILE_PREFIX 60 61 #endif /* defined(NETBSD_NATIVE) || defined(NETBSD_TOOLS) */ 62 63 #if defined(NETBSD_NATIVE) 64 /* Under NetBSD, the normal location of the compiler back ends is the 65 /usr/libexec directory. */ 66 67 #undef STANDARD_EXEC_PREFIX 68 #define STANDARD_EXEC_PREFIX MINIX_STANDARD_EXEC_PREFIX 69 70 #undef TOOLDIR_BASE_PREFIX 71 #define TOOLDIR_BASE_PREFIX MINIX_TOOLDIR_BASE_PREFIX 72 73 #undef STANDARD_BINDIR_PREFIX 74 #define STANDARD_BINDIR_PREFIX MINIX_STANDARD_BINDIR_PREFIX 75 76 #undef STANDARD_LIBEXEC_PREFIX 77 #define STANDARD_LIBEXEC_PREFIX MINIX_STANDARD_EXEC_PREFIX 78 79 #endif /* NETBSD_NATIVE */ 80 81 #undef CPP_SPEC 82 #define CPP_SPEC MINIX_CPP_SPEC 83 84 #undef CC1_SPEC 85 #define CC1_SPEC MINIX_CC1_SPEC 86 87 #undef CC1PLUS_SPEC 88 #define CC1PLUS_SPEC MINIX_CC1PLUS_SPEC 89 90 #undef STARTFILE_SPEC 91 #define STARTFILE_SPEC MINIX_STARTFILE_SPEC 92 93 #undef ENDFILE_SPEC 94 #define ENDFILE_SPEC MINIX_ENDFILE_SPEC 95 96 #undef LIB_SPEC 97 #define LIB_SPEC MINIX_LIB_SPEC 98 99 #undef LINK_SPEC 100 #define LINK_SPEC MINIX_LINK_SPEC 101 102 #undef LINK_GCC_C_SEQUENCE_SPEC 103 #define LINK_GCC_C_SEQUENCE_SPEC MINIX_LINK_GCC_C_SEQUENCE_SPEC 104 105 /* This has to be here in order to allow architecture to define the default 106 * content of the additional specs. */ 107 #undef SUBTARGET_EXTRA_SPECS 108 #define SUBTARGET_EXTRA_SPECS \ 109 { "subtarget_extra_asm_spec", MINIX_SUBTARGET_EXTRA_ASM_SPEC }, \ 110 { "subtarget_asm_float_spec", MINIX_SUBTARGET_ASM_FLOAT_SPEC }, \ 111 { "minix_dynamic_linker", MINIX_DYNAMIC_LINKER } 112 113 #undef SUBTARGET_CPP_SPEC 114 #define SUBTARGET_CPP_SPEC MINIX_SUBTARGET_CPP_SPEC 115 116 /* All MINIX Architectures support the ELF object file format. */ 117 #undef OBJECT_FORMAT_ELF 118 #define OBJECT_FORMAT_ELF 119 120 #undef TARGET_UNWIND_TABLES_DEFAULT 121 #define TARGET_UNWIND_TABLES_DEFAULT MINIX_TARGET_UNWIND_TABLES_DEFAULT 122 123 /* Use periods rather than dollar signs in special g++ assembler names. 124 This ensures the configuration knows our system correctly so we can link 125 with libraries compiled with the native cc. */ 126 #undef NO_DOLLAR_IN_LABEL 127 128 /* We always use gas here, so we don't worry about ECOFF assembler 129 problems. */ 130 #undef TARGET_GAS 131 #define TARGET_GAS 1 132 133 /* Default to pcc-struct-return, because this is the ELF abi and 134 we don't care about compatibility with older gcc versions. */ 135 #undef DEFAULT_PCC_STRUCT_RETURN 136 #define DEFAULT_PCC_STRUCT_RETURN 1 137 138 /* When building shared libraries, the initialization and finalization 139 functions for the library are .init and .fini respectively. */ 140 141 #define COLLECT_SHARED_INIT_FUNC(STREAM,FUNC) \ 142 do { \ 143 fprintf ((STREAM), "void __init() __asm__ (\".init\");"); \ 144 fprintf ((STREAM), "void __init() {\n\t%s();\n}\n", (FUNC)); \ 145 } while (0) 146 147 #define COLLECT_SHARED_FINI_FUNC(STREAM,FUNC) \ 148 do { \ 149 fprintf ((STREAM), "void __fini() __asm__ (\".fini\");"); \ 150 fprintf ((STREAM), "void __fini() {\n\t%s();\n}\n", (FUNC)); \ 151 } while (0) 152 153 #undef TARGET_POSIX_IO 154 #define TARGET_POSIX_IO 155 156 /* Don't assume anything about the header files. */ 157 #undef NO_IMPLICIT_EXTERN_C 158 #define NO_IMPLICIT_EXTERN_C 1 159 160 /* Define some types that are the same on all NetBSD platforms, 161 making them agree with <machine/ansi.h>. */ 162 163 #undef WCHAR_TYPE 164 #define WCHAR_TYPE "int" 165 166 #undef WCHAR_TYPE_SIZE 167 #define WCHAR_TYPE_SIZE 32 168 169 #undef WINT_TYPE 170 #define WINT_TYPE "int" 171 172 #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " 173 174 /* Use --as-needed -lgcc_s for eh support. */ 175 #ifdef HAVE_LD_AS_NEEDED 176 #define USE_LD_AS_NEEDED 1 177 #endif 178