diff options
author | Hisham Muhammad <hisham@NewMachine.localdomain> | 2010-08-20 12:07:51 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@NewMachine.localdomain> | 2010-08-20 12:07:51 -0300 |
commit | ca3d0e48c44fafafc5dff8f27a9a5ac5da090050 (patch) | |
tree | 3e4f1d4a0d2d8fe47e9a85df6a145979d1a93903 /src | |
parent | 7cc7c79a297b2265201ac58c1ea3de02b94e9668 (diff) | |
download | luarocks-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.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 |