libvpx: force to use gcc as linker 663/head
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Mon, 15 Dec 2014 20:29:57 +0000 (18:29 -0200)
committerLuiz Angelo Daros de Luca <luizluca@gmail.com>
Mon, 15 Dec 2014 20:34:07 +0000 (18:34 -0200)
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>
libs/libvpx/Makefile
libs/libvpx/patches/001-remove_Wl.patch [deleted file]

index 58ad08f4c3f8c6d495fa2d44544139f32380a5d2..4d8bb46b69a72233e20e396832e5288b4b81106e 100644 (file)
@@ -23,7 +23,6 @@ PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-#PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -55,9 +54,14 @@ ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
 CONFIGURE_ARGS += --enable-small
 endif
 
+# libvpx expects gcc as linker but uses $LD if provided
+# However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
 CONFIGURE_VARS += \
-    CROSS=$(GNU_TARGET_NAME)\
-    extralibs="-lc -lgcc_s"
+    CROSS=$(GNU_TARGET_NAME) \
+       LD="$(TARGET_CC)" \
+
+MAKE_FLAGS += \
+       LD="$(TARGET_CC)" \
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/vpx/
diff --git a/libs/libvpx/patches/001-remove_Wl.patch b/libs/libvpx/patches/001-remove_Wl.patch
deleted file mode 100644 (file)
index cac3d84..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- libvpx-1.3.0/build/make/Makefile.old       2014-12-06 02:17:06.648714353 -0200
-+++ libvpx-1.3.0/build/make/Makefile   2014-12-06 02:17:16.096555499 -0200
-@@ -268,8 +268,8 @@
- $(1):
-       $(if $(quiet),@echo "    [LD] $$@")
-       $(qexec)$$(LD) -shared $$(LDFLAGS) \
--            -Wl,--no-undefined -Wl,-soname,$$(SONAME) \
--            -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
-+            --no-undefined -soname $$(SONAME) \
-+            --version-script $$(EXPORTS_FILE) -o $$@ \
-             $$(filter %.o,$$^) $$(extralibs)
- endef