• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/cairo/0005-fix-gcc-49-build.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
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 <thomas.petazzoni@free-electrons.com>
​
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,
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.