freebsd.h revision 53179
1/* Base configuration file for all FreeBSD targets. 2 Copyright (C) 1999 Free Software Foundation, Inc. 3 4This file is part of GNU CC. 5 6GNU CC is free software; you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation; either version 2, or (at your option) 9any later version. 10 11GNU CC is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with GNU CC; see the file COPYING. If not, write to 18the Free Software Foundation, 59 Temple Place - Suite 330, 19Boston, MA 02111-1307, USA. */ 20 21/* Common FreeBSD configuration. 22 All FreeBSD architectures should include this file, which will specify 23 their commonalities. 24 Adapted from /usr/src/contrib/gcc/config/i386/freebsd.h & 25 egcs/gcc/config/i386/freebsd-elf.h version by David O'Brien */ 26 27/* $FreeBSD: head/contrib/gcc/config/freebsd.h 53179 1999-11-15 07:57:13Z obrien $ */ 28 29 30/* Don't assume anything about the header files. */ 31#undef NO_IMPLICIT_EXTERN_C 32#define NO_IMPLICIT_EXTERN_C 33 34/* This defines which switch letters take arguments. On FreeBSD, most of 35 the normal cases (defined in gcc.c) apply, and we also have -h* and 36 -z* options (for the linker) (comming from svr4). 37 We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */ 38 39#define FBSD_SWITCH_TAKES_ARG(CHAR) \ 40 (DEFAULT_SWITCH_TAKES_ARG (CHAR) \ 41 || (CHAR) == 'h' \ 42 || (CHAR) == 'z' /* ignored by ld */ \ 43 || (CHAR) == 'R') 44 45#undef SWITCH_TAKES_ARG 46#define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR)) 47 48#define FBSD_WORD_SWITCH_TAKES_ARG(STR) \ 49 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ 50 || !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \ 51 || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ 52 || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) 53 54#undef WORD_SWITCH_TAKES_ARG 55#define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR)) 56 57/* Place spaces around this string. We depend on string splicing to produce 58 the final CPP_PREDEFINES value. */ 59#define CPP_FBSD_PREDEFINES " -Dunix -D__FreeBSD__=4 -D__FreeBSD_cc_version=400003 -Asystem(unix) -Asystem(FreeBSD) " 60 61/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate 62 libc, depending on whether we're doing profiling. 63 (like the default, except no -lg, and no -p). */ 64#undef LIB_SPEC 65#define LIB_SPEC "%{!shared:%{!pg:%{!pthread:%{!kthread:-lc}%{kthread:-lpthread -lc}}%{pthread:-lc_r}}%{pg:%{!pthread:%{!kthread:-lc_p}%{kthread:-lpthread_p -lc_p}}%{pthread:-lc_r_p}}}" 66 67 68/* Code generation parameters. */ 69 70/* Don't default to pcc-struct-return, because gcc is the only compiler, and 71 we want to retain compatibility with older gcc versions 72 (even though the svr4 ABI for the i386 says that records and unions are 73 returned in memory). */ 74#undef DEFAULT_PCC_STRUCT_RETURN 75#define DEFAULT_PCC_STRUCT_RETURN 0 76 77/* Ensure we the configuration knows our system correctly so we can link with 78 libraries compiled with the native cc. */ 79#undef NO_DOLLAR_IN_LABEL 80 81/* Use more efficient ``thunks'' to implement C++ vtables. XXX note that 82 this setting is claimed to have a few bugs by the EGCS maintainers. They 83 believe the bugs will be worked out in EGCS 1.2. */ 84#undef DEFAULT_VTABLE_THUNKS 85#define DEFAULT_VTABLE_THUNKS 1 86 87/* This is BSD, so we want the DBX format. */ 88#define DBX_DEBUGGING_INFO 89 90/* Use stabs instead of DWARF debug format. */ 91#undef PREFERRED_DEBUGGING_TYPE 92#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG 93 94 95/* Miscellaneous parameters. */ 96 97/* Tell libgcc2.c that FreeBSD targets support atexit(3). */ 98#define HAVE_ATEXIT 99