Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc/Linux fixes #21

Merged
merged 9 commits into from
Jun 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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