mirror of
https://github.com/rehlds/rehlds.git
synced 2025-02-26 21:41:06 +03:00
HLTV: Downgrade GLIBC version
This commit is contained in:
parent
42fd0fadfa
commit
80b849f39e
@ -41,6 +41,10 @@ else()
|
|||||||
-Wno-write-strings -Wno-strict-aliasing")
|
-Wno-write-strings -Wno-strict-aliasing")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--wrap=expf")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(PROJECT_SRC_DIR
|
set(PROJECT_SRC_DIR
|
||||||
"${PROJECT_SOURCE_DIR}/src"
|
"${PROJECT_SOURCE_DIR}/src"
|
||||||
"${PROJECT_SOURCE_DIR}/../"
|
"${PROJECT_SOURCE_DIR}/../"
|
||||||
|
@ -32,6 +32,25 @@
|
|||||||
EXPOSE_SINGLE_INTERFACE(Director, IDirector, DIRECTOR_INTERFACE_VERSION);
|
EXPOSE_SINGLE_INTERFACE(Director, IDirector, DIRECTOR_INTERFACE_VERSION);
|
||||||
#endif // DIRECTOR_MODULE
|
#endif // DIRECTOR_MODULE
|
||||||
|
|
||||||
|
#if !defined(_WIN32) && __GNUC__ >= 8
|
||||||
|
|
||||||
|
#define GLIBC_expf_VERSION "2.0"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Building go on GCC 8.3 or greater that have newest expf GLIBC.2.27 than
|
||||||
|
// available on the destination virtual machine, so we can downgrade GLIBC version
|
||||||
|
// for this function.
|
||||||
|
// Use for linker: -Wl,--wrap=expf
|
||||||
|
|
||||||
|
extern int expf(int __fd, int __cmd, ...);
|
||||||
|
__asm__(".symver expf,expf@GLIBC_" GLIBC_expf_VERSION);
|
||||||
|
DLL_EXPORT float __wrap_expf(float x)
|
||||||
|
{
|
||||||
|
return expf(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // #if defined(_WIN32)
|
||||||
|
|
||||||
bool Director::Init(IBaseSystem *system, int serial, char *name)
|
bool Director::Init(IBaseSystem *system, int serial, char *name)
|
||||||
{
|
{
|
||||||
BaseSystemModule::Init(system, serial, name);
|
BaseSystemModule::Init(system, serial, name);
|
||||||
@ -49,7 +68,7 @@ bool Director::Init(IBaseSystem *system, int serial, char *name)
|
|||||||
m_slowMotion = 0.5f;
|
m_slowMotion = 0.5f;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_WORLD_HISTORY; i++) {
|
for (int i = 0; i < MAX_WORLD_HISTORY; i++) {
|
||||||
m_gaussFilter[i] = 1.0f / exp((i * i) / 10000.0f);
|
m_gaussFilter[i] = 1.0f / expf((i * i) / 10000.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_World = nullptr;
|
m_World = nullptr;
|
||||||
|
@ -45,6 +45,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--wrap=expf")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(PROJECT_SRC_DIR
|
set(PROJECT_SRC_DIR
|
||||||
"${PROJECT_SOURCE_DIR}/src"
|
"${PROJECT_SOURCE_DIR}/src"
|
||||||
"${PROJECT_SOURCE_DIR}/../"
|
"${PROJECT_SOURCE_DIR}/../"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user