Merge from vendor branch DIFFUTILS:
[dragonfly.git] / gnu / usr.bin / cc3 / cc_tools / dragonfly-native.h
1 /*
2  * $FreeBSD: src/gnu/usr.bin/cc/cc_tools/freebsd-native.h,v 1.23 2003/07/11 05:33:24 kan Exp $
3  * $DragonFly: src/gnu/usr.bin/cc3/cc_tools/Attic/dragonfly-native.h,v 1.6 2004/04/07 14:02:41 joerg Exp $
4  */
5
6 /* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD
7    source tree so it can be configured appropriately without using
8    the GNU configure/build mechanism. */
9
10 #define FREEBSD_NATIVE 1
11
12 /* Fake out gcc/config/freebsd<version>.h.  */
13 #define FBSD_MAJOR 4
14
15 #undef SYSTEM_INCLUDE_DIR               /* We don't need one for now. */
16 #undef TOOL_INCLUDE_DIR                 /* We don't need one for now. */
17 #undef LOCAL_INCLUDE_DIR                /* We don't wish to support one. */
18
19 /* Look for the include files in the system-defined places.  */
20 #define GPLUSPLUS_INCLUDE_DIR           PREFIX2"/include/c++"
21 #define GPLUSPLUS_TOOL_INCLUDE_DIR      PREFIX2"/include/c++/3.3"
22 #define GPLUSPLUS_BACKWARD_INCLUDE_DIR  PREFIX2"/include/c++/3.3/backward"
23 #define GCC_INCLUDE_DIR                 PREFIX2"/include"
24 #ifdef CROSS_COMPILE
25 #define CROSS_INCLUDE_DIR               PREFIX2"/include"
26 #else
27 #define STANDARD_INCLUDE_DIR            PREFIX2"/include"
28 #endif
29
30 /* Under FreeBSD, the normal location of the compiler back ends is the
31    /usr/libexec directory.
32
33    ``cc --print-search-dirs'' gives:
34    install: STANDARD_EXEC_PREFIX/(null)
35    programs: /usr/libexec/<OBJFORMAT>/:STANDARD_EXEC_PREFIX:MD_EXEC_PREFIX
36    libraries: MD_EXEC_PREFIX:MD_STARTFILE_PREFIX:STANDARD_STARTFILE_PREFIX
37 */
38 #undef  TOOLDIR_BASE_PREFIX             /* Old??  This is not documented. */
39 #undef  STANDARD_BINDIR_PREFIX          /* We don't need one for now. */
40 #define STANDARD_EXEC_PREFIX            PREFIX1"/libexec/gcc3/"
41 #define MD_EXEC_PREFIX                  PREFIX1"/libexec/gcc3/"
42 #define FBSD_DATA_PREFIX                PREFIX1"/libdata/gcc/"
43
44 /*
45  * XXX at the moment crt1.o, crti.o, and crtn.o are generated from
46  * /usr/lib/libcsu and placed in /usr/lib.  crtbegin* and crtend* are
47  * generated from the gcc dist and placed in /usr/lib/cc3.
48  *
49  */
50 /* Under FreeBSD, the normal location of the various *crt*.o files is the
51    /usr/lib directory.  */
52
53 #define STANDARD_STARTFILE_PREFIX       PREFIX2"/lib/"
54 #define STANDARD_STARTFILE_PREFIX_1     PREFIX2"/lib/gcc3/"
55 #undef MD_STARTFILE_PREFIX
56
57 /* For the native system compiler, we actually build libgcc in a profiled
58    version.  So we should use it with -pg.  */
59 #define LIBGCC_SPEC             "%{shared: -lgcc_pic} \
60     %{!shared: %{!pg: -lgcc} %{pg: -lgcc_p}}"
61 #define LIBSTDCXX_PROFILE       "-lstdc++_p"
62 #define MATH_LIBRARY_PROFILE    "-lm_p"
63 #define FORTRAN_LIBRARY_PROFILE "-lg2c_p"
64
65 /* FreeBSD is 4.4BSD derived */
66 #define bsd4_4
67
68 /*
69  * Dike out [stupid, IMHO] libiberty functions.  This is a real mess
70  * because gcc's system.h define's malloc->xmalloc etc if certain defines
71  * exist, and some of the lexer files also redefine malloc and realloc,
72  * so don't even try to fix it if we're coming from a parser.
73  */
74 #if !defined(FLEX_SCANNER) && !defined(YYBISON) && !defined(YYBYACC)
75 #if 0
76 #define xmalloc_set_program_name(dummy)
77 #define xmalloc         malloc
78 #define xcalloc         calloc
79 #define xrealloc        realloc
80 #endif
81 #endif
82 #define xstrdup         strdup
83 #define xstrerror       strerror
84
85 /* And now they want to replace ctype.h.... grr... [stupid, IMHO] */
86 #define xxxISDIGIT      isdigit
87 #define xxxISGRAPH      isgraph
88 #define xxxISLOWER      islower
89 #define xxxISSPACE      isspace
90 #define xxxTOUPPER      toupper