aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@NewMachine.localdomain>2010-08-20 12:07:51 -0300
committerHisham Muhammad <hisham@NewMachine.localdomain>2010-08-20 12:07:51 -0300
commitca3d0e48c44fafafc5dff8f27a9a5ac5da090050 (patch)
tree3e4f1d4a0d2d8fe47e9a85df6a145979d1a93903 /src
parent7cc7c79a297b2265201ac58c1ea3de02b94e9668 (diff)
downloadluarocks-ca3d0e48c44fafafc5dff8f27a9a5ac5da090050.tar.gz
luarocks-ca3d0e48c44fafafc5dff8f27a9a5ac5da090050.tar.bz2
luarocks-ca3d0e48c44fafafc5dff8f27a9a5ac5da090050.zip
Always set -fPIC when using gcc (Unix systems).
Should settle the "please drop whatever you're doing and add -fPIC to all your rockspecs" issue.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cfg.lua7
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
249end 252end
250 253
251if detected.cygwin then 254if detected.cygwin then
@@ -284,10 +287,6 @@ if detected.freebsd then
284 defaults.variables.LIBFLAG = "-shared" 287 defaults.variables.LIBFLAG = "-shared"
285end 288end
286 289
287if proc == "x86_64" and not defaults.variables.CFLAGS:match("-fPIC") then
288 defaults.variables.CFLAGS = defaults.variables.CFLAGS.." -fPIC"
289end
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.
292defaults.variables.LUA = defaults.lua_interpreter 291defaults.variables.LUA = defaults.lua_interpreter
293defaults.variables.LIB_EXTENSION = defaults.lib_extension 292defaults.variables.LIB_EXTENSION = defaults.lib_extension