diff options
author | Timothy Gu <timothygu99@gmail.com> | 2014-05-09 03:23:21 (GMT) |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2014-05-09 03:23:21 (GMT) |
commit | 05aa359b7a2d91eb3601a25e6ad04b22cd610bbe (patch) | |
tree | 476c2a950c22951bd04b299fd55a6a8590e27049 /src | |
parent | e093687cea3cb4f3d6dedb049d37e757ef604986 (diff) | |
download | mxe-05aa359b7a2d91eb3601a25e6ad04b22cd610bbe.zip mxe-05aa359b7a2d91eb3601a25e6ad04b22cd610bbe.tar.gz mxe-05aa359b7a2d91eb3601a25e6ad04b22cd610bbe.tar.bz2 |
cairo: disable LTO
Should fix part of #403.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-3-lto.patch | 46 | ||||
-rw-r--r-- | src/cairo.mk | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/src/cairo-3-lto.patch b/src/cairo-3-lto.patch new file mode 100644 index 0000000..4c11a49 --- /dev/null +++ b/src/cairo-3-lto.patch @@ -0,0 +1,46 @@ +This file is part of MXE. +See index.html for further information. + +Add an option to disable LTO which breaks static linking. + +diff -Naur cairo-1.12.16/build/configure.ac.warnings cairo-1.12.16.new/build/configure.ac.warnings +--- cairo-1.12.16/build/configure.ac.warnings 2013-08-26 08:07:21.000000000 -0700 ++++ cairo-1.12.16.new/build/configure.ac.warnings 2014-05-08 20:08:11.296371571 -0700 +@@ -36,14 +36,30 @@ + dnl We also abuse the warning-flag facility to enable other compiler + dnl options. Namely, the following: + +-dnl -flto working really needs a test link, not just a compile ++AC_ARG_ENABLE(lto, ++ AS_HELP_STRING([--enable-lto], ++ [Enable link-time optimization.]), [ ++if test "x$enableval" = "xyes"; then ++ dnl -flto working really needs a test link, not just a compile + +-safe_MAYBE_WARN="$MAYBE_WARN" +-MAYBE_WARN="$MAYBE_WARN -flto" +-AC_TRY_LINK([],[ +- int main(int argc, char **argv) { return 0; } +-],[],[ +- MAYBE_WARN="$safe_MAYBE_WARN" ++ safe_MAYBE_WARN="$MAYBE_WARN" ++ MAYBE_WARN="$MAYBE_WARN -flto" ++ AC_TRY_LINK([],[ ++ int main(int argc, char **argv) { return 0; } ++ ],[],[ ++ MAYBE_WARN="$safe_MAYBE_WARN" ++ ]) ++fi ++], [ ++ dnl -flto working really needs a test link, not just a compile ++ ++ safe_MAYBE_WARN="$MAYBE_WARN" ++ MAYBE_WARN="$MAYBE_WARN -flto" ++ AC_TRY_LINK([],[ ++ int main(int argc, char **argv) { return 0; } ++ ],[],[ ++ MAYBE_WARN="$safe_MAYBE_WARN" ++ ]) + ]) + + MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common" diff --git a/src/cairo.mk b/src/cairo.mk index c24d10b..34ce09d 100644 --- a/src/cairo.mk +++ b/src/cairo.mk @@ -21,6 +21,7 @@ define $(PKG)_BUILD $(SED) -i 's,^\(Libs:.*\),\1 @CAIRO_NONPKGCONFIG_LIBS@,' '$(1)/src/cairo.pc.in' cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ + --disable-lto \ --disable-gtk-doc \ --disable-test-surfaces \ --disable-gcov \ |