From 52bdc9d3dc35f0ef3293597b68bb2cbcdf219082 Mon Sep 17 00:00:00 2001 From: Joe Rozner <joe@prevoty.com> Date: Tue, 3 Dec 2013 13:28:56 -0800 Subject: [PATCH] Fix LC_ID_DYLIB for OS X Wrapping the SHLINKFLAGS in an array rather than as a single string caused the link flags to be passed to clang double quoted. This cuased clang to interpret the flags as a string rather than as a flag which caused the -install_name flag to never be passed to the linker. --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 81bc849b..8590d4bb 100644 --- a/SConstruct +++ b/SConstruct @@ -40,7 +40,7 @@ env.ScanReplace('libhammer.pc.in') env.MergeFlags("-std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes") if env['PLATFORM'] == 'darwin': - env.Append(SHLINKFLAGS = ['-install_name', '$TARGET']) + env.Append(SHLINKFLAGS = '-install_name ' + env["libpath"] + '/${TARGET.file}') else: env.MergeFlags("-lrt") -- GitLab