xref: /haiku/src/system/libroot/posix/musl/math/x86/Jamfile (revision 15fb7d88e971c4d6c787c6a3a5c159afb1ebf77b)
1SubDir HAIKU_TOP src system libroot posix musl math x86 ;
2
3SubDirSysHdrs [ FDirName $(SUBDIR) .. .. include ] ;
4UseHeaders [ FDirName $(SUBDIR) .. .. internal ] ;
5
6local arch ;
7for arch in $(TARGET_ARCHS) {
8	UseHeaders [ FDirName $(SUBDIR) .. .. arch $(arch) ] ;
9}
10UseHeaders [ FDirName $(SUBDIR) .. .. arch generic ] [ FDirName $(SUBDIR) .. ]  ;
11
12
13local generics =
14	acosh.c acoshf.c acoshl.c
15	asinh.c asinhf.c asinhl.c
16	atanh.c atanhf.c atanhl.c
17	cbrt.c cbrtf.c cbrtl.c
18	copysign.c copysignf.c copysignl.c
19	__cos.c cos.c __cosdf.c cosf.c cosh.c coshf.c coshl.c __cosl.c cosl.c
20	erf.c erff.c erfl.c
21	exp10.c exp10f.c exp10l.c __expo2.c __expo2f.c
22	exp_data.c exp2f_data.c
23	fdim.c fdimf.c fdiml.c
24	finite.c finitef.c
25	fma.c fmaf.c fmal.c
26	fmax.c fmaxf.c fmaxl.c
27	fmin.c fminf.c fminl.c
28	__fpclassify.c __fpclassifyf.c __fpclassifyl.c
29	frexp.c frexpf.c frexpl.c
30	hypotl.c
31	ilogb.c ilogbf.c ilogbl.c
32	j0.c j0f.c j1.c j1f.c jn.c jnf.c
33	lgamma.c lgammaf.c lgammaf_r.c lgammal.c lgamma_r.c
34	llround.c llroundf.c llroundl.c
35	log10.c log10f.c
36	logb.c logbf.c logbl.c
37	lround.c lroundf.c lroundl.c
38	__math_divzero.c __math_divzerof.c __math_invalid.c __math_invalidf.c
39	__math_oflow.c __math_oflowf.c __math_uflow.c __math_uflowf.c
40	__math_xflow.c __math_xflowf.c modf.c modff.c modfl.c
41	nan.c nanf.c nanl.c
42	nearbyint.c nearbyintf.c nearbyintl.c
43	nextafter.c nextafterf.c nextafterl.c
44	nexttoward.c nexttowardf.c nexttowardl.c
45	__polevll.c
46	pow.c pow_data.c powf.c powf_data.c powl.c
47	__rem_pio2.c __rem_pio2f.c __rem_pio2_large.c __rem_pio2l.c
48	round.c roundf.c roundl.c
49	scalb.c scalbf.c
50	__signbit.c __signbitf.c __signbitl.c
51	signgam.c
52	significand.c significandf.c
53	__sin.c sin.c sincos.c sincosf.c sincosl.c __sinl.c sinl.c
54	__sindf.c sinf.c sinh.c sinhf.c sinhl.c
55	__tan.c tan.c __tandf.c tanf.c __tanl.c tanl.c
56	tanh.c tanhf.c tanhl.c
57	tgamma.c tgammaf.c tgammal.c
58	;
59
60local architectureObject ;
61for architectureObject in [ MultiArchSubDirSetup ] {
62	on $(architectureObject) {
63		local architecture = $(TARGET_PACKAGING_ARCH) ;
64
65		if $(architecture) = x86_gcc2 {
66			# GCC 2 miscompiles some of the files in here, so we use GCC 8.
67			original_TARGET_CC_x86_gcc2 = $(TARGET_CC_x86_gcc2) ;
68			TARGET_CC_x86_gcc2 = $(TARGET_CC_x86) -Wa,-mrelax-relocations=no -Wno-unused-but-set-variable ;
69		}
70
71		MergeObject <$(architecture)>posix_musl_math.o :
72			__invtrigl.s
73			acos.s acosl.s acosf.s asin.s asinf.s asinl.s atan.s atan2.s atan2f.s
74			atan2l.s atanf.s atanl.s
75			ceil.s ceilf.s ceill.s
76			exp.s exp2.s exp2f.s exp2l.s expl.s expf.s expm1.s expm1f.s expm1l.s
77			fabs.s fabsf.s fabsl.s floor.s floorf.s floorl.s
78			fmod.s fmodf.s fmodl.s
79			hypot.s hypotf.s
80			ldexp.s ldexpf.s ldexpl.s llrintf.s llrintl.s llrint.s
81			log.s log1p.s log1pf.s log2.s log2f.s log2l.s
82			log10l.s log1pl.s logf.s logl.s lrintf.s lrintl.s lrint.s
83			remainder.s remainderf.s remainderl.s
84			remquo.s remquof.s remquol.s rint.s rintf.s rintl.s
85			scalbln.s scalblnf.s scalblnl.s
86			scalbn.s scalbnf.s scalbnl.s
87			sqrtf.s sqrtl.s sqrt.s
88			truncl.s trunc.s truncf.s
89
90			gamma.c
91
92			$(generics)
93			;
94
95		if $(architecture) = x86_gcc2 {
96			TARGET_CC_x86_gcc2 = $(original_TARGET_CC_x86_gcc2) ;
97		}
98
99
100		SEARCH on [ FGristFiles $(generics) ] = [ FDirName $(SUBDIR) .. ] ;
101	}
102}
103