blob: 300bd18f2e5877c91aa2733db72e62c07cacf7f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# https://sourceware.org/git/?p=glibc.git;a=commit;h=7bdb921d
{ runCommandWith, multiStdenv, writeText }:
runCommandWith {
stdenv = multiStdenv;
name = "libfinite.a";
} ''
cc -o finite.o -m32 -c ${writeText "finite.c" ''
#include <math.h>
/* metamod */
double __pow_finite(double x, double y) { return pow(x, y); }
/* sourcemod */
float __acosf_finite(float x) { return acosf(x); };
double __acos_finite(double x) { return acos(x); };
double __asin_finite(double x) { return asin(x); };
float __atan2f_finite(double y, double x) { return atan2f(y, x); }
double __atan2_finite(double y, double x) { return atan2(y, x); }
double __log_finite(double x) { return log(x); }
''}
ar rcs $out finite.o
''
|