diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cfg.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index ae07f905..8706bd60 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -246,6 +246,9 @@ if detected.unix then | |||
246 | include = { "?.h" } | 246 | include = { "?.h" } |
247 | } | 247 | } |
248 | defaults.local_cache = home.."/.cache/luarocks" | 248 | defaults.local_cache = home.."/.cache/luarocks" |
249 | if not defaults.variables.CFLAGS:match("-fPIC") then | ||
250 | defaults.variables.CFLAGS = defaults.variables.CFLAGS.." -fPIC" | ||
251 | end | ||
249 | end | 252 | end |
250 | 253 | ||
251 | if detected.cygwin then | 254 | if detected.cygwin then |
@@ -284,10 +287,6 @@ if detected.freebsd then | |||
284 | defaults.variables.LIBFLAG = "-shared" | 287 | defaults.variables.LIBFLAG = "-shared" |
285 | end | 288 | end |
286 | 289 | ||
287 | if proc == "x86_64" and not defaults.variables.CFLAGS:match("-fPIC") then | ||
288 | defaults.variables.CFLAGS = defaults.variables.CFLAGS.." -fPIC" | ||
289 | end | ||
290 | |||
291 | -- Expose some more values detected by LuaRocks for use by rockspec authors. | 290 | -- Expose some more values detected by LuaRocks for use by rockspec authors. |
292 | defaults.variables.LUA = defaults.lua_interpreter | 291 | defaults.variables.LUA = defaults.lua_interpreter |
293 | defaults.variables.LIB_EXTENSION = defaults.lib_extension | 292 | defaults.variables.LIB_EXTENSION = defaults.lib_extension |