summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmarnath Valluri <amarnath.valluri@intel.com>2017-01-23 16:15:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-21 22:43:00 +0000
commit2c84649139059b810f28babe9d8d82035fde19ee (patch)
treeead34e7ccc69ece01255b58e53e3974573018f67
parent333e959448c2bc0d2c472e0b7d1dab606ab723e6 (diff)
downloadopenembedded-core-2c84649139059b810f28babe9d8d82035fde19ee.tar.gz
openembedded-core-2c84649139059b810f28babe9d8d82035fde19ee.tar.bz2
openembedded-core-2c84649139059b810f28babe9d8d82035fde19ee.zip
attr/acl: Do not create broken static library link when not needed
Stop creating the static library archive(liba(ttr|cl).a) when --disable-static configure option used. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
-rw-r--r--meta/recipes-support/attr/ea-acl.inc2
-rw-r--r--meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch70
2 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
index a88ce90119..c587b3caca 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -2,6 +2,8 @@
SRC_URI += "file://relative-libdir.patch;striplevel=0 \
"
+# This patch should be applied after '(attr\|acl)-Missing-configure.ac.patch'
+SRC_URI_append = " file://0001-Added-configure-option-to-enable-disable-static-libr.patch"
inherit autotools-brokensep gettext
diff --git a/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch b/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
new file mode 100644
index 0000000000..1c1159f2c9
--- /dev/null
+++ b/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
@@ -0,0 +1,70 @@
+From 01256c61ba126449c46dd4ab5d5e145488b981fa Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Mon, 23 Jan 2017 13:25:13 +0200
+Subject: [PATCH] Added configure option to enable/disable static library
+
+Create static library archive only in case of --enable-static.
+
+Upstream-Status: Pending
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ configure.ac | 6 ++++++
+ include/builddefs.in | 1 +
+ include/buildmacros | 3 +++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index b966d0e..e48268b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,6 +26,12 @@ AC_ARG_ENABLE(shared,
+ enable_shared=yes)
+ AC_SUBST(enable_shared)
+
++AC_ARG_ENABLE(static,
++[ --enable-static=[yes/no] Enable use of static libraries [default=yes]],,
++ enable_static=yes)
++AC_SUBST(enable_static)
++
++
+ AC_ARG_ENABLE(gettext,
+ [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
+ enable_gettext=yes)
+diff --git a/include/builddefs.in b/include/builddefs.in
+index d9931db..3b3dbd2 100644
+--- a/include/builddefs.in
++++ b/include/builddefs.in
+@@ -71,6 +71,7 @@ RPMBUILD = @rpmbuild@
+ RPM_VERSION = @rpm_version@
+
+ ENABLE_SHARED = @enable_shared@
++ENABLE_STATIC = @enable_static@
+ ENABLE_GETTEXT = @enable_gettext@
+
+ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
+diff --git a/include/buildmacros b/include/buildmacros
+index 39fa7e2..b0f25c5 100644
+--- a/include/buildmacros
++++ b/include/buildmacros
+@@ -80,6 +80,7 @@ endif
+ # /usr/lib.
+ ifeq ($(ENABLE_SHARED),yes)
+ INSTALL_LTLIB_DEV = \
++ set -x; \
+ cd $(TOPDIR)/$(LIBNAME)/.libs; \
+ ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
+ ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \
+@@ -88,7 +89,9 @@ INSTALL_LTLIB_DEV = \
+ ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
+ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
+ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
++ if test "$(ENABLE_STATIC)" = "yes" ; then \
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
++ fi ;\
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
+ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
+ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
+--
+2.7.4
+