aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/cfg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/cfg.lua')
-rw-r--r--src/luarocks/cfg.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 263af063..e0b4060a 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -324,6 +324,7 @@ if detected.unix then
324 defaults.platforms = { "unix" } 324 defaults.platforms = { "unix" }
325 defaults.variables.CC = "gcc" 325 defaults.variables.CC = "gcc"
326 defaults.variables.LD = "gcc" 326 defaults.variables.LD = "gcc"
327 defaults.gcc_rpath = true
327 defaults.variables.LIBFLAG = "-shared" 328 defaults.variables.LIBFLAG = "-shared"
328 defaults.external_deps_patterns = { 329 defaults.external_deps_patterns = {
329 bin = { "?" }, 330 bin = { "?" },
@@ -362,10 +363,17 @@ if detected.macosx then
362 defaults.external_lib_extension = "dylib" 363 defaults.external_lib_extension = "dylib"
363 defaults.arch = "macosx-"..proc 364 defaults.arch = "macosx-"..proc
364 defaults.platforms = {"unix", "bsd", "macosx"} 365 defaults.platforms = {"unix", "bsd", "macosx"}
365 defaults.variables.CC = "export MACOSX_DEPLOYMENT_TARGET=10.3; gcc"
366 defaults.variables.LD = "export MACOSX_DEPLOYMENT_TARGET=10.3; gcc"
367 defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" 366 defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load"
368 defaults.variables.STATFLAG = "-f '%A'" 367 defaults.variables.STATFLAG = "-f '%A'"
368 local version = io.popen("sw_vers -productVersion"):read("*l")
369 version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3
370 if version >= 5 then
371 version = 5
372 else
373 defaults.gcc_rpath = false
374 end
375 defaults.variables.CC = "export MACOSX_DEPLOYMENT_TARGET=10."..version.."; gcc"
376 defaults.variables.LD = "export MACOSX_DEPLOYMENT_TARGET=10."..version.."; gcc"
369end 377end
370 378
371if detected.linux then 379if detected.linux then