freebsd.h revision 132738
145135Sobrien/* Base configuration file for all FreeBSD targets. 295811Sobrien Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 345135Sobrien 4132738SkanThis file is part of GCC. 545135Sobrien 6132738SkanGCC is free software; you can redistribute it and/or modify 745135Sobrienit under the terms of the GNU General Public License as published by 845135Sobrienthe Free Software Foundation; either version 2, or (at your option) 945135Sobrienany later version. 1045135Sobrien 11132738SkanGCC is distributed in the hope that it will be useful, 1245135Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of 1345135SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1445135SobrienGNU General Public License for more details. 1545135Sobrien 1645135SobrienYou should have received a copy of the GNU General Public License 17132738Skanalong with GCC; see the file COPYING. If not, write to 1845135Sobrienthe Free Software Foundation, 59 Temple Place - Suite 330, 1945135SobrienBoston, MA 02111-1307, USA. */ 2045135Sobrien 2145135Sobrien/* Common FreeBSD configuration. 2245135Sobrien All FreeBSD architectures should include this file, which will specify 2345135Sobrien their commonalities. 2495811Sobrien Adapted from gcc/config/i386/freebsd-elf.h by 2595811Sobrien David O'Brien <obrien@FreeBSD.org>. 2695811Sobrien Further work by David O'Brien <obrien@FreeBSD.org> and 2795811Sobrien Loren J. Rittle <ljrittle@acm.org>. */ 2845135Sobrien 2952113Sobrien/* $FreeBSD: head/contrib/gcc/config/freebsd.h 132738 2004-07-28 04:34:05Z kan $ */ 3045135Sobrien 3195811Sobrien/* In case we need to know. */ 3295811Sobrien#define USING_CONFIG_FREEBSD 1 3352113Sobrien 3446122Sobrien/* This defines which switch letters take arguments. On FreeBSD, most of 3545135Sobrien the normal cases (defined in gcc.c) apply, and we also have -h* and 3673243Sobrien -z* options (for the linker) (coming from SVR4). 3748474Sobrien We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */ 3845135Sobrien 3958478Sobrien#undef SWITCH_TAKES_ARG 4073304Sobrien#define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR)) 4149854Sobrien 4258478Sobrien#undef WORD_SWITCH_TAKES_ARG 4373304Sobrien#define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR)) 4449854Sobrien 45117420Skan#undef TARGET_OS_CPP_BUILTINS 46117420Skan#define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS() 47117420Skan 4858478Sobrien#undef CPP_SPEC 4954807Sobrien#define CPP_SPEC FBSD_CPP_SPEC 5054807Sobrien 5195811Sobrien#undef STARTFILE_SPEC 5295811Sobrien#define STARTFILE_SPEC FBSD_STARTFILE_SPEC 5373304Sobrien 5495811Sobrien#undef ENDFILE_SPEC 5595811Sobrien#define ENDFILE_SPEC FBSD_ENDFILE_SPEC 5695811Sobrien 5758478Sobrien#undef LIB_SPEC 5895811Sobrien#define LIB_SPEC FBSD_LIB_SPEC 5945135Sobrien 6045458Sobrien 6158478Sobrien/************************[ Target stuff ]***********************************/ 6258478Sobrien 6358478Sobrien/* All FreeBSD Architectures support the ELF object file format. */ 6458478Sobrien#undef OBJECT_FORMAT_ELF 6595811Sobrien#define OBJECT_FORMAT_ELF 1 6658478Sobrien 6758478Sobrien/* Don't assume anything about the header files. */ 6858478Sobrien#undef NO_IMPLICIT_EXTERN_C 6995811Sobrien#define NO_IMPLICIT_EXTERN_C 1 7058478Sobrien 7195811Sobrien/* Make gcc agree with FreeBSD's standard headers (<machine/ansi.h>, etc...) */ 7258478Sobrien 7395811Sobrien#undef WCHAR_TYPE 74117420Skan#define WCHAR_TYPE "int" 7595811Sobrien 7695811Sobrien#ifdef FREEBSD_NATIVE 7795811Sobrien#define LIBSTDCXX_PROFILE "-lstdc++_p" 7895811Sobrien#endif 7995811Sobrien#define MATH_LIBRARY_PROFILE "-lm_p" 8095811Sobrien 8145135Sobrien/* Code generation parameters. */ 8245135Sobrien 8358478Sobrien/* Writing `int' for a bitfield forces int alignment for the structure. */ 8458478Sobrien/* XXX: ok for Alpha?? */ 8558478Sobrien#undef PCC_BITFIELD_TYPE_MATTERS 8658478Sobrien#define PCC_BITFIELD_TYPE_MATTERS 1 8758478Sobrien 8858478Sobrien/* Use periods rather than dollar signs in special g++ assembler names. 8958478Sobrien This ensures the configuration knows our system correctly so we can link 9058478Sobrien with libraries compiled with the native cc. */ 9145135Sobrien#undef NO_DOLLAR_IN_LABEL 9245135Sobrien 9395811Sobrien/* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW. 9495811Sobrien This enables the test coverage code to use file locking when exiting a 9595811Sobrien program, which avoids race conditions if the program has forked. */ 9695811Sobrien#define TARGET_HAS_F_SETLKW 1 97