aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/core/cfg.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index b3ff6cb3..fada3048 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -486,8 +486,10 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
486 if platforms.freebsd then 486 if platforms.freebsd then
487 defaults.arch = "freebsd-"..target_cpu 487 defaults.arch = "freebsd-"..target_cpu
488 defaults.gcc_rpath = false 488 defaults.gcc_rpath = false
489 defaults.variables.CC = "cc" 489 defaults.variables.CC = os.getenv("CC") or "cc"
490 defaults.variables.LD = "cc" 490 defaults.variables.CFLAGS = os.getenv("CFLAGS") or defaults.variables.CFLAGS
491 defaults.variables.LD = defaults.variables.CC
492 defaults.variables.LIBFLAG = (os.getenv("LDFLAGS") or "").." -shared"
491 end 493 end
492 494
493 if platforms.openbsd then 495 if platforms.openbsd then