summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2016-02-23 11:28:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-09 17:00:27 +0000
commit007c284cb83cf5d98f3e4f605244ca6f1d46caea (patch)
tree32efe1a38e908bdc64ac59cad5f7b5e6b2d99ecf /meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
parenta27ca6da59e6939a5bbab641236f7f792c03694f (diff)
downloadpoky-007c284cb83cf5d98f3e4f605244ca6f1d46caea.tar.gz
rpm: Uprev to rpm-5.4.16 (pre) and rpm-5.4+cvs to current CVS head
meta/lib/oe/package_manager.py was also updated. This ensures that any diagnostic messages are ignored from the output of rpmresolve. The patches have been split into bug fixes (things that belong upstream) and local changes that are OE specific. The following patches are obsolete and have been removed: rpm-remove-sykcparse-decl.patch fstack-protector-configure-check.patch rpm-disable-Wno-override-init.patch rpm-lua-fix-print.patch rpm-rpmpgp-fix.patch verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch (From OE-Core rev: ee97e53fcceabc6ef4ddc68f38c5fa0e05c5d9a8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch b/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
new file mode 100644
index 0000000000..e25c5aa353
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
@@ -0,0 +1,64 @@
1configure.ac: Check if the current compiler supports the transactions
2
3Some distributions appear to have compilers that are built without support
4for transactions, even though they are GCC 4.7 or newer.
5
6Upstream-Status: Pending
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10Index: rpm-5.4.15/configure.ac
11===================================================================
12--- rpm-5.4.15.orig/configure.ac
13+++ rpm-5.4.15/configure.ac
14@@ -425,9 +425,34 @@ dnl # --- other optimizations
15 rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
16 dnl # rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
17
18- if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
19- rpm_CFLAGS_ADD([-fgnu-tm], [RPM_CFLAGS])
20- fi
21+dnl # Check if the current gcc supports -fgnu-tm and __transaction_atomic
22+AC_MSG_CHECKING([If the compiler supports __transaction_atomic])
23+save_CFLAGS="$CFLAGS"
24+save_LDFLAGS="$LDFLAGS"
25+CFLAGS="${CFLAGS} -fgnu-tm -litm"
26+LDFLAGS="${LDFLAGS} -litm"
27+AC_LINK_IFELSE([AC_LANG_SOURCE([[
28+int
29+main()
30+{
31+#if !__clang__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) /* XXX gud enuf? */
32+ int i = 0;
33+ __transaction_atomic { i++; }
34+#else
35+# error Compiler does not support __transaction_atomic
36+#endif
37+ return 0;
38+}
39+]])], [
40+ AC_DEFINE([HAVE_GNUC_TM_ATOMIC], [1],
41+ [Define to 1 if the compiler supports __transaction_atomic.])
42+ AC_MSG_RESULT([yes])
43+], [
44+ CFLAGS="$save_CFLAGS"
45+ LDFLAGS="$save_LDFLAGS"
46+ AC_MSG_RESULT([no])
47+])
48+
49
50 dnl # --- options below are added to RPM_CFLAGS but _NOT_ added to CFLAGS
51 CPPFLAGS="$CPPFLAGS $RPM_CPPFLAGS"
52Index: rpm-5.4.15/rpmio/rpmutil.h
53===================================================================
54--- rpm-5.4.15.orig/rpmio/rpmutil.h
55+++ rpm-5.4.15/rpmio/rpmutil.h
56@@ -105,7 +105,7 @@
57 # define RPM_GNUC_INTERNAL
58 #endif
59
60-#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ >= 7 /* XXX gud enuf? */
61+#ifdef HAVE_GNUC_TM_ATOMIC
62 # define RPM_GNUC_TM_SAFE __attribute__((transaction_safe))
63 # define RPM_GNUC_TM_PURE __attribute__((transaction_pure))
64 # define RPM_GNUC_TM_CALLABLE __attribute__((transaction_callable))