3 cairo fails to build with gcc 4.9 due to a bad interaction of cairo
4 modules with the LTO mechanism. The suggested workaround is to pass
6 https://bugs.freedesktop.org/show_bug.cgi?id=77060 for the upstream
8 https://bugs.archlinux.org/task/40313?project=1&openedfrom=-1+week for
9 the ArchLinux bug report.
11 This patch passes -ffat-lto-objects when gcc understands this option,
12 in order to provide compatibility with gcc versions older than 4.8,
13 which did not provide this option, but are anyway unaffected by the
16 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19 ===================================================================
23 m4_include(build/configure.ac.pthread) dnl checks for pthreads
27 +CFLAGS=-ffat-lto-objects
28 +AC_MSG_CHECKING([whether CC supports -ffat-lto-objects])
29 +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
30 + [AC_MSG_RESULT([yes])]
31 + [LTO_CFLAGS=-ffat-lto-objects],
32 + [AC_MSG_RESULT([no])]
34 +CFLAGS="${old_CFLAGS} ${LTO_CFLAGS}"
36 dnl ===========================================================================
38 AC_CHECK_LIB(z, compress,