1 include $(SRCDIR)/config/aros.cfg
3 #MM- AROS : compiler-stdc compiler-stdcio
5 FMTPRINTFDIR := $(SRCDIR)/compiler/fmtprintf
6 USER_INCLUDES += -I$(SRCDIR)/$(CURDIR)/math -iquote $(FMTPRINTFDIR)
11 math/bsdsrc/b_tgamma \
183 math/s_significandf \
204 STDC_LONGDB_MATH := \
262 # Support files for 80bit and 128bit precision long double.
264 STDC_LONGDB80_MATH := \
269 math/ld80/e_lgammal_r \
275 math/ld80/e_tgammal \
288 STDC_LONGDB128_MATH := \
289 math/ld128/e_acoshl \
290 math/ld128/e_atanhl \
293 math/ld128/e_lgammal_r \
295 math/ld128/e_log10l \
299 math/ld128/e_tgammal \
304 math/ld128/s_asinhl \
307 math/ld128/s_expm1l \
308 math/ld128/s_log1pl \
313 # Add 80bit long double support on x86, x64 and m68k
315 ifneq ($(filter $(AROS_TARGET_CPU),i386 x86_64 m68k),)
316 STDC_MATH += $(STDC_LONGDB_MATH)
317 STDC_MATH += $(STDC_LONGDB80_MATH)
318 USER_INCLUDES += -I$(SRCDIR)/$(CURDIR)/math/ld80
319 STDC_SCABS_MATH += math/s_cabsl
320 STDC_WCABS_MATH += math/w_cabsl
323 # Add 128bit long double support for aarch64
325 ifneq ($(filter $(AROS_TARGET_CPU),aarch64),)
326 STDC_MATH += $(STDC_LONGDB_MATH)
327 STDC_MATH += $(STDC_LONGDB128_MATH)
328 USER_INCLUDES += -I$(SRCDIR)/$(CURDIR)/math/ld128
329 STDC_SCABS_MATH += math/s_cabsl
330 STDC_WCABS_MATH += math/w_cabsl
333 # We either don't know what long double format is required
334 # or the platform doesn't support it, so alias the double versions
335 # of necessary functions.
336 # These architectures should have
337 # LDBL_MANT_DIG == DBL_MANT_DIG (53) in float.h
342 STDC_MATH += $(STDC_WCABS_MATH)
379 localtime localtime_r \
463 # The common files will be put both in the shared and in the static link lib
466 __stdc_getsigngamptr \
514 # The common files will be put both in the shared and in the static link lib
518 #MM- core-linklibs : linklibs-stdc linklibs-stdcio linklibs-libm
520 STDC_LINKOBJS := $(addsuffix .o,$(addprefix $(GENDIR)/$(CURDIR)/stdc/,$(notdir $(STDC_COMMON))))
522 # Ugh. These are for the math routines, which have a number of
523 # lint issues, that should be fixed.
524 NOWARN_FLAGS := $(NOWARN_NONNULL_COMPARE) $(NOWARN_UNUSED_VARIABLE) \
525 $(NOWARN_PARENTHESES) $(NOWARN_UNINITIALIZED)
527 USER_CFLAGS := $(NOWARN_FLAGS) -noposixc $(CFLAGS_NO_BUILTIN)
528 USER_LDFLAGS := -nostdc -noposixc
529 USER_CPPFLAGS := -Dlint '-D__FBSDID(x)='
531 %build_module mmake=compiler-stdc \
532 modname=stdc modtype=library \
533 files="$(STDC) $(STDC_COMMON)" \
534 linklibfiles=$(STDC_LINKLIB) linklibobjs=$(STDC_LINKOBJS)
536 STDCIO_LINKOBJS := $(addsuffix .o,$(addprefix $(GENDIR)/$(CURDIR)/stdcio/,$(notdir $(STDCIO_COMMON))))
538 %build_module mmake=compiler-stdcio \
539 modname=stdcio modtype=library \
540 files="$(STDCIO) $(STDCIO_COMMON)" \
541 linklibobjs=$(STDCIO_LINKOBJS) \
544 STDC_MATH_STATIC := \
576 $(STDC_MATH_STATIC) \
624 USER_CFLAGS := $(NOWARN_FLAGS) $(CFLAGS_NO_BUILTIN)
625 USER_CPPFLAGS := -DSTDC_STATIC -Dlint
627 #MM- core-linklibs : linklibs-stdc-static
628 %build_linklib mmake=linklibs-stdc-static libname=stdc.static \
629 files="$(STDC_STATIC)" objdir=$(GENDIR)/$(CURDIR)/static
631 #MM- linklibs-romhack : compiler-stdc
632 # FIXME: The next romhack linklib is a temporary hack and has to be
633 # excommunicated in the future !
634 # setjmp()/longjmp() is used in dos.library so make it available.
635 # Plan to put stdc.library also in aros-base rom so this is not needed anymore
636 %build_linklib mmake=linklibs-romhack \
637 objdir=$(GENDIR)/$(CURDIR)/stdc libname=romhack files="setjmp longjmp"
639 CFLAGS32 := $(filter-out -mcmodel=large,$(CFLAGS))
641 # x86_64 needs a 32bit version stdc.static
642 %build_linklib mmake=linklibs-stdc-static32 \
643 libname=stdc.static files="$(STDC_STATIC)" objs=$(ROM_COMMON_OBJ32) \
644 cflags="-m32 $(CFLAGS32) -DSTDC_LIB32 -DSTDC_STATIC" \
645 objdir=$(GENDIR)/$(CURDIR)/32bit libdir=$(GENDIR)/lib32
647 # A dummy libm.a is provided so that -lm link option does not produce an error
648 # objdir is provided to avoid that arch specific files end up in libm.a
649 %build_linklib mmake=linklibs-libm \
650 libname=m files=empty objdir=$(GENDIR)/$(CURDIR)/libm