OSDN Git Service

* config/netbsd.h (CPP_SPEC): Remove.
[pf3gnuchains/gcc-fork.git] / gcc / config / netbsd.h
1 /* NETBSD_NATIVE is defined when gcc is integrated into the NetBSD
2    source tree so it can be configured appropriately without using
3    the GNU configure/build mechanism. */
4
5 #ifdef NETBSD_NATIVE
6
7 /* Look for the include files in the system-defined places.  */
8
9 #undef GPLUSPLUS_INCLUDE_DIR
10 #define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
11
12 #undef GCC_INCLUDE_DIR
13 #define GCC_INCLUDE_DIR "/usr/include"
14
15 #undef INCLUDE_DEFAULTS
16 #define INCLUDE_DEFAULTS                        \
17   {                                             \
18     { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },     \
19     { GCC_INCLUDE_DIR, "GCC", 0, 0 },           \
20     { 0, 0, 0, 0 }                              \
21   }
22
23 /* Under NetBSD, the normal location of the compiler back ends is the
24    /usr/libexec directory.  */
25
26 #undef STANDARD_EXEC_PREFIX
27 #define STANDARD_EXEC_PREFIX            "/usr/libexec/"
28
29 /* Under NetBSD, the normal location of the various *crt*.o files is the
30    /usr/lib directory.  */
31
32 #undef STANDARD_STARTFILE_PREFIX
33 #define STANDARD_STARTFILE_PREFIX       "/usr/lib/"
34
35 #endif /* NETBSD_NATIVE */
36
37
38 /* Provide a LIB_SPEC appropriate for NetBSD.  Just select the appropriate
39    libc, depending on whether we're doing profiling; if `-posix' is specified,
40    link against the appropriate libposix first.  Don't include libc when
41    linking a shared library.  */
42
43 #undef LIB_SPEC
44 #define LIB_SPEC                \
45   "%{posix:                     \
46      %{!p:                      \
47        %{!pg:-lposix}}          \
48      %{p:-lposix_p}             \
49      %{pg:-lposix_p}}           \
50    %{!shared:                   \
51      %{!symbolic:               \
52        %{!p:                    \
53          %{!pg:-lc}}            \
54        %{p:-lc_p}               \
55        %{pg:-lc_p}}}"
56
57 /* Provide a LIBGCC_SPEC appropriate for NetBSD.  We also want to exclude
58    libgcc with -symbolic.  */
59
60 #undef LIBGCC_SPEC
61 #ifdef NETBSD_NATIVE
62 #define LIBGCC_SPEC             \
63   "%{!symbolic:                 \
64      %{!shared:                 \
65        %{!p:                    \
66          %{!pg: -lgcc}}}                \
67      %{shared: -lgcc_pic}       \
68      %{p: -lgcc_p}              \
69      %{pg: -lgcc_p}}"
70 #else
71 #define LIBGCC_SPEC "%{!shared:%{!symbolic: -lgcc}}"
72 #endif
73
74 /* When building shared libraries, the initialization and finalization 
75    functions for the library are .init and .fini respectively.  */
76
77 #define COLLECT_SHARED_INIT_FUNC(STREAM,FUNC)                           \
78   do {                                                                  \
79     fprintf ((STREAM), "void __init() __asm__ (\".init\");");           \
80     fprintf ((STREAM), "void __init() {\n\t%s();\n}\n", (FUNC));        \
81   } while (0)
82
83 #define COLLECT_SHARED_FINI_FUNC(STREAM,FUNC)                           \
84   do {                                                                  \
85     fprintf ((STREAM), "void __fini() __asm__ (\".fini\");");           \
86     fprintf ((STREAM), "void __fini() {\n\t%s();\n}\n", (FUNC));        \
87   } while (0)
88
89 /* Allow #sccs in preprocessor.  */
90
91 #undef SCCS_DIRECTIVE
92 #define SCCS_DIRECTIVE
93
94 #undef TARGET_HAS_F_SETLKW
95 #define TARGET_HAS_F_SETLKW
96
97 /* Implicit library calls should use memcpy, not bcopy, etc.  */
98
99 #undef TARGET_MEM_FUNCTIONS
100 #define TARGET_MEM_FUNCTIONS 1
101
102 /* Handle #pragma weak and #pragma pack.  */
103
104 #define HANDLE_SYSV_PRAGMA
105
106
107 /* Define some types that are the same on all NetBSD platforms,
108    making them agree with <machine/ansi.h>.  */
109
110 #undef WCHAR_TYPE
111 #define WCHAR_TYPE "int"
112
113 #undef WCHAR_TYPE_SIZE
114 #define WCHAR_TYPE_SIZE 32
115
116 #undef WINT_TYPE
117 #define WINT_TYPE "int"