Skip to content
Snippets Groups Projects
Commit 55645823 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

contrib: lua: fix PIC building of the library

CFLAGS/CPPFLAGS are ignored, all the variables from HOSTVARS and HOSTVARS_PIC
are ignored. The values need to be set in the relevant variables.

/usr/bin/ld: /root/build/contrib/x86_64-linux-gnu/lib/liblua5.4.a(liolib.o): warning: relocation against `stdin@@GLIBC_2.2.5' in read-only section `.text'
/usr/bin/ld: /root/build/contrib/x86_64-linux-gnu/lib/liblua5.4.a(lauxlib.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
parent fe25c799
Branches 3.1.x
Tags 3.1.7
Loading
Pipeline #283753 passed with stage
in 55 minutes and 9 seconds
...@@ -58,9 +58,9 @@ endif ...@@ -58,9 +58,9 @@ endif
LUA_MAKEFLAGS := \ LUA_MAKEFLAGS := \
$(HOSTTOOLS) \ $(HOSTTOOLS) \
AR="$(AR) rcu" \ AR="$(AR) rcu" \
MYCFLAGS="$(CFLAGS)" \ MYCFLAGS="$(CFLAGS) $(PIC)" \
MYLDFLAGS="$(LDFLAGS)" \ MYLDFLAGS="$(LDFLAGS) $(PIC)" \
CPPFLAGS="$(CPPFLAGS)" CPPFLAGS="$(CPPFLAGS) $(PIC)"
# Make sure we do not use the cross-compiler when building # Make sure we do not use the cross-compiler when building
# the native luac for the host. # the native luac for the host.
...@@ -96,12 +96,12 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua ...@@ -96,12 +96,12 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
$(MOVE) $(MOVE)
.lua: lua .lua: lua
$(HOSTVARS_PIC) $(MAKE) -C $< $(LUA_TARGET) $(LUA_MAKEFLAGS) $(MAKE) -C $< $(LUA_TARGET) $(LUA_MAKEFLAGS)
ifdef HAVE_WIN32 ifdef HAVE_WIN32
$(HOSTVARS) $(MAKE) -C $< -C src liblua$(LUA_SHORTVERSION).a $(LUA_MAKEFLAGS) $(MAKE) -C $< -C src liblua$(LUA_SHORTVERSION).a $(LUA_MAKEFLAGS)
endif endif
$(HOSTVARS) $(MAKE) -C $< install \ $(MAKE) -C $< install \
INSTALL_INC="$(PREFIX)/include/lua$(LUA_SHORTVERSION)" \ INSTALL_INC="$(PREFIX)/include/lua$(LUA_SHORTVERSION)" \
INSTALL_TOP="$(PREFIX)" \ INSTALL_TOP="$(PREFIX)" \
$(LUA_MAKEFLAGS) $(LUA_MAKEFLAGS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment