1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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"
|