From b3efc3648775a9f0a18a2997fb741f30b9b0dc6f Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Mon, 11 May 2015 18:59:12 -0400 Subject: [PATCH 1/2] Link libm in all bin, not just engine-specific ones. This fixes the "undefined symbol: floorf" error that some people were getting in sourcemod.logic.so. --- AMBuildScript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AMBuildScript b/AMBuildScript index a02779f9f..43c3567eb 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -264,6 +264,7 @@ class SMConfig(object): # Platform-specifics if builder.target_platform == 'linux': cxx.defines += ['_LINUX', 'POSIX'] + cxx.linkflags += ['-lm'] if cxx.vendor == 'gcc': cxx.linkflags += ['-static-libgcc'] elif cxx.vendor == 'clang': @@ -437,7 +438,6 @@ class SMConfig(object): dynamic_libs = [] if builder.target_platform == 'linux': - compiler.linkflags[0:0] = ['-lm'] if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2']: dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so'] elif sdk.name in ['l4d', 'blade', 'insurgency', 'csgo', 'dota']: From 4152e05dcd1dfb08ea2bbee13f692beb456619b7 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Tue, 12 May 2015 06:21:32 -0700 Subject: [PATCH 2/2] Fix indentation. --- AMBuildScript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AMBuildScript b/AMBuildScript index 43c3567eb..3596c7512 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -264,7 +264,7 @@ class SMConfig(object): # Platform-specifics if builder.target_platform == 'linux': cxx.defines += ['_LINUX', 'POSIX'] - cxx.linkflags += ['-lm'] + cxx.linkflags += ['-lm'] if cxx.vendor == 'gcc': cxx.linkflags += ['-static-libgcc'] elif cxx.vendor == 'clang':