Skip to content

Commit

Permalink
Merge pull request mapbase-source#21 from z33ky/mapbase/gcc-linux
Browse files Browse the repository at this point in the history
gcc/Linux fixes
  • Loading branch information
Blixibon committed Jun 21, 2020
2 parents 8b38259 + 7885710 commit c6494f1
Show file tree
Hide file tree
Showing 68 changed files with 1,535 additions and 865 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ipch
*.xcodeproj/
obj*/
!devtools/*.mak
sp/src/devtools/makefile_base_posix.mak.link
!utils/smdlexp/smdlexp.mak

# Specific Source build products
Expand Down Expand Up @@ -87,3 +88,6 @@ sp/src/materialsystem/*.dll
sp/src/materialsystem/*.pdb
sp/src/vgui2/*.dll
sp/src/vgui2/*.pdb

# Build support files
sp/src/devtools/gcc9+support.o
59 changes: 59 additions & 0 deletions sp/src/devtools/gcc9+support.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// compatibility with old ABI
#if __GNUC__ >= 9
#include <cmath>

extern "C" double __pow_finite(double a, double b)
{
return pow(a, b);
}

extern "C" double __log_finite(double a)
{
return log(a);
}

extern "C" double __exp_finite(double a)
{
return exp(a);
}

extern "C" double __atan2_finite(double a, double b)
{
return atan2(a, b);
}

extern "C" double __atan2f_finite(double a, double b)
{
return atan2f(a, b);
}

extern "C" float __powf_finite(float a, float b)
{
return powf(a, b);
}

extern "C" float __logf_finite(float a)
{
return logf(a);
}

extern "C" float __expf_finite(float a)
{
return expf(a);
}

extern "C" float __acosf_finite(float a)
{
return acosf(a);
}

extern "C" double __asin_finite(double a)
{
return asin(a);
}

extern "C" double __acos_finite(double a)
{
return acos(a);
}
#endif
Loading

0 comments on commit c6494f1

Please sign in to comment.