summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPgowda <pgowda.cve@gmail.com>2022-03-02 21:57:00 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-04 17:14:15 +0000
commit967ff0e2af0be0832ab444e388ec04f826c81738 (patch)
tree79ac1204b7a91335372eaea3a0c19abdacf20683
parent6d715aafecc1196b9549b6acaca9e8c7d4e034e8 (diff)
downloadpoky-967ff0e2af0be0832ab444e388ec04f826c81738.tar.gz
binutils: Avoid Race condition in as.info
The race condition in binutils/gas folder was introduced with the following patch. The patch avoids recursive make into the doc folder. It would speed up the build process slightly. However, the as.info is installed twice which resulted in the race condition sometimes. https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bde299e063de090bf36c1fe51874d1e9f4d94c3c On debugging the code, it was found that the issue was related to install-data-local. On further analysis, there is already a patch in binutils that removes install-data-local. On applying the patch as.info is installed once as expected and there’s no possibility of any race condition. https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=9a84a44d5df4618dd616137fa755bd71b7eacc5f Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a84a44d5df4618dd616137fa755bd71b7eacc5f] [YOCTO #14725] (From OE-Core rev: c08a245990eb46906476dc0f6ade0482c7be241d) Signed-off-by: pgowda <pgowda.cve@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.38.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/0013-Avoid-as-info-race-condition.patch75
2 files changed, 76 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.38.inc b/meta/recipes-devtools/binutils/binutils-2.38.inc
index 6d4415048a..4ce74f94bf 100644
--- a/meta/recipes-devtools/binutils/binutils-2.38.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.38.inc
@@ -31,5 +31,6 @@ SRC_URI = "\
31 file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \ 31 file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
32 file://0011-sync-with-OE-libtool-changes.patch \ 32 file://0011-sync-with-OE-libtool-changes.patch \
33 file://0012-Check-for-clang-before-checking-gcc-version.patch \ 33 file://0012-Check-for-clang-before-checking-gcc-version.patch \
34 file://0013-Avoid-as-info-race-condition.patch \
34" 35"
35S = "${WORKDIR}/git" 36S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/0013-Avoid-as-info-race-condition.patch b/meta/recipes-devtools/binutils/binutils/0013-Avoid-as-info-race-condition.patch
new file mode 100644
index 0000000000..3b3d0bb769
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0013-Avoid-as-info-race-condition.patch
@@ -0,0 +1,75 @@
1From 9a84a44d5df4618dd616137fa755bd71b7eacc5f Mon Sep 17 00:00:00 2001
2From: Mike Frysinger <vapier@gentoo.org>
3Date: Sun, 23 Jan 2022 12:44:24 -0500
4Subject: [PATCH] gas: drop old cygnus install hack
5
6This was needed when gas was using the automake cygnus option, but
7this was removed years ago by Simon in d0ac1c44885daf68f631befa37e
8("Bump to autoconf 2.69 and automake 1.15.1"). So delete it here.
9The info pages are already & still installed by default w/out it.
10
11Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a84a44d5df4618dd616137fa755bd71b7eacc5f]
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 gas/Makefile.in | 14 +++++---------
16 gas/doc/local.mk | 4 ----
17 2 files changed, 5 insertions(+), 13 deletions(-)
18
19diff --git a/gas/Makefile.in b/gas/Makefile.in
20index 8f0a56fd8d6..67dac53f68c 100644
21--- a/gas/Makefile.in
22+++ b/gas/Makefile.in
23@@ -1854,7 +1854,7 @@ info: info-recursive
24
25 info-am: $(INFO_DEPS) info-local
26
27-install-data-am: install-data-local install-info-am install-man
28+install-data-am: install-info-am install-man
29
30 install-dvi: install-dvi-recursive
31
32@@ -2008,10 +2008,10 @@ uninstall-man: uninstall-man1
33 distclean-DEJAGNU distclean-compile distclean-generic \
34 distclean-hdr distclean-libtool distclean-tags dvi dvi-am html \
35 html-am html-local info info-am info-local install install-am \
36- install-data install-data-am install-data-local install-dvi \
37- install-dvi-am install-exec install-exec-am install-exec-local \
38- install-html install-html-am install-info install-info-am \
39- install-man install-man1 install-pdf install-pdf-am install-ps \
40+ install-data install-data-am install-dvi install-dvi-am \
41+ install-exec install-exec-am install-exec-local install-html \
42+ install-html-am install-info install-info-am install-man \
43+ install-man1 install-pdf install-pdf-am install-ps \
44 install-ps-am install-strip installcheck installcheck-am \
45 installdirs installdirs-am maintainer-clean \
46 maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
47@@ -2211,10 +2211,6 @@ doc/asconfig.texi: doc/$(CONFIG).texi doc/$(am__dirstamp)
48 $(AM_V_GEN)cp $(srcdir)/doc/$(CONFIG).texi doc/asconfig.texi
49 $(AM_V_at)chmod u+w doc/asconfig.texi
50
51-# We want install to imply install-info as per GNU standards, despite the
52-# cygnus option.
53-install-data-local: install-info
54-
55 # Maintenance
56
57 # We need it for the taz target in ../Makefile.in.
58diff --git a/gas/doc/local.mk b/gas/doc/local.mk
59index c2de441257c..ac205cf08a2 100644
60--- a/gas/doc/local.mk
61+++ b/gas/doc/local.mk
62@@ -101,10 +101,6 @@ CPU_DOCS = \
63 %D%/c-z80.texi \
64 %D%/c-z8k.texi
65
66-# We want install to imply install-info as per GNU standards, despite the
67-# cygnus option.
68-install-data-local: install-info
69-
70 # This one isn't ready for prime time yet. Not even a little bit.
71
72 noinst_TEXINFOS = %D%/internals.texi
73--
742.27.0
75