Skip to content

Commit 1f69727

Browse files
authored
Merge pull request #21 from z33ky/mapbase/gcc-linux
gcc/Linux fixes
2 parents 5b2547a + ae1162d commit 1f69727

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1535
-865
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ipch
2626
*.xcodeproj/
2727
obj*/
2828
!devtools/*.mak
29+
sp/src/devtools/makefile_base_posix.mak.link
2930
!utils/smdlexp/smdlexp.mak
3031

3132
# Specific Source build products
@@ -87,3 +88,6 @@ sp/src/materialsystem/*.dll
8788
sp/src/materialsystem/*.pdb
8889
sp/src/vgui2/*.dll
8990
sp/src/vgui2/*.pdb
91+
92+
# Build support files
93+
sp/src/devtools/gcc9+support.o

sp/src/devtools/gcc9+support.cpp

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// compatibility with old ABI
2+
#if __GNUC__ >= 9
3+
#include <cmath>
4+
5+
extern "C" double __pow_finite(double a, double b)
6+
{
7+
return pow(a, b);
8+
}
9+
10+
extern "C" double __log_finite(double a)
11+
{
12+
return log(a);
13+
}
14+
15+
extern "C" double __exp_finite(double a)
16+
{
17+
return exp(a);
18+
}
19+
20+
extern "C" double __atan2_finite(double a, double b)
21+
{
22+
return atan2(a, b);
23+
}
24+
25+
extern "C" double __atan2f_finite(double a, double b)
26+
{
27+
return atan2f(a, b);
28+
}
29+
30+
extern "C" float __powf_finite(float a, float b)
31+
{
32+
return powf(a, b);
33+
}
34+
35+
extern "C" float __logf_finite(float a)
36+
{
37+
return logf(a);
38+
}
39+
40+
extern "C" float __expf_finite(float a)
41+
{
42+
return expf(a);
43+
}
44+
45+
extern "C" float __acosf_finite(float a)
46+
{
47+
return acosf(a);
48+
}
49+
50+
extern "C" double __asin_finite(double a)
51+
{
52+
return asin(a);
53+
}
54+
55+
extern "C" double __acos_finite(double a)
56+
{
57+
return acos(a);
58+
}
59+
#endif

0 commit comments

Comments
 (0)