Przeglądaj źródła

libvpx: force to use gcc as linker

libvpx excepts gcc to be used as linker. However, it respects
what is defined in LD. The problem is that LD is defined by
OpenWRT as *-ld.

Forcing the LD env for configure and make solves the problem.
Also, the patch that modified ld call to match what *-ld provides
is not needed anymore.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Luiz Angelo Daros de Luca 10 lat temu
rodzic
commit
9e673f2a4b
2 zmienionych plików z 7 dodań i 15 usunięć
  1. 7
    3
      libs/libvpx/Makefile
  2. 0
    12
      libs/libvpx/patches/001-remove_Wl.patch

+ 7
- 3
libs/libvpx/Makefile Wyświetl plik

@@ -23,7 +23,6 @@ PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
23 23
 PKG_LICENSE:=BSD-3-Clause
24 24
 PKG_LICENSE_FILES:=LICENSE
25 25
 
26
-#PKG_FIXUP:=autoreconf
27 26
 PKG_INSTALL:=1
28 27
 
29 28
 include $(INCLUDE_DIR)/package.mk
@@ -55,9 +54,14 @@ ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
55 54
 CONFIGURE_ARGS += --enable-small
56 55
 endif
57 56
 
57
+# libvpx expects gcc as linker but uses $LD if provided
58
+# However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
58 59
 CONFIGURE_VARS += \
59
-    CROSS=$(GNU_TARGET_NAME)\
60
-    extralibs="-lc -lgcc_s"
60
+    CROSS=$(GNU_TARGET_NAME) \
61
+	LD="$(TARGET_CC)" \
62
+
63
+MAKE_FLAGS += \
64
+	LD="$(TARGET_CC)" \
61 65
 
62 66
 define Build/InstallDev
63 67
 	$(INSTALL_DIR) $(1)/usr/include/vpx/

+ 0
- 12
libs/libvpx/patches/001-remove_Wl.patch Wyświetl plik

@@ -1,12 +0,0 @@
1
---- libvpx-1.3.0/build/make/Makefile.old	2014-12-06 02:17:06.648714353 -0200
2
-+++ libvpx-1.3.0/build/make/Makefile	2014-12-06 02:17:16.096555499 -0200
3
-@@ -268,8 +268,8 @@
4
- $(1):
5
- 	$(if $(quiet),@echo "    [LD] $$@")
6
- 	$(qexec)$$(LD) -shared $$(LDFLAGS) \
7
--            -Wl,--no-undefined -Wl,-soname,$$(SONAME) \
8
--            -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
9
-+            --no-undefined -soname $$(SONAME) \
10
-+            --version-script $$(EXPORTS_FILE) -o $$@ \
11
-             $$(filter %.o,$$^) $$(extralibs)
12
- endef