diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-05-18 19:14:30 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-05-18 23:28:21 +0200 |
commit | f4c093f2d08a44686f540959f28cb600c2c61fb3 (patch) | |
tree | f1c56afb23e473977bc25360ad3f8aa520b27ad3 /package/cairo | |
parent | 5ac49038daff0a9aaf5cbcddca6c87f685e07375 (diff) | |
download | buildroot-f4c093f2d08a44686f540959f28cb600c2c61fb3.tar.gz buildroot-f4c093f2d08a44686f540959f28cb600c2c61fb3.zip |
cairo: fix build issue with gcc 4.9
Fixes:
http://autobuild.buildroot.org/results/277/277038de62d6262576a63b213374a33357a8333b/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/cairo')
-rw-r--r-- | package/cairo/cairo-005-fix-gcc-49-build.patch | 38 | ||||
-rw-r--r-- | package/cairo/cairo.mk | 1 |
2 files changed, 39 insertions, 0 deletions
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 0000000000..112c9ea053 --- /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 <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, diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk index 43238cac66..789dfa7ba2 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 \ |