linux/bootstrap: use Forbid/Permit only when thread is main AROS thread
[AROS.git] / compiler / stdc / mmakefile.src
blob1cb2af6e9db860d1ce2926993891dfbe5693a17d
1 include $(TOP)/config/make.cfg
3 #MM- AROS : compiler-stdc compiler-stdcio
5 STDC := \
6     __ctype \
7     __exitfunc \
8     __optionallibs \
9     __signal \
10     __stdc_assert \
11     __stdc_gmtoffset \
12     __stdc_ioerr2errno \
13     __stdc_startup \
14     __vcformat \
15     __vcscan \
16     _exit \
17     abort \
18     abs labs llabs \
19     asctime asctime_r \
20     atexit \
21     atof \
22     atoi \
23     atol \
24     bsearch \
25     calloc \
26     clock \
27     ctime ctime_r \
28     difftime \
29     div ldiv lldiv \
30     exit \
31     fenv _fenv \
32     free \
33     getc \
34     gmtime gmtime_r \
35     localeconv \
36     localtime localtime_r \
37     longjmp \
38     malloc \
39     malloc_align \
40     math/e_acos  math/e_acosf \
41     math/e_acosh  math/e_acoshf \
42     math/e_asin  math/e_asinf \
43     math/e_atan2  math/e_atan2f \
44     math/e_atanh  math/e_atanhf \
45     math/e_cosh  math/e_coshf \
46     math/e_exp  math/e_expf \
47     math/e_fmod  math/e_fmodf \
48     math/e_gamma  math/e_gammaf  math/e_gamma_r  math/e_gammaf_r \
49     math/e_hypot  math/e_hypotf \
50     math/e_j0  math/e_j0f \
51     math/e_j1  math/e_j1f \
52     math/e_jn  math/e_jnf \
53     math/e_lgamma  math/e_lgammaf  math/e_lgamma_r  math/e_lgammaf_r \
54     math/e_log  math/e_logf \
55     math/e_log2  math/e_log2f \
56     math/e_log10  math/e_log10f \
57     math/e_pow  math/e_powf \
58     math/e_rem_pio2  math/e_rem_pio2f \
59     math/e_remainder  math/e_remainderf \
60     math/e_scalb  math/e_scalbf \
61     math/e_sinh  math/e_sinhf \
62     math/e_sqrt  math/e_sqrtf \
63     math/k_cos  math/k_cosf \
64     math/k_rem_pio2  math/k_rem_pio2f \
65     math/k_sin  math/k_sinf \
66     math/k_tan  math/k_tanf \
67     math/nan \
68     math/s_asinh  math/s_asinhf \
69     math/s_atan  math/s_atanf \
70     math/s_cbrt  math/s_cbrtf \
71     math/s_ceil  math/s_ceilf  math/s_ceill \
72     math/s_cimag  math/s_cimagf  math/s_cimagl \
73     math/s_conj  math/s_conjf  math/s_conjl \
74     math/s_copysign  math/s_copysignf  math/s_copysignl \
75     math/s_cos  math/s_cosf \
76     math/s_creal  math/s_crealf  math/s_creall \
77     math/s_erf  math/s_erff \
78     math/s_exp2  math/s_exp2f \
79     math/s_expm1  math/s_expm1f \
80     math/s_fabs  math/s_fabsf  math/s_fabsl \
81     math/s_fdim \
82     math/s_floor  math/s_floorf  math/s_floorl \
83     math/s_fma  math/s_fmaf  \
84     math/s_fmax  math/s_fmaxf  math/s_fmaxl \
85     math/s_fmin  math/s_fminf  math/s_fminl \
86     math/s_frexp  math/s_frexpf  \
87     math/s_ilogb  math/s_ilogbf  math/s_ilogbl \
88     math/s_isfinite \
89     math/s_isinf  math/s_isinff \
90     math/s_isnan \
91     math/s_isnormal \
92     math/s_log1p  math/s_log1pf \
93     math/s_logb  math/s_logbf \
94     math/s_modf  math/s_modff  math/s_modfl \
95     math/s_nearbyint \
96     math/s_nextafter  math/s_nextafterf  \
97     math/s_nexttowardf \
98     math/s_remquo  math/s_remquof \
99     math/s_rint  math/s_rintf  math/s_lrint  math/s_lrintf  math/s_llrint  math/s_llrintf \
100     math/s_round  math/s_roundf  math/s_roundl  math/s_lround  math/s_lroundf  math/s_lroundl \
101         math/s_llround  math/s_llroundf  math/s_llroundl \
102     math/s_scalbln \
103     math/s_scalbn  math/s_scalbnf  \
104     math/s_signbit \
105     math/s_significand  math/s_significandf \
106     math/s_sin  math/s_sinf \
107     math/s_tan  math/s_tanf \
108     math/s_tanh  math/s_tanhf \
109     math/s_trunc  math/s_truncf  math/s_truncl \
110     math/sincos  math/sincosf  math/sincosl \
111     math/w_cabs  math/w_cabsf \
112     mblen \
113     memchr \
114     memcmp \
115     memcpy \
116     memmove \
117     memset \
118     mktime \
119     on_exit \
120     putc \
121     qsort \
122     raise \
123     rand \
124     realloc \
125     realloc_nocopy \
126     setjmp \
127     setlocale \
128     signal \
129     snprintf \
130     sprintf \
131     sscanf \
132     stccpy \
133     stcd_l \
134     stch_l \
135     stcl_d \
136     stcl_h \
137     stcl_o \
138     stco_l \
139     stcu_d \
140     stpblk \
141     stpcpy \
142     stpsym \
143     strcasecmp \
144     strcat \
145     strchr \
146     strcmp \
147     strcoll \
148     strcpy \
149     strcspn \
150     strdup \
151     strerror \
152     strftime \
153     strlcat \
154     strlcpy \
155     strlen \
156     strnlen \
157     strlwr \
158     strncasecmp \
159     strncat \
160     strncmp \
161     strncpy \
162     strndup \
163     strpbrk \
164     strrchr \
165     strrev \
166     strsep \
167     strspn \
168     strstr \
169     strtod \
170     strtold \
171     strtoimax \
172     strtok \
173     strtok_r \
174     strtol \
175     strtoll \
176     strtoul \
177     strtoull \
178     strtoumax \
179     strupr \
180     strxfrm \
181     time \
182     vsnprintf \
183     vsprintf \
184     vsscanf
186 # If long double != double use these; otherwise, we alias the double versions
187 # These are architectures that have LDBL_MANT_DIG == 53 in float.h
188 # XXX use configure to determine this
189 ifneq ($(AROS_TARGET_CPU), ppc)
190 ifneq ($(AROS_TARGET_CPU), arm)
191 STDC += math/s_fmal math/s_frexpl math/s_nextafterl math/s_nexttoward math/s_scalbnl
192 endif
193 endif
195 STDC_LINKLIB := \
196     __ctype_linklib \
197     strcasestr
199 # The common files will be put both in the shared and in the static link lib
200 STDC_COMMON := \
201     __stdc_geterrnoptr \
202     __stdc_getsigngamptr \
203     __stdc_mb_cur_max \
204     math/infinity
206 STDCIO := \
207     __stdcio_assert \
208     __stdcio_init \
209     __stdio \
210     clearerr \
211     fclose \
212     feof \
213     ferror \
214     fflush \
215     fgetc \
216     fgetpos \
217     fgets \
218     fopen \
219     fprintf \
220     fputc \
221     fputs \
222     fread \
223     freopen \
224     fscanf \
225     fseek \
226     fsetpos \
227     ftell \
228     fwrite \
229     getchar \
230     getenv \
231     gets \
232     printf \
233     putchar \
234     puts \
235     remove \
236     rename \
237     rewind \
238     scanf \
239     setbuf \
240     setvbuf \
241     system \
242     tmpfile \
243     tmpnam \
244     ungetc \
245     vfprintf \
246     vfscanf \
247     vprintf \
248     vscanf
250 # The common files will be put both in the shared and in the static link lib
251 STDCIO_COMMON := \
252     __stdcio_stdstreams
254 #MM- core-linklibs : linklibs-stdc linklibs-stdcio linklibs-libm
256 STDC_LINKOBJS := $(addsuffix .o,$(addprefix $(GENDIR)/$(CURDIR)/,$(notdir $(STDC_COMMON))))
258 USER_CFLAGS := -noposixc -Dlint '-D__FBSDID(x)='
259 USER_LDFLAGS := -nostdc -noposixc
261 # Ugh. These are for the math routines, which have a number of
262 # lint issues.
263 USER_CFLAGS += -Wno-unused-variable -Wno-parentheses -Wno-uninitialized
265 %build_module mmake=compiler-stdc \
266     modname=stdc modtype=library \
267     files="$(STDC) $(STDC_COMMON)" \
268     linklibfiles=$(STDC_LINKLIB) linklibobjs=$(STDC_LINKOBJS)
270 STDCIO_LINKOBJS := $(addsuffix .o,$(addprefix $(GENDIR)/$(CURDIR)/,$(notdir $(STDCIO_COMMON))))
272 %build_module mmake=compiler-stdcio \
273     modname=stdcio modtype=library \
274     files="$(STDCIO) $(STDCIO_COMMON)" \
275     linklibobjs=$(STDCIO_LINKOBJS) \
276     uselibs="stdc_rel"
278 STDC_STATIC := \
279     __ctype \
280     __vcformat \
281     __vcscan \
282     atoi \
283     atol \
284     bsearch \
285     math/s_copysign  math/s_copysignf  math/s_copysignl \
286     math/e_log  math/e_logf \
287     math/e_log2  math/e_log2f \
288     math/e_log10  math/e_log10f \
289     math/e_pow  math/e_powf \
290     math/s_scalbn  math/s_scalbnf  \
291     math/e_sqrt \
292     memchr \
293     memcmp \
294     memcpy \
295     memmove \
296     memset \
297     qsort \
298     snprintf \
299     sprintf \
300     sscanf \
301     stccpy \
302     stpblk \
303     strcasecmp \
304     strcasestr \
305     strcat \
306     stcd_l \
307     stch_l \
308     stcl_d \
309     stcl_h \
310     stcl_o \
311     stco_l \
312     stcu_d \
313     stpcpy \
314     strchr \
315     strcmp \
316     strcpy \
317     strcspn \
318     strlcat \
319     strlcpy \
320     strlen \
321     strnlen \
322     strlwr \
323     strncasecmp \
324     strncat \
325     strncpy \
326     strncmp \
327     strpbrk \
328     strrchr \
329     strspn \
330     strstr \
331     strtol \
332     strtoul \
333     vsnprintf \
334     vsprintf \
335     vsscanf
337 USER_CFLAGS := -DSTDC_STATIC
339 # Ugh. These are for the math routines, which have a number of
340 # lint issues, that should be fixed.
341 USER_CFLAGS += -Wno-unused-variable -Wno-parentheses -Wno-uninitialized
343 #MM- core-linklibs : linklibs-stdc-static
344 %build_linklib mmake=linklibs-stdc-static libname=stdc.static \
345     files="$(STDC_STATIC)" objdir=$(GENDIR)/$(CURDIR)/static
347 #MM- linklibs-romhack : compiler-stdc
348 # FIXME: The next romhack linklib is a temporary hack and has to be
349 # excommunicated in the future !
350 # setjmp()/longjmp() is used in dos.library so make it available.
351 # Plan to put stdc.library also in aros-base rom so this is not needed anymore
352 %build_linklib mmake=linklibs-romhack \
353     libname=romhack files="setjmp longjmp"
355 # x86_64 needs a 32bit version stdc.static
356 %build_linklib mmake=linklibs-stdc-static32 \
357     libname=stdc.static files="$(STDC_STATIC)" objs=$(ROM_COMMON_OBJ32) \
358     cflags="-m32 $(CFLAGS) -DSTDC_LIB32 -DSTDC_STATIC" \
359     objdir=$(GENDIR)/$(CURDIR)/32bit libdir=$(GENDIR)/lib32
361 # A dummy libm.a is provided so that -lm link option does not produce an error
362 # objdir is provided to avoid that arch specific files end up in libm.a
363 %build_linklib mmake=linklibs-libm \
364     libname=m files=empty objdir=$(GENDIR)/$(CURDIR)/libm