diff options
author | Amarnath Valluri <amarnath.valluri@intel.com> | 2017-01-23 16:15:24 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-22 11:35:20 +0000 |
commit | b350ef0ceafc1170d4f3ea54fb2fe480f95aee58 (patch) | |
tree | 63be7bf109c116ce1191b8c856a573d134ed44ce /meta/recipes-support/attr | |
parent | ac8db9b30d74e17e8814ea1d6e233abfe1c439b8 (diff) | |
download | poky-b350ef0ceafc1170d4f3ea54fb2fe480f95aee58.tar.gz |
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.
(From OE-Core rev: 2c84649139059b810f28babe9d8d82035fde19ee)
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/attr')
-rw-r--r-- | meta/recipes-support/attr/ea-acl.inc | 2 | ||||
-rw-r--r-- | meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch | 70 |
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 @@ | |||
2 | 2 | ||
3 | SRC_URI += "file://relative-libdir.patch;striplevel=0 \ | 3 | SRC_URI += "file://relative-libdir.patch;striplevel=0 \ |
4 | " | 4 | " |
5 | # This patch should be applied after '(attr\|acl)-Missing-configure.ac.patch' | ||
6 | SRC_URI_append = " file://0001-Added-configure-option-to-enable-disable-static-libr.patch" | ||
5 | 7 | ||
6 | inherit autotools-brokensep gettext | 8 | inherit autotools-brokensep gettext |
7 | 9 | ||
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 @@ | |||
1 | From 01256c61ba126449c46dd4ab5d5e145488b981fa Mon Sep 17 00:00:00 2001 | ||
2 | From: Amarnath Valluri <amarnath.valluri@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 13:25:13 +0200 | ||
4 | Subject: [PATCH] Added configure option to enable/disable static library | ||
5 | |||
6 | Create static library archive only in case of --enable-static. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> | ||
11 | --- | ||
12 | configure.ac | 6 ++++++ | ||
13 | include/builddefs.in | 1 + | ||
14 | include/buildmacros | 3 +++ | ||
15 | 3 files changed, 10 insertions(+) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index b966d0e..e48268b 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -26,6 +26,12 @@ AC_ARG_ENABLE(shared, | ||
22 | enable_shared=yes) | ||
23 | AC_SUBST(enable_shared) | ||
24 | |||
25 | +AC_ARG_ENABLE(static, | ||
26 | +[ --enable-static=[yes/no] Enable use of static libraries [default=yes]],, | ||
27 | + enable_static=yes) | ||
28 | +AC_SUBST(enable_static) | ||
29 | + | ||
30 | + | ||
31 | AC_ARG_ENABLE(gettext, | ||
32 | [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],, | ||
33 | enable_gettext=yes) | ||
34 | diff --git a/include/builddefs.in b/include/builddefs.in | ||
35 | index d9931db..3b3dbd2 100644 | ||
36 | --- a/include/builddefs.in | ||
37 | +++ b/include/builddefs.in | ||
38 | @@ -71,6 +71,7 @@ RPMBUILD = @rpmbuild@ | ||
39 | RPM_VERSION = @rpm_version@ | ||
40 | |||
41 | ENABLE_SHARED = @enable_shared@ | ||
42 | +ENABLE_STATIC = @enable_static@ | ||
43 | ENABLE_GETTEXT = @enable_gettext@ | ||
44 | |||
45 | HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ | ||
46 | diff --git a/include/buildmacros b/include/buildmacros | ||
47 | index 39fa7e2..b0f25c5 100644 | ||
48 | --- a/include/buildmacros | ||
49 | +++ b/include/buildmacros | ||
50 | @@ -80,6 +80,7 @@ endif | ||
51 | # /usr/lib. | ||
52 | ifeq ($(ENABLE_SHARED),yes) | ||
53 | INSTALL_LTLIB_DEV = \ | ||
54 | + set -x; \ | ||
55 | cd $(TOPDIR)/$(LIBNAME)/.libs; \ | ||
56 | ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \ | ||
57 | ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \ | ||
58 | @@ -88,7 +89,9 @@ INSTALL_LTLIB_DEV = \ | ||
59 | ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \ | ||
60 | if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \ | ||
61 | rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ | ||
62 | + if test "$(ENABLE_STATIC)" = "yes" ; then \ | ||
63 | ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ | ||
64 | + fi ;\ | ||
65 | ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ | ||
66 | rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ | ||
67 | ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \ | ||
68 | -- | ||
69 | 2.7.4 | ||
70 | |||