freebsd.h revision 45253
1234353Sdim/* Base configuration file for all FreeBSD targets. 2193323Sed Copyright (C) 1999 Free Software Foundation, Inc. 3193323Sed 4193323SedThis file is part of GNU CC. 5193323Sed 6193323SedGNU CC is free software; you can redistribute it and/or modify 7193323Sedit under the terms of the GNU General Public License as published by 8193323Sedthe Free Software Foundation; either version 2, or (at your option) 9193323Sedany later version. 10223017Sdim 11193323SedGNU CC is distributed in the hope that it will be useful, 12193323Sedbut WITHOUT ANY WARRANTY; without even the implied warranty of 13193323SedMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14193323SedGNU General Public License for more details. 15193323Sed 16193323SedYou should have received a copy of the GNU General Public License 17193323Sedalong with GNU CC; see the file COPYING. If not, write to 18193323Sedthe Free Software Foundation, 59 Temple Place - Suite 330, 19193323SedBoston, MA 02111-1307, USA. */ 20193323Sed 21193323Sed/* Common FreeBSD configuration. 22193323Sed All FreeBSD architectures should include this file, which will specify 23193323Sed their commonalities. 24193323Sed Adapted from /usr/src/contrib/gcc/config/i386/freebsd.h & 25193323Sed egcs/gcc/config/i386/freebsd-elf.h version by David O'Brien */ 26193323Sed 27221345Sdim 28221345Sdim/* Don't assume anything about the header files. */ 29221345Sdim#define NO_IMPLICIT_EXTERN_C 30226633Sdim 31221345Sdim/* This defines which switch letters take arguments. On svr4, most of 32221345Sdim the normal cases (defined in gcc.c) apply, and we also have -h* and 33221345Sdim -z* options (for the linker). We have a slightly different mix. We 34221345Sdim have -R (alias --rpath), no -z, --soname (-h), --assert etc. */ 35221345Sdim 36221345Sdim#undef SWITCH_TAKES_ARG 37221345Sdim#define SWITCH_TAKES_ARG(CHAR) \ 38226633Sdim ( (CHAR) == 'D' \ 39193323Sed || (CHAR) == 'U' \ 40221345Sdim || (CHAR) == 'o' \ 41221345Sdim || (CHAR) == 'e' \ 42221345Sdim || (CHAR) == 'T' \ 43221345Sdim || (CHAR) == 'u' \ 44221345Sdim || (CHAR) == 'I' \ 45221345Sdim || (CHAR) == 'm' \ 46221345Sdim || (CHAR) == 'x' \ 47221345Sdim || (CHAR) == 'L' \ 48193323Sed || (CHAR) == 'A' \ 49193323Sed || (CHAR) == 'V' \ 50234982Sdim || (CHAR) == 'B' \ 51193323Sed || (CHAR) == 'b' \ 52193323Sed || (CHAR) == 'h' \ 53193323Sed || (CHAR) == 'z' /* ignored by ld */ \ 54193323Sed || (CHAR) == 'R') 55193323Sed 56193323Sed#undef WORD_SWITCH_TAKES_ARG 57239462Sdim#define WORD_SWITCH_TAKES_ARG(STR) \ 58239462Sdim (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ 59239462Sdim || !strcmp (STR, "rpath") || !strcmp (STR, "rpath-link") \ 60239462Sdim || !strcmp (STR, "soname") || !strcmp (STR, "defsym") \ 61239462Sdim || !strcmp (STR, "assert") || !strcmp (STR, "dynamic-linker")) 62239462Sdim 63239462Sdim 64239462Sdim#define CPP_FBSD_PREDEFINES "-Dunix -D__ELF__ -D__FreeBSD__=4 -D__FreeBSD_cc_version=400002 -Asystem(unix) -Asystem(FreeBSD)" 65193323Sed 66234353Sdim 67234353Sdim/* Code generation parameters. */ 68234353Sdim 69234353Sdim/* Don't default to pcc-struct-return, because gcc is the only compiler, and 70234353Sdim we want to retain compatibility with older gcc versions. 71234353Sdim (even though the svr4 ABI for the i386 says that records and unions are 72234353Sdim returned in memory) */ 73234353Sdim#define DEFAULT_PCC_STRUCT_RETURN 0 74234353Sdim 75193323Sed/* Ensure we the configuration knows our system correctly so we can link with 76193323Sed libraries compiled with the native cc. */ 77193323Sed#undef NO_DOLLAR_IN_LABEL 78221345Sdim 79193323Sed 80193323Sed/* Miscellaneous parameters. */ 81193323Sed 82193323Sed/* Tell libgcc2.c that FreeBSD targets support atexit(3). */ 83193323Sed#define HAVE_ATEXIT 84193323Sed 85193323Sed 86193323Sed/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD 87193323Sed source tree so it can be configured appropriately without using 88193323Sed the GNU configure/build mechanism. */ 89226633Sdim 90234982Sdim#ifdef FREEBSD_NATIVE 91234353Sdim 92228379Sdim/* Look for the include files in the system-defined places. */ 93234353Sdim 94228379Sdim#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++" 95193323Sed#define GCC_INCLUDE_DIR "/usr/include" 96226633Sdim 97234353Sdim/* Now that GCC knows what the include path applies to, put the G++ one first. 98228379Sdim C++ can now have include files that override the default C ones. */ 99234353Sdim#define INCLUDE_DEFAULTS \ 100228379Sdim { \ 101234982Sdim { GPLUSPLUS_INCLUDE_DIR, "C++", 1, 1 }, \ 102234353Sdim { GCC_INCLUDE_DIR, "GCC", 0, 0 }, \ 103234353Sdim { 0, 0, 0, 0 } \ 104239462Sdim } 105234353Sdim 106234353Sdim/* Under FreeBSD, the normal location of the compiler back ends is the 107234353Sdim /usr/libexec directory. */ 108234353Sdim 109234353Sdim#define STANDARD_EXEC_PREFIX "/usr/libexec/" 110234353Sdim#define TOOLDIR_BASE_PREFIX "/usr/libexec/" 111234353Sdim 112234353Sdim/* Under FreeBSD, the normal location of the various *crt*.o files is the 113239462Sdim /usr/lib directory. */ 114234353Sdim 115234353Sdim#define STANDARD_STARTFILE_PREFIX "/usr/lib/" 116234353Sdim 117234353Sdim/* FreeBSD is 4.4BSD derived */ 118234353Sdim#define bsd4_4 119234353Sdim 120226633Sdim#endif /* FREEBSD_NATIVE */ 121226633Sdim