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