mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
29 lines
795 B
Diff
29 lines
795 B
Diff
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
|
|
index f984eb2..15b3da2 100644
|
|
--- a/build/configure.ac.warnings
|
|
+++ b/build/configure.ac.warnings
|
|
@@ -38,13 +38,18 @@ dnl options. Namely, the following:
|
|
|
|
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([],[
|
|
+AC_ARG_ENABLE(lto,
|
|
+ AS_HELP_STRING([--disable-lto],
|
|
+ [Do not try to use Link-Time Optimization]))
|
|
+if test "x$enable_lto" != "xno"; then
|
|
+ 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
|
|
|
|
MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
|
|
|
|
|