1 include $(SRCDIR)/config/aros.cfg
3 #MM- AROS : compiler-stdc compiler-stdcio
5 USER_INCLUDES += -I$(SRCDIR)/$(CURDIR)/math
10 math/bsdsrc/b_tgamma \
182 math/s_significandf \
203 STDC_LONGDB_MATH := \
261 # Support files for 80bit and 128bit precision long double.
263 STDC_LONGDB80_MATH := \
268 math/ld80/e_lgammal_r \
274 math/ld80/e_tgammal \
287 STDC_LONGDB128_MATH := \
288 math/ld128/e_acoshl \
289 math/ld128/e_atanhl \
292 math/ld128/e_lgammal_r \
294 math/ld128/e_log10l \
298 math/ld128/e_tgammal \
303 math/ld128/s_asinhl \
306 math/ld128/s_expm1l \
307 math/ld128/s_log1pl \
312 # Add 80bit long double support on x86, x64 and m68k
314 ifneq ($(filter $(AROS_TARGET_CPU),i386 x86_64 m68k),)
315 STDC_MATH += $(STDC_LONGDB_MATH)
316 STDC_MATH += $(STDC_LONGDB80_MATH)
317 USER_INCLUDES += -I$(SRCDIR)/$(CURDIR)/math/ld80
318 STDC_SCABS_MATH += math/s_cabsl
319 STDC_WCABS_MATH += math/w_cabsl
322 # Add 128bit long double support for aarch64
324 ifneq ($(filter $(AROS_TARGET_CPU),aarch64),)
325 STDC_MATH += $(STDC_LONGDB_MATH)
326 STDC_MATH += $(STDC_LONGDB128_MATH)
327 USER_INCLUDES += -I$(SRCDIR)/$(CURDIR)/math/ld128
328 STDC_SCABS_MATH += math/s_cabsl
329 STDC_WCABS_MATH += math/w_cabsl
332 # We either don't know what long double format is required
333 # or the platform doesn't support it, so alias the double versions
334 # of necessary functions.
335 # These architectures should have
336 # LDBL_MANT_DIG == DBL_MANT_DIG (53) in float.h
341 STDC_MATH += $(STDC_WCABS_MATH)
378 localtime localtime_r \
462 # The common files will be put both in the shared and in the static link lib
465 __stdc_getsigngamptr \
513 # The common files will be put both in the shared and in the static link lib
517 #MM- core-linklibs : linklibs-stdc linklibs-stdcio linklibs-libm
519 STDC_LINKOBJS := $(addsuffix .o,$(addprefix $(GENDIR)/$(CURDIR)/stdc/,$(notdir $(STDC_COMMON))))
521 # Ugh. These are for the math routines, which have a number of
522 # lint issues, that should be fixed.
523 NOWARN_FLAGS := $(NOWARN_NONNULL_COMPARE) $(NOWARN_UNUSED_VARIABLE) \
524 $(NOWARN_PARENTHESES) $(NOWARN_UNINITIALIZED)
526 USER_CFLAGS := $(NOWARN_FLAGS) -noposixc -fno-builtin
527 USER_LDFLAGS := -nostdc -noposixc
528 USER_CPPFLAGS := -Dlint '-D__FBSDID(x)='
530 %build_module mmake=compiler-stdc \
531 modname=stdc modtype=library \
532 files="$(STDC) $(STDC_COMMON)" \
533 linklibfiles=$(STDC_LINKLIB) linklibobjs=$(STDC_LINKOBJS)
535 STDCIO_LINKOBJS := $(addsuffix .o,$(addprefix $(GENDIR)/$(CURDIR)/stdcio/,$(notdir $(STDCIO_COMMON))))
537 %build_module mmake=compiler-stdcio \
538 modname=stdcio modtype=library \
539 files="$(STDCIO) $(STDCIO_COMMON)" \
540 linklibobjs=$(STDCIO_LINKOBJS) \
543 STDC_MATH_STATIC := \
575 $(STDC_MATH_STATIC) \
623 USER_CFLAGS := $(NOWARN_FLAGS) -fno-builtin
624 USER_CPPFLAGS := -DSTDC_STATIC -Dlint
626 #MM- core-linklibs : linklibs-stdc-static
627 %build_linklib mmake=linklibs-stdc-static libname=stdc.static \
628 files="$(STDC_STATIC)" objdir=$(GENDIR)/$(CURDIR)/static
630 #MM- linklibs-romhack : compiler-stdc
631 # FIXME: The next romhack linklib is a temporary hack and has to be
632 # excommunicated in the future !
633 # setjmp()/longjmp() is used in dos.library so make it available.
634 # Plan to put stdc.library also in aros-base rom so this is not needed anymore
635 %build_linklib mmake=linklibs-romhack \
636 objdir=$(GENDIR)/$(CURDIR)/stdc libname=romhack files="setjmp longjmp"
638 CFLAGS32 := $(filter-out -mcmodel=large,$(CFLAGS))
640 # x86_64 needs a 32bit version stdc.static
641 %build_linklib mmake=linklibs-stdc-static32 \
642 libname=stdc.static files="$(STDC_STATIC)" objs=$(ROM_COMMON_OBJ32) \
643 cflags="-m32 $(CFLAGS32) -DSTDC_LIB32 -DSTDC_STATIC" \
644 objdir=$(GENDIR)/$(CURDIR)/32bit libdir=$(GENDIR)/lib32
646 # A dummy libm.a is provided so that -lm link option does not produce an error
647 # objdir is provided to avoid that arch specific files end up in libm.a
648 %build_linklib mmake=linklibs-libm \
649 libname=m files=empty objdir=$(GENDIR)/$(CURDIR)/libm