From patchwork Sun Aug 17 17:22:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 380618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id E47A514013E for ; Mon, 18 Aug 2014 03:23:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 42A7025356; Sun, 17 Aug 2014 17:23:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hsWndlg7DZOW; Sun, 17 Aug 2014 17:23:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C0BB02CC95; Sun, 17 Aug 2014 17:22:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 159AD1BFA1D for ; Sun, 17 Aug 2014 17:22:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1277F25356 for ; Sun, 17 Aug 2014 17:22:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1e1eFj1U6E5s for ; Sun, 17 Aug 2014 17:22:56 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by silver.osuosl.org (Postfix) with ESMTPS id 6D5A52E87E for ; Sun, 17 Aug 2014 17:22:56 +0000 (UTC) Received: from localhost.localdomain (unknown [81.57.22.125]) by smtp6-g21.free.fr (Postfix) with ESMTP id F07E182291; Sun, 17 Aug 2014 19:22:52 +0200 (CEST) From: Romain Naour To: buildroot@buildroot.net Date: Sun, 17 Aug 2014 19:22:11 +0200 Message-Id: <1408296131-15354-1-git-send-email-romain.naour@openwide.fr> X-Mailer: git-send-email 1.9.3 Subject: [Buildroot] [PATCH 1/1] package/oprofile: fix configure test with gcc 4.9.x X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Backport the upstream patch that fix a configure test breaked with gcc 4.9.x. This patch must be removed with the next version bump. Fixes: http://autobuild.buildroot.net/results/f80/f8083f038d0efb7b5becf7810b6fcaf440fb8294/build-end.log Signed-off-by: Romain Naour --- ...e-fix-test-for-synth-check-with-GCC-4.9.0.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/oprofile/oprofile-003-configure-fix-test-for-synth-check-with-GCC-4.9.0.patch diff --git a/package/oprofile/oprofile-003-configure-fix-test-for-synth-check-with-GCC-4.9.0.patch b/package/oprofile/oprofile-003-configure-fix-test-for-synth-check-with-GCC-4.9.0.patch new file mode 100644 index 0000000..24bed98 --- /dev/null +++ b/package/oprofile/oprofile-003-configure-fix-test-for-synth-check-with-GCC-4.9.0.patch @@ -0,0 +1,45 @@ +From cc08b52f8376867121f22e166636779e2a1a6e48 Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen +Date: Mon, 12 May 2014 08:28:46 -0500 +Subject: [PATCH 1/1] configure: fix test-for-synth check with GCC 4.9.0 + +With GCC 4.9.0 oprofile 0.9.9 build fails on non-PPC platfroms because +the "test-for-synth" configure check result is incorrect: There is a NULL +pointer dereference in the test program, so the compiler seems to optimize +the rest of the code away, and the test will always succeed regardless +whether powerpc_elf64_vec/bfd_elf64_powerpc_vec are present or not. +Fix by allocating the referred struct statically. + +While at it, also include stdio.h to avoid a compiler warning. + +[Romain: backport the patch to 0.9.9] + +Signed-off-by: Aaro Koskinen +Signed-off-by: Romain Naour + +Conflicts: + m4/binutils.m4 +--- + m4/binutils.m4 | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/m4/binutils.m4 b/m4/binutils.m4 +index 25fb15a..3486488 100644 +--- a/m4/binutils.m4 ++++ b/m4/binutils.m4 +@@ -27,8 +27,10 @@ if test "$OS" = "Linux"; then + AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library]) + rm -f test-for-synth + AC_LANG_CONFTEST( +- [AC_LANG_PROGRAM([[#include ]], +- [[asymbol * synthsyms; bfd * ibfd = 0; ++ [AC_LANG_PROGRAM([[#include ] ++ [#include ] ++ [static bfd _ibfd;]], ++ [[asymbol * synthsyms; bfd * ibfd = &_ibfd; + long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms); + extern const bfd_target bfd_elf64_powerpc_vec; + extern const bfd_target bfd_elf64_powerpcle_vec; +-- +1.9.3 +