2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-14 07:38:04 +03:00

Added libraries libm/librt built on glibc 2.11.1 (Fixes #827)

This commit is contained in:
s1lentq 2021-04-05 00:04:00 +07:00
parent 80f0f3c7ea
commit 2965e0ea7f
9 changed files with 9 additions and 40 deletions

View File

@ -40,7 +40,7 @@ if (USE_INTEL_COMPILER)
else()
# Produce code optimized for the most common IA32/AMD64/EM64T processors.
# As new processors are deployed in the marketplace, the behavior of this option will change.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3\
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3 -flto\
-fpermissive -fno-sized-deallocation\
-Wno-unused-result -Wno-unknown-pragmas -Wno-write-strings")

View File

@ -35,7 +35,7 @@ if (USE_INTEL_COMPILER)
else()
# Produce code optimized for the most common IA32/AMD64/EM64T processors.
# As new processors are deployed in the marketplace, the behavior of this option will change.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3\
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3 -flto\
-fpermissive -fno-sized-deallocation\
-Wno-unused-result -Wno-unknown-pragmas -Wno-unused-variable\
-Wno-sign-compare -Wno-write-strings -Wno-strict-aliasing")

View File

@ -35,7 +35,7 @@ if (USE_INTEL_COMPILER)
else()
# Produce code optimized for the most common IA32/AMD64/EM64T processors.
# As new processors are deployed in the marketplace, the behavior of this option will change.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3\
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3 -flto\
-fpermissive -fno-sized-deallocation\
-Wno-unused-result -Wno-unknown-pragmas\
-Wno-sign-compare -Wno-write-strings -Wno-strict-aliasing")

View File

@ -35,7 +35,7 @@ if (USE_INTEL_COMPILER)
else()
# Produce code optimized for the most common IA32/AMD64/EM64T processors.
# As new processors are deployed in the marketplace, the behavior of this option will change.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3\
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3 -flto\
-fpermissive -fno-sized-deallocation\
-Wno-unused-result -Wno-unknown-pragmas\
-Wno-write-strings -Wno-strict-aliasing")
@ -98,11 +98,8 @@ add_definitions(
-D_snprintf=snprintf
)
if (NOT TARGET appversion)
add_custom_target(appversion DEPENDS COMMAND "${PROJECT_SOURCE_DIR}/../../version/appversion.sh" "${PROJECT_SOURCE_DIR}/../..")
endif()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,'$ORIGIN/.' -L${PROJECT_SOURCE_DIR}/../../lib/linux32")
add_library(director SHARED ${appversion.sh} ${DIRECTOR_SRCS} ${COMMON_SRCS})
target_link_libraries(director dl)
add_library(director SHARED ${DIRECTOR_SRCS} ${COMMON_SRCS})
target_link_libraries(director dl m)
set_target_properties(director PROPERTIES PREFIX "" COMPILE_FLAGS "-m32" LINK_FLAGS "-m32" POSITION_INDEPENDENT_CODE ON)
add_dependencies(director appversion)

View File

@ -32,20 +32,6 @@
EXPOSE_SINGLE_INTERFACE(Director, IDirector, DIRECTOR_INTERFACE_VERSION);
#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.
// NOTE: This workaround seem not compatible with -flto compile GCC option.
__asm__(".symver expf,expf@GLIBC_" GLIBC_expf_VERSION);
#endif // #if defined(_WIN32)
bool Director::Init(IBaseSystem *system, int serial, char *name)
{
BaseSystemModule::Init(system, serial, name);

View File

@ -35,7 +35,7 @@ if (USE_INTEL_COMPILER)
else()
# Produce code optimized for the most common IA32/AMD64/EM64T processors.
# As new processors are deployed in the marketplace, the behavior of this option will change.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3\
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse3 -flto\
-fpermissive -fno-sized-deallocation\
-Wno-unused-result -Wno-unknown-pragmas -Wno-unused-variable\
-Wno-write-strings -Wno-strict-aliasing")
@ -131,5 +131,5 @@ if (NOT TARGET bzip2)
endif()
add_library(proxy SHARED ${PROXY_SRCS} ${COMMON_SRCS})
target_link_libraries(proxy dl bzip2 steam_api)
target_link_libraries(proxy dl m bzip2 steam_api)
set_target_properties(proxy PROPERTIES PREFIX "" COMPILE_FLAGS "-m32" LINK_FLAGS "-m32" POSITION_INDEPENDENT_CODE ON)

View File

@ -597,20 +597,6 @@ double EXT_FUNC Sys_FloatTime(void)
#else // not _WIN32
#if __GNUC__ >= 8
#define GLIBC_clock_gettime_VERSION "2.2"
//
// Building go on GCC 8.3 or greater that have newest clock_gettime GLIBC.2.17 than
// available on the destination virtual machine, so we can downgrade GLIBC version
// for this function.
// NOTE: This workaround seem not compatible with -flto compile GCC option.
__asm__(".symver clock_gettime,clock_gettime@GLIBC_" GLIBC_clock_gettime_VERSION);
#endif // #if __GNUC__ >= 8
double Sys_FloatTime(void)
{
static struct timespec start_time;

BIN
rehlds/lib/linux32/libm.so Normal file

Binary file not shown.

BIN
rehlds/lib/linux32/librt.so Normal file

Binary file not shown.