summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-03-16 11:38:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-20 18:54:55 +0000
commita31f87a1ffdc559a21f4738ec633329b02fcd919 (patch)
treeabee12dde29f58a3901da1054d7d176ea2295e04 /meta/recipes-core
parent3cda6c0bd175282903079dea4affb3fcd290f137 (diff)
downloadpoky-a31f87a1ffdc559a21f4738ec633329b02fcd919.tar.gz
util-linux: backport patch to skip build of unused objects
util-linux-uuid does not need libtcolors.a and libcommon.a but they get build regardless. Backport a patch from upstream to skip them and save some compilation time. https://github.com/karelzak/util-linux/commit/c65953d72bbc7412f32e566d9fa6e780d84f0696 (From OE-Core rev: 9353c4338acd51e1bc4172554fca018c4044829f) Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc1
-rw-r--r--meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch49
2 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index b4f817ed82..4031c586c9 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -37,5 +37,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz
37 file://run-ptest \ 37 file://run-ptest \
38 file://display_testname_for_subtest.patch \ 38 file://display_testname_for_subtest.patch \
39 file://avoid_parallel_tests.patch \ 39 file://avoid_parallel_tests.patch \
40 file://Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch \
40 " 41 "
41SRC_URI[sha256sum] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f" 42SRC_URI[sha256sum] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch b/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch
new file mode 100644
index 0000000000..272518914e
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch
@@ -0,0 +1,49 @@
1Author: Luca Boccassi <luca.boccassi@microsoft.com>
2Description: Automake: use EXTRA_LTLIBRARIES instead of noinst_LTLIBRARIES
3 noinst_LTLIBRARIES causes the libraries to be always built
4 unconditionally. EXTRA_LTLIBRARIES causes them to be built
5 only if other build target needs them.
6 In other words, avoid building libcommon.a and libtcolors.a
7 unless they are needed by another library/executable and
8 save some build time.
9Upstream-Status: backport, commit:c65953d72bbc7412f32e566d9fa6e780d84f0696
10--- a/Makefile.am
11+++ b/Makefile.am
12@@ -39,7 +39,7 @@ bashcompletiondir = @bashcompletiondir@
13
14 dist_noinst_HEADERS =
15 noinst_PROGRAMS =
16-noinst_LTLIBRARIES =
17+EXTRA_LTLIBRARIES =
18 usrbin_exec_PROGRAMS =
19 usrsbin_exec_PROGRAMS =
20 dist_man_MANS =
21@@ -169,7 +169,7 @@ else
22 edit_cmd += -e 's|@vendordir[@]||g'
23 endif
24
25-CLEANFILES += $(PATHFILES)
26+CLEANFILES += $(PATHFILES) $(EXTRA_LTLIBRARIES)
27 EXTRA_DIST += $(PATHFILES:=.in)
28
29 $(PATHFILES): Makefile
30--- a/lib/Makemodule.am
31+++ b/lib/Makemodule.am
32@@ -9,7 +9,7 @@
33 # Note that you need "make install-strip" (or proper rpm / Debian build)
34 # to generate binaries with only relevant stuff.
35 #
36-noinst_LTLIBRARIES += libcommon.la
37+EXTRA_LTLIBRARIES += libcommon.la
38 libcommon_la_CFLAGS = $(AM_CFLAGS)
39 libcommon_la_SOURCES = \
40 lib/blkdev.c \
41@@ -59,7 +59,7 @@ libcommon_la_SOURCES += lib/sysfs.c
42 endif
43 endif
44
45-noinst_LTLIBRARIES += libtcolors.la
46+EXTRA_LTLIBRARIES += libtcolors.la
47 libtcolors_la_CFLAGS = $(AM_CFLAGS)
48 libtcolors_la_SOURCES = lib/colors.c lib/color-names.c include/colors.h include/color-names.h
49 libtcolors_la_LIBADD =