freebsd-spec.h (107540) | freebsd-spec.h (117420) |
---|---|
1/* Base configuration file for all FreeBSD targets. 2 Copyright (C) 1999, 2000, 2001 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) --- 4 unchanged lines hidden (view full) --- 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 | 1/* Base configuration file for all FreeBSD targets. 2 Copyright (C) 1999, 2000, 2001 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) --- 4 unchanged lines hidden (view full) --- 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/* $FreeBSD: head/contrib/gcc/config/freebsd-spec.h 107540 2002-12-03 04:31:19Z obrien $ */ | 21/* $FreeBSD: head/contrib/gcc/config/freebsd-spec.h 117420 2003-07-11 05:09:19Z kan $ */ |
22 23/* Common FreeBSD configuration. 24 All FreeBSD architectures should include this file, which will specify 25 their commonalities. 26 Adapted from gcc/config/freebsd.h by 27 David O'Brien <obrien@FreeBSD.org> 28 Loren J. Rittle <ljrittle@acm.org>. */ 29 --- 15 unchanged lines hidden (view full) --- 45/* This defines which multi-letter switches take arguments. */ 46 47#define FBSD_WORD_SWITCH_TAKES_ARG(STR) \ 48 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ 49 || !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \ 50 || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ 51 || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) 52 | 22 23/* Common FreeBSD configuration. 24 All FreeBSD architectures should include this file, which will specify 25 their commonalities. 26 Adapted from gcc/config/freebsd.h by 27 David O'Brien <obrien@FreeBSD.org> 28 Loren J. Rittle <ljrittle@acm.org>. */ 29 --- 15 unchanged lines hidden (view full) --- 45/* This defines which multi-letter switches take arguments. */ 46 47#define FBSD_WORD_SWITCH_TAKES_ARG(STR) \ 48 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ 49 || !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \ 50 || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ 51 || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) 52 |
53#define FBSD_TARGET_OS_CPP_BUILTINS() \ 54 do \ 55 { \ 56 if (FBSD_MAJOR == 6) \ 57 builtin_define ("__FreeBSD__=6"); \ 58 else if (FBSD_MAJOR == 5) \ 59 builtin_define ("__FreeBSD__=5"); \ 60 else if (FBSD_MAJOR == 4) \ 61 builtin_define ("__FreeBSD__=4"); \ 62 else if (FBSD_MAJOR == 3) \ 63 builtin_define ("__FreeBSD__=3"); \ 64 else \ 65 builtin_define ("__FreeBSD__"); \ 66 builtin_define_std ("unix"); \ 67 builtin_define ("__ELF__"); \ 68 builtin_define ("__KPRINTF_ATTRIBUTE__"); \ 69 builtin_assert ("system=unix"); \ 70 builtin_assert ("system=bsd"); \ 71 builtin_assert ("system=FreeBSD"); \ 72 FBSD_NATIVE_TARGET_OS_CPP_BUILTINS(); \ 73 FBSD_TARGET_CPU_CPP_BUILTINS(); \ 74 } \ 75 while (0) |
|
53 | 76 |
54#ifndef FREEBSD_NATIVE /* these bits are here to reduce merge diffs, but I don't want to acutally use the bits right now */ | 77/* Define the default FreeBSD-specific per-CPU hook code. */ 78#define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) |
55 | 79 |
56 57#if FBSD_MAJOR == 6 58#define FBSD_CPP_PREDEFINES \ 59 "-D__FreeBSD__=6 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" | 80#ifdef FREEBSD_NATIVE 81#define FBSD_NATIVE_TARGET_OS_CPP_BUILTINS() \ 82 do { \ 83 builtin_define_std ("__FreeBSD_cc_version=500006"); \ 84 } while (0) 85#else 86#define FBSD_NATIVE_TARGET_OS_CPP_BUILTINS() \ 87 do {} while (0) |
60#endif 61 | 88#endif 89 |
62#if FBSD_MAJOR == 5 63#define FBSD_CPP_PREDEFINES \ 64 "-D__FreeBSD__=5 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" 65#endif 66 67#if FBSD_MAJOR == 4 68#define FBSD_CPP_PREDEFINES \ 69 "-D__FreeBSD__=4 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" 70#endif 71 72#if FBSD_MAJOR == 3 73#define FBSD_CPP_PREDEFINES \ 74 "-D__FreeBSD__=3 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" 75#endif 76 77#ifndef FBSD_CPP_PREDEFINES 78#define FBSD_CPP_PREDEFINES \ 79 "-D__FreeBSD__ -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" 80#endif 81 82 83#else /* FREEBSD_NATIVE */ 84/* Place spaces around this string. We depend on string splicing to produce 85 the final CPP_PREDEFINES value. */ 86 87#define FBSD_CPP_PREDEFINES \ 88 "-D__FreeBSD__=5 -D__FreeBSD_cc_version=500005 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" 89#endif /* ! FREEBSD_NATIVE */ 90 91 | |
92/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC 93 option `-posix', and PIC issues. Try to detect support for the 94 `long long' type. Unfortunately the GCC spec parser will not allow us 95 to properly detect the "iso9899:1990" and "iso9899:199409" forms of 96 -std=c89. Because of the ':' in the -std argument. :-( I have left 97 them in the spec as a place holder in hopes someone knows a way to make 98 the detection of them work. */ 99 100#define FBSD_CPP_SPEC " \ 101 %(cpp_cpu) \ 102 %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ 103 %{!ansi:%{!std=c89:%{!std=iso9899.1990:%{!std=iso9899.199409:-D_LONGLONG}}}} \ 104 %{posix:-D_POSIX_SOURCE}" 105 106/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add 107 the magical crtbegin.o file (see crtstuff.c) which provides part 108 of the support for getting C++ file-scope static object constructed | 90/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC 91 option `-posix', and PIC issues. Try to detect support for the 92 `long long' type. Unfortunately the GCC spec parser will not allow us 93 to properly detect the "iso9899:1990" and "iso9899:199409" forms of 94 -std=c89. Because of the ':' in the -std argument. :-( I have left 95 them in the spec as a place holder in hopes someone knows a way to make 96 the detection of them work. */ 97 98#define FBSD_CPP_SPEC " \ 99 %(cpp_cpu) \ 100 %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ 101 %{!ansi:%{!std=c89:%{!std=iso9899.1990:%{!std=iso9899.199409:-D_LONGLONG}}}} \ 102 %{posix:-D_POSIX_SOURCE}" 103 104/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add 105 the magical crtbegin.o file (see crtstuff.c) which provides part 106 of the support for getting C++ file-scope static object constructed |
109 before entering `main'. */ | 107 before entering `main'. */ |
110 111#define FBSD_STARTFILE_SPEC \ 112 "%{!shared: \ 113 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ 114 %{!p:%{profile:gcrt1.o%s} \ 115 %{!profile:crt1.o%s}}}} \ 116 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" 117 --- 55 unchanged lines hidden --- | 108 109#define FBSD_STARTFILE_SPEC \ 110 "%{!shared: \ 111 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ 112 %{!p:%{profile:gcrt1.o%s} \ 113 %{!profile:crt1.o%s}}}} \ 114 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" 115 --- 55 unchanged lines hidden --- |