From b3eee4e89a06123b2c39b344858d924656fc17d8 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 25 Aug 2019 17:58:57 +0200 Subject: [PATCH] Enforce older versions of libm for several math libraries to ensure compatibility --- CMakeLists.txt | 3 +++ src/Parser/Lexer.cpp | 1 + src/StandardLibraries/MathLibrary.hpp | 3 +++ 3 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f33e3e8..8eaaea2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ add_executable(PorygonLangTests ${SRC_FILES} ${TEST_FILES}) +target_link_libraries(PorygonLang -static-libgcc -static-libstdc++) +target_link_libraries(PorygonLangTests -static-libgcc -static-libstdc++) + if (WINDOWS) target_link_libraries(PorygonLang -static -static-libgcc -static-libstdc++) target_link_libraries(PorygonLangTests -static -static-libgcc -static-libstdc++) diff --git a/src/Parser/Lexer.cpp b/src/Parser/Lexer.cpp index f98f45a..faa1f9e 100644 --- a/src/Parser/Lexer.cpp +++ b/src/Parser/Lexer.cpp @@ -153,6 +153,7 @@ namespace Porygon::Parser { } } + __asm__(".symver pow,pow@GLIBC_2.2.5"); Token *Lexer::LexNumber(char16_t c) { int64_t int_value = CharToInt(c); double float_value = 0; diff --git a/src/StandardLibraries/MathLibrary.hpp b/src/StandardLibraries/MathLibrary.hpp index b2863f9..b09e0cc 100644 --- a/src/StandardLibraries/MathLibrary.hpp +++ b/src/StandardLibraries/MathLibrary.hpp @@ -15,6 +15,9 @@ #include "../UserData/UserDataFunction.hpp" #include "../Utilities/Random.hpp" +__asm__(".symver log,log@GLIBC_2.2.5"); +__asm__(".symver exp,exp@GLIBC_2.2.5"); + namespace Porygon::StandardLibraries { using namespace Porygon::Evaluation; using namespace Porygon::Utilities;