* config/netbsd.h (TARGET_HAS_F_SETLKW): define.
[official-gcc.git] / gcc / config / netbsd.h
blob5894174791e56b6cd624bfa3a49cd6b1800e2fc9
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. */
5 #ifdef NETBSD_NATIVE
7 /* Look for the include files in the system-defined places. */
9 #undef GPLUSPLUS_INCLUDE_DIR
10 #define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
12 #undef GCC_INCLUDE_DIR
13 #define GCC_INCLUDE_DIR "/usr/include"
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 } \
23 /* Under NetBSD, the normal location of the compiler back ends is the
24 /usr/libexec directory. */
26 #undef STANDARD_EXEC_PREFIX
27 #define STANDARD_EXEC_PREFIX "/usr/libexec/"
29 /* Under NetBSD, the normal location of the various *crt*.o files is the
30 /usr/lib directory. */
32 #undef STANDARD_STARTFILE_PREFIX
33 #define STANDARD_STARTFILE_PREFIX "/usr/lib/"
35 #endif /* NETBSD_NATIVE */
38 /* Provide a CPP_SPEC appropriate for NetBSD. Currently we just deal with
39 the GCC option `-posix'. */
41 #undef CPP_SPEC
42 #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
45 /* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate
46 libc, depending on whether we're doing profiling; if `-posix' is specified,
47 link against the appropriate libposix first. Don't include libc when
48 linking a shared library. */
50 #undef LIB_SPEC
51 #define LIB_SPEC \
52 "%{posix: \
53 %{!p: \
54 %{!pg:-lposix}} \
55 %{p:-lposix_p} \
56 %{pg:-lposix_p}} \
57 %{!shared: \
58 %{!symbolic: \
59 %{!p: \
60 %{!pg:-lc}} \
61 %{p:-lc_p} \
62 %{pg:-lc_p}}}"
64 /* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
65 libgcc with -symbolic. */
67 #undef LIBGCC_SPEC
68 #ifdef NETBSD_NATIVE
69 #define LIBGCC_SPEC \
70 "%{!symbolic: \
71 %{!shared: \
72 %{!p: \
73 %{!pg:-lgcc}}} \
74 %{shared:-lgcc_pic} \
75 %{p:-lgcc_p} \
76 %{pg:-lgcc_p}}"
77 #else
78 #define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}"
79 #endif
81 /* When building shared libraries, the initialization and finalization
82 functions for the library are .init and .fini respectively. */
84 #define COLLECT_SHARED_INIT_FUNC(STREAM,FUNC) \
85 do { \
86 fprintf ((STREAM), "void __init() __asm__ (\".init\");"); \
87 fprintf ((STREAM), "void __init() {\n\t%s();\n}\n", (FUNC)); \
88 } while (0)
90 #define COLLECT_SHARED_FINI_FUNC(STREAM,FUNC) \
91 do { \
92 fprintf ((STREAM), "void __fini() __asm__ (\".fini\");"); \
93 fprintf ((STREAM), "void __fini() {\n\t%s();\n}\n", (FUNC)); \
94 } while (0)
96 /* Allow #sccs in preprocessor. */
98 #undef SCCS_DIRECTIVE
99 #define SCCS_DIRECTIVE
101 #undef TARGET_HAS_F_SETLKW
102 #define TARGET_HAS_F_SETLKW
104 /* Implicit library calls should use memcpy, not bcopy, etc. */
106 #undef TARGET_MEM_FUNCTIONS
107 #define TARGET_MEM_FUNCTIONS 1
109 /* Handle #pragma weak and #pragma pack. */
111 #define HANDLE_SYSV_PRAGMA