From a69c3fd5625bd974ad3d838836cd125e5f101b28 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sun, 8 Jan 2012 11:03:53 -0800 Subject: [PATCH] [Bug 44584] Build fails with Apple's llvm-gcc-4.2 Conditionally add the "-flto" flag only if $CC != llvm-gcc-4.2 --- build/configure.ac.warnings | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings index 3eb0104..a2a8a6d 100644 --- a/build/configure.ac.warnings +++ b/build/configure.ac.warnings @@ -29,8 +29,10 @@ MAYBE_WARN="$MAYBE_WARN -erroff=E_ENUM_TYPE_MISMATCH_ARG \ dnl We also abuse the warning-flag facility to enable other compiler dnl options. Namely, the following: -MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common -flto" - +MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common" +if [ $CC ~= "llvm-gcc-4.2" ]; then + MAYBE_WARN="$MAYBE_WARN -flto" +fi dnl Also to turn various gcc/glibc-specific preprocessor checks MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2" -- 1.7.5.4