[vlc-commits] [Git][videolan/vlc][master] contrib: lua: fix PIC building of the library

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Nov 16 14:57:36 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
55645823 by Steve Lhomme at 2022-11-15T15:38:11+01:00
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

- - - - -


1 changed file:

- contrib/src/lua/rules.mak


Changes:

=====================================
contrib/src/lua/rules.mak
=====================================
@@ -58,9 +58,9 @@ endif
 LUA_MAKEFLAGS := \
 	$(HOSTTOOLS) \
 	AR="$(AR) rcu" \
-	MYCFLAGS="$(CFLAGS)" \
-	MYLDFLAGS="$(LDFLAGS)" \
-	CPPFLAGS="$(CPPFLAGS)"
+	MYCFLAGS="$(CFLAGS) $(PIC)" \
+	MYLDFLAGS="$(LDFLAGS) $(PIC)" \
+	CPPFLAGS="$(CPPFLAGS) $(PIC)"
 
 # Make sure we do not use the cross-compiler when building
 # the native luac for the host.
@@ -96,12 +96,12 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
 	$(MOVE)
 
 .lua: lua
-	$(HOSTVARS_PIC) $(MAKE) -C $< $(LUA_TARGET) $(LUA_MAKEFLAGS)
+	$(MAKE) -C $< $(LUA_TARGET) $(LUA_MAKEFLAGS)
 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
 
-	$(HOSTVARS) $(MAKE) -C $< install \
+	$(MAKE) -C $< install \
 		INSTALL_INC="$(PREFIX)/include/lua$(LUA_SHORTVERSION)" \
 		INSTALL_TOP="$(PREFIX)" \
 		$(LUA_MAKEFLAGS)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/55645823ca40294d4f47c034d2bba9965d5f5854

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/55645823ca40294d4f47c034d2bba9965d5f5854
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list