From patchwork Sun May 18 17:14:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 350004 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B44CB14008D for ; Mon, 19 May 2014 03:14:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2990C88F4B; Sun, 18 May 2014 17:14:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hDHs-MOIIx8z; Sun, 18 May 2014 17:14:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4E71E88547; Sun, 18 May 2014 17:14:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 914381BF9E7 for ; Sun, 18 May 2014 17:14:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8B97F885AE for ; Sun, 18 May 2014 17:14:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cxj9rFzNPRcY for ; Sun, 18 May 2014 17:14:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by fraxinus.osuosl.org (Postfix) with ESMTP id 742308853D for ; Sun, 18 May 2014 17:14:33 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id B6D07813; Sun, 18 May 2014 19:14:35 +0200 (CEST) Received: from localhost (AToulouse-651-1-158-31.w92-136.abo.wanadoo.fr [92.136.201.31]) by mail.free-electrons.com (Postfix) with ESMTPSA id 756146E4; Sun, 18 May 2014 19:14:35 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sun, 18 May 2014 19:14:30 +0200 Message-Id: <1400433270-3386-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.9.3 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH] cairo: fix build issue with gcc 4.9 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 Fixes: http://autobuild.buildroot.org/results/277/277038de62d6262576a63b213374a33357a8333b/ Signed-off-by: Thomas Petazzoni --- package/cairo/cairo-005-fix-gcc-49-build.patch | 38 ++++++++++++++++++++++++++ package/cairo/cairo.mk | 1 + 2 files changed, 39 insertions(+) create mode 100644 package/cairo/cairo-005-fix-gcc-49-build.patch diff --git a/package/cairo/cairo-005-fix-gcc-49-build.patch b/package/cairo/cairo-005-fix-gcc-49-build.patch new file mode 100644 index 0000000..112c9ea --- /dev/null +++ b/package/cairo/cairo-005-fix-gcc-49-build.patch @@ -0,0 +1,38 @@ +Fix build with gcc 4.9 + +cairo fails to build with gcc 4.9 due to a bad interaction of cairo +modules with the LTO mechanism. The suggested workaround is to pass +-ffat-lto-objects. See +https://bugs.freedesktop.org/show_bug.cgi?id=77060 for the upstream +bug report, and +https://bugs.archlinux.org/task/40313?project=1&openedfrom=-1+week for +the ArchLinux bug report. + +This patch passes -ffat-lto-objects when gcc understands this option, +in order to provide compatibility with gcc versions older than 4.8, +which did not provide this option, but are anyway unaffected by the +issue. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -37,6 +37,16 @@ + m4_include(build/configure.ac.pthread) dnl checks for pthreads + AC_CACHE_SAVE + ++old_cflags=$CFLAGS ++CFLAGS=-ffat-lto-objects ++AC_MSG_CHECKING([whether CC supports -ffat-lto-objects]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ [AC_MSG_RESULT([yes])] ++ [LTO_CFLAGS=-ffat-lto-objects], ++ [AC_MSG_RESULT([no])] ++) ++CFLAGS="${old_CFLAGS} ${LTO_CFLAGS}" ++ + dnl =========================================================================== + + AC_CHECK_LIB(z, compress, diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk index 43238ca..789dfa7 100644 --- a/package/cairo/cairo.mk +++ b/package/cairo/cairo.mk @@ -10,6 +10,7 @@ CAIRO_LICENSE = LGPLv2.1+ CAIRO_LICENSE_FILES = COPYING CAIRO_SITE = http://cairographics.org/releases CAIRO_INSTALL_STAGING = YES +CAIRO_AUTORECONF = YES CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ glib_cv_uscore=no ac_cv_func_strtod=yes \