aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-mkv/libebml/libebml/ldflags.patch
blob: a01c7544b635b04ac6d0d1546fcf25c037f991ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Use LD and obey LDFLAGS

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Upstream-Status: Pending

diff --git a/make/linux/Makefile b/make/linux/Makefile
index 391b6e3..a2ac13e 100644
--- a/make/linux/Makefile
+++ b/make/linux/Makefile
@@ -64,6 +64,7 @@ objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
 WARNINGFLAGS=-Wall -Wextra -Wno-unknown-pragmas -ansi -fno-gnu-keywords -Wshadow
 COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
 DEPENDFLAGS  = $(CXXFLAGS) $(INCLUDE)
+LINKFLAGS=$(LDFLAGS)

 ifeq (Darwin,$(shell uname -s))
 all: staticlib
@@ -91,7 +92,7 @@ $(LIBRARY): $(objects)
	$(RANLIB) $@

 $(LIBRARY_SO): $(objects_so)
-	$(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
+	$(LD) $(LINKFLAGS) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
	rm -f $(LIBRARY_SO)
	ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)

diff --git a/make/mingw32/Makefile b/make/mingw32/Makefile
index e5986ef..6ca16aa 100644
--- a/make/mingw32/Makefile
+++ b/make/mingw32/Makefile
@@ -18,6 +18,7 @@ DEBUGFLAGS=-g -DDEBUG
 endif
 CROSS   =
 CXX     = $(CROSS)g++
+LD      = $(CXX)
 CC      = $(CROSS)gcc
 WINDRES = $(CROSS)windres
 RANLIB  = $(CROSS)ranlib
@@ -33,6 +34,7 @@ LIBS = libebml.a
 endif
 INCS = -I"$(shell pwd)/../.."
 COMPILEFLAGS = $(DEBUGFLAGS) $(INCS) $(DLLFLAGS) $(CXXFLAGS)
+LINKFLAGS = $(LDFLAGS)

 .PHONY: all all-before all-after clean clean-custom

@@ -54,7 +56,7 @@ libebml.a: $(OBJ)
	$(RANLIB) $@

 libebml.dll: $(OBJ)
-	$(CXX) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ)
+	$(LD) $(LINKFLAGS) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ)

 depend:
	@echo Calculating dependecies:
--
2.8.0