[vlc-commits] contrib: matroska needs PIC on Linux even for staticlib

Rémi Denis-Courmont git at videolan.org
Wed Aug 3 17:06:44 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug  3 13:37:13 2011 +0300| [6d13c3b61eed006b5d0cceeab34894ac0338f0b1] | committer: Rémi Denis-Courmont

contrib: matroska needs PIC on Linux even for staticlib

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6d13c3b61eed006b5d0cceeab34894ac0338f0b1
---

 contrib/src/matroska/matroska-pic.patch |   22 ++++++++++++++++++++++
 contrib/src/matroska/rules.mak          |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/contrib/src/matroska/matroska-pic.patch b/contrib/src/matroska/matroska-pic.patch
new file mode 100644
index 0000000..a573d79
--- /dev/null
+++ b/contrib/src/matroska/matroska-pic.patch
@@ -0,0 +1,22 @@
+diff -ru libmatroska.orig/make/linux/Makefile libmatroska/make/linux/Makefile
+--- libmatroska.orig/make/linux/Makefile	2011-06-15 15:00:37.000000000 +0300
++++ libmatroska/make/linux/Makefile	2011-08-03 13:33:25.000000000 +0300
+@@ -65,7 +65,7 @@
+ # object files; replace .cxx extension with .o
+ objects:=$(patsubst %$(EXTENSION),%.o,$(sources))
+ 
+-objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
++objects_so:=$(objects)
+ 
+ WARNINGFLAGS=-Wall -Wno-unknown-pragmas -ansi -fno-gnu-keywords -D_GNU_SOURCE \
+ 		-Wshadow
+@@ -89,9 +89,6 @@
+ 
+ # Build rules
+ %.o: %$(EXTENSION)
+-	$(CXX) -c $(COMPILEFLAGS) -o $@ $<
+-
+-%.lo: %$(EXTENSION)
+ 	$(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
+ 
+ $(LIBRARY): $(objects)
diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak
index 8bbeab7..9d1def1 100644
--- a/contrib/src/matroska/rules.mak
+++ b/contrib/src/matroska/rules.mak
@@ -14,6 +14,7 @@ $(TARBALLS)/libmatroska-$(MATROSKA_VERSION).tar.bz2:
 
 libmatroska: libmatroska-$(MATROSKA_VERSION).tar.bz2 .sum-matroska
 	$(UNPACK)
+	$(APPLY) $(SRC)/matroska/matroska-pic.patch
 	$(MOVE)
 
 .matroska: libmatroska



More information about the vlc-commits mailing list