Lines 63-74
Link Here
|
63 |
/* Define the default FreeBSD-specific per-CPU hook code. */ |
63 |
/* Define the default FreeBSD-specific per-CPU hook code. */ |
64 |
#define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) |
64 |
#define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) |
65 |
|
65 |
|
66 |
/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC |
66 |
/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC |
67 |
option `-posix', and PIC issues. */ |
67 |
option `-posix', and PIC issues. Try to detect support for the |
|
|
68 |
`long long' type. Unfortunately the GCC spec parser will not allow us |
69 |
to properly detect the "iso9899:1990" and "iso9899:199409" forms of |
70 |
-std=c89. Because of the ':' in the -std argument. :-( I have left |
71 |
them in the spec as a place holder in hopes someone knows a way to make |
72 |
the detection of them work. */ |
68 |
|
73 |
|
69 |
#define FBSD_CPP_SPEC " \ |
74 |
#define FBSD_CPP_SPEC " \ |
70 |
%(cpp_cpu) \ |
75 |
%(cpp_cpu) \ |
71 |
%(cpp_arch) \ |
76 |
%(cpp_arch) \ |
|
|
77 |
%{!ansi:%{!std=c89:%{!std=iso9899.1990:%{!std=iso9899.199409:-D_LONGLONG}}}} \ |
72 |
%{posix:-D_POSIX_SOURCE}" |
78 |
%{posix:-D_POSIX_SOURCE}" |
73 |
|
79 |
|
74 |
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add |
80 |
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add |
Lines 79-87
Link Here
|
79 |
#define FBSD_STARTFILE_SPEC \ |
85 |
#define FBSD_STARTFILE_SPEC \ |
80 |
"%{!shared: \ |
86 |
"%{!shared: \ |
81 |
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ |
87 |
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ |
82 |
%{!p:%{profile:gcrt1.o%s} \ |
88 |
%{!p:%{profile:gcrt1.o%s} \ |
83 |
%{!profile:crt1.o%s}}}} \ |
89 |
%{!profile:crt1.o%s}}}} \ |
84 |
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
90 |
crti.o%s \ |
|
|
91 |
%{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}" |
85 |
|
92 |
|
86 |
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on |
93 |
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on |
87 |
the magical crtend.o file (see crtstuff.c) which provides part of |
94 |
the magical crtend.o file (see crtstuff.c) which provides part of |
Lines 119-125
Link Here
|
119 |
%{pg: -lc_p} \ |
122 |
%{pg: -lc_p} \ |
120 |
}" |
123 |
}" |
121 |
#else |
124 |
#else |
122 |
#if FBSD_MAJOR < 5 |
125 |
#include <sys/param.h> |
|
|
126 |
#if __FreeBSD_version < 500016 |
123 |
#define FBSD_LIB_SPEC " \ |
127 |
#define FBSD_LIB_SPEC " \ |
124 |
%{!shared: \ |
128 |
%{!shared: \ |
125 |
%{!pg: \ |
129 |
%{!pg: \ |
Lines 129-145
Link Here
|
129 |
%{!pthread:-lc_p} \ |
133 |
%{!pthread:-lc_p} \ |
130 |
%{pthread:-lc_r_p}} \ |
134 |
%{pthread:-lc_r_p}} \ |
131 |
}" |
135 |
}" |
132 |
#else |
136 |
#elif __FreeBSD_version < 700022 |
133 |
#define FBSD_LIB_SPEC " \ |
137 |
#define FBSD_LIB_SPEC " \ |
134 |
%{!shared: \ |
138 |
%{!shared: \ |
135 |
%{!pg: %{pthread:-lpthread} -lc} \ |
139 |
%{!pg: %{pthread:-lpthread} -lc} \ |
136 |
%{pg: %{pthread:-lpthread_p} -lc_p} \ |
140 |
%{pg: %{pthread:-lpthread_p} -lc_p} \ |
137 |
}" |
141 |
}" |
|
|
142 |
#else |
143 |
#define FBSD_LIB_SPEC " \ |
144 |
%{!shared: \ |
145 |
%{!pg: %{pthread:-lpthread} -lc} \ |
146 |
%{pg: %{pthread:-lpthread_p} -lc_p}} \ |
147 |
%{shared: \ |
148 |
%{pthread:-lpthread} -lc} \ |
149 |
" |
138 |
#endif |
150 |
#endif |
139 |
#endif |
151 |
#endif |
140 |
|
152 |
|
141 |
#if FBSD_MAJOR < 6 |
153 |
#if FBSD_MAJOR < 5 |
142 |
#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" |
154 |
#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" |
143 |
#else |
155 |
#else |
144 |
#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1" |
156 |
#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1" |
145 |
#endif |
157 |
#endif |
|
|
158 |
|
159 |
#if defined(HAVE_LD_EH_FRAME_HDR) |
160 |
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " |
161 |
#endif |
162 |
|
163 |
/* Use --as-needed -lgcc_s for eh support. */ |
164 |
#ifdef HAVE_LD_AS_NEEDED |
165 |
#define USE_LD_AS_NEEDED 1 |
166 |
#endif |