libqb/0001-build-configure-run-attribute-section-test-through-r.patch
Jan Pokorný f488b421e5
1.0.2-4 - Rebuilt + (temporary) fix logging silently out of order
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
- Mitigate changed treatment of orphaned sections in ld.bfd/binutils-2.29,
  resulting in logging facility silently out of order (rhbz#1478089)

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2017-08-10 23:06:30 +02:00

50 lines
1.7 KiB
Diff

From 37923941f659b1d264e33da188a1c0624cbd204b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Date: Thu, 10 Aug 2017 17:13:32 +0200
Subject: [PATCH 1/2] build: configure: run attribute section test through
run-time assertion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It unclear why the apparently run-time test hasn't been set to that
effect, but only the compilability was tested so far.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
---
configure.ac | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5ba4f99..fd37466 100644
--- a/configure.ac
+++ b/configure.ac
@@ -620,15 +620,18 @@ AC_SUBST(HAVE_SLOW_TESTS)
if test "x${GCC}" = xyes; then
AC_MSG_CHECKING([whether GCC supports __attribute__((section()) + ld supports orphan sections])
if test "x${ac_cv_link_attribute_section}" = x ; then
- AC_TRY_LINK([#include <assert.h>
- extern void * __start___verbose, * __stop___verbose;],
- [static int my_var __attribute__((section("__verbose"))) = 5;
+ AC_TRY_RUN(
+ AC_LANG_PROGRAM(
+ [[#include <assert.h>
+ extern void * __start___verbose, * __stop___verbose;]],
+ [[static int my_var __attribute__((section("__verbose"))) = 5;
if (__start___verbose == __stop___verbose) assert(0);
if (my_var == 5) return 0;
else return -1;
- ],
- [gcc_has_attribute_section=yes],
- [gcc_has_attribute_section=no])
+ ]]),
+ [gcc_has_attribute_section=yes],
+ [gcc_has_attribute_section=no]
+ )
else
gcc_has_attribute_section=${ac_cv_link_attribute_section}
fi
--
2.14.0