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