aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@sunpoet.net>2020-12-19 06:43:58 +0800
committerGitHub <noreply@github.com>2020-12-18 19:43:58 -0300
commit0068685158947e966572b4a41e4f66688495b02b (patch)
treea63c3190374a61df0163fef6ab65e67e2c80cece /src
parente4fc6872640b1fa3f81670d15022303f3855551f (diff)
downloadluarocks-0068685158947e966572b4a41e4f66688495b02b.tar.gz
luarocks-0068685158947e966572b4a41e4f66688495b02b.tar.bz2
luarocks-0068685158947e966572b4a41e4f66688495b02b.zip
Respect CC/CFLAGS/LDFLAGS on FreeBSD (#1246)
Reference: https://svnweb.freebsd.org/ports/head/devel/lua-luarocks/files/patch-src_luarocks_core_cfg.lua?revision=477367&view=markup (based on)
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