From patchwork Tue Jan 6 22:29:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 425859 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 9B19A1400DD for ; Wed, 7 Jan 2015 09:29:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7DC8E32D55; Tue, 6 Jan 2015 22:29:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Emq7AGX4VfQG; Tue, 6 Jan 2015 22:29:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DC56832C20; Tue, 6 Jan 2015 22:29:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A90071C287F for ; Tue, 6 Jan 2015 22:29:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A54DD8B298 for ; Tue, 6 Jan 2015 22:29:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eLqWgvDPkVEp for ; Tue, 6 Jan 2015 22:29:42 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by hemlock.osuosl.org (Postfix) with ESMTPS id 3DC068B286 for ; Tue, 6 Jan 2015 22:29:42 +0000 (UTC) Received: from localhost.localdomain (unknown [81.57.22.125]) by smtp1-g21.free.fr (Postfix) with ESMTP id 8ADB1940045; Tue, 6 Jan 2015 23:28:08 +0100 (CET) From: Romain Naour To: buildroot@buildroot.org Date: Tue, 6 Jan 2015 23:29:37 +0100 Message-Id: <1420583377-1299-1-git-send-email-romain.naour@openwide.fr> X-Mailer: git-send-email 1.9.3 Subject: [Buildroot] [PATCH v3] package/dvb-app: handle static/shared only build X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Also remove tests since they require static libraries. Signed-off-by: Romain Naour --- v3: use positive logic for static/shared libraries handling (Yann E. Morin) v2: remove tests (ThomasP) rework static/shared handling logic --- .../0003-handle-static-shared-only-build.patch | 44 ++++++++++++++++++++++ .../dvb-apps/0003-support-static-only-build.patch | 20 ---------- package/dvb-apps/0004-Makefile-remove-test.patch | 27 +++++++++++++ package/dvb-apps/dvb-apps.mk | 4 +- 4 files changed, 74 insertions(+), 21 deletions(-) create mode 100644 package/dvb-apps/0003-handle-static-shared-only-build.patch delete mode 100644 package/dvb-apps/0003-support-static-only-build.patch create mode 100644 package/dvb-apps/0004-Makefile-remove-test.patch diff --git a/package/dvb-apps/0003-handle-static-shared-only-build.patch b/package/dvb-apps/0003-handle-static-shared-only-build.patch new file mode 100644 index 0000000..4dc7c68 --- /dev/null +++ b/package/dvb-apps/0003-handle-static-shared-only-build.patch @@ -0,0 +1,44 @@ +From a826c7c722db40bfedf00e51ce38411550ae8216 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 25 Dec 2014 19:22:16 +0100 +Subject: [PATCH] Make.rules: Handle static/shared only build + +Do not build .a library when enable_static is set to "no" +Do not build .so library when enable_shared is set to "no" + +Signed-off-by: Romain Naour +--- + Make.rules | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/Make.rules b/Make.rules +index 3410d7b..d274e16 100644 +--- a/Make.rules ++++ b/Make.rules +@@ -9,7 +9,13 @@ ifneq ($(lib_name),) + CFLAGS_LIB ?= -fPIC + CFLAGS += $(CFLAGS_LIB) + +-libraries = $(lib_name).so $(lib_name).a ++ifneq ($(enable_static),no) ++libraries += $(lib_name).a ++endif ++ ++ifneq ($(enable_shared),no) ++libraries += $(lib_name).so ++endif + + .PHONY: library + +@@ -23,7 +29,7 @@ prerequisites = $(subst .o,.d,$(objects)) $(addsuffix .d,$(binaries)) + + .PHONY: clean install + +-ifeq ($(static),1) ++ifneq ($(enable_static),no) + LDFLAGS += -static + endif + +-- +1.9.3 + diff --git a/package/dvb-apps/0003-support-static-only-build.patch b/package/dvb-apps/0003-support-static-only-build.patch deleted file mode 100644 index 236f1a3..0000000 --- a/package/dvb-apps/0003-support-static-only-build.patch +++ /dev/null @@ -1,20 +0,0 @@ -Make.rules: don't build .so libraries when static=1 - -Signed-off-by: Thomas Petazzoni - -Index: b/Make.rules -=================================================================== ---- a/Make.rules -+++ b/Make.rules -@@ -9,7 +9,11 @@ - CFLAGS_LIB ?= -fPIC - CFLAGS += $(CFLAGS_LIB) - -+ifeq ($(static),1) -+libraries = $(lib_name).a -+else - libraries = $(lib_name).so $(lib_name).a -+endif - - .PHONY: library - diff --git a/package/dvb-apps/0004-Makefile-remove-test.patch b/package/dvb-apps/0004-Makefile-remove-test.patch new file mode 100644 index 0000000..45bfad9 --- /dev/null +++ b/package/dvb-apps/0004-Makefile-remove-test.patch @@ -0,0 +1,27 @@ +From c578772d6abc5fdf3ec83f632c371373e5baf9f1 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 26 Dec 2014 01:04:58 +0100 +Subject: [PATCH] Makefile: remove test + +Tests needs static libraries, remove them for shared only build. + +Signed-off-by: Romain Naour +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 65a2273..105c460 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,6 @@ DVB_API_MINOR := $(word 3, $(shell grep -m1 "DVB_API_VERSION_MINOR" $(VERSION_FI + + all clean install: + $(MAKE) -C lib $@ +- $(MAKE) -C test $@ + $(MAKE) -C util $@ + + update: +-- +1.9.3 + diff --git a/package/dvb-apps/dvb-apps.mk b/package/dvb-apps/dvb-apps.mk index 892af63..2d816c5 100644 --- a/package/dvb-apps/dvb-apps.mk +++ b/package/dvb-apps/dvb-apps.mk @@ -16,7 +16,9 @@ DVB_APPS_LDLIBS += -liconv endif ifeq ($(BR2_STATIC_LIBS),y) -DVB_APPS_MAKE_OPTS += static=1 +DVB_APPS_MAKE_OPTS += enable_shared=no +else ifeq ($(BR2_SHARED_LIBS),y) +DVB_APPS_MAKE_OPTS += enable_static=no endif DVB_APPS_INSTALL_STAGING = YES