From 58a5e256a9df97903b59f53f43aef6e4a52febcc Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 12 May 2020 12:23:26 +0200 Subject: [PATCH] GNU libc 2.31 compatibility part two This fixes underlinking against -lm and reverts the prior workaround 83cd796a474f746. --- wscript | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index ea6e5e4ec9..1c9bb1ff5d 100644 --- a/wscript +++ b/wscript @@ -59,7 +59,7 @@ compiler_flags_dictionaries= { # Flags to use posix pipes between compiler stages 'pipe' : '-pipe', # Flags for maximally optimized build - 'full-optimization' : [ '-O3', '-fomit-frame-pointer', '-ffast-math', '-fstrength-reduce', '-fno-finite-math-only' ], + 'full-optimization' : [ '-O3', '-fomit-frame-pointer', '-ffast-math', '-fstrength-reduce' ], # Flag to ensure that compiler error output includes column/line numbers 'show-column' : '-fshow-column', # Flags required to build for x86 only (OS X feature) @@ -1332,6 +1332,11 @@ int main () { return 0; } sub_config_and_use(conf, 'tools/sanity_check') sub_config_and_use(conf, 'tools/gccabicheck') + # explicitly link against libm. This is possible on all POSIX systems + # and required on Linux for symbol versioning and ABI compatibility + if not (Options.options.dist_target == 'mingw' or Options.options.dist_target == 'msvc'): + conf.env.append_value('LIB', 'm') + sub_config_and_use(conf, 'libs/clearlooks-newer') for i in children: