From bfea096c1876a3a335fa289cff4c733ba36f1f49 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 3 May 2005 16:48:16 +0000 Subject: Don't add '-ip' to CXX_OPTIMISE_FLAGS when using Intel 8.1. This version is known to be buggy when using anonymous namespaces. Omitting the '-ip' option bypasses the problem (without preventing other optimizations). git-svn-id: http://svn.cactuscode.org/flesh/trunk@4038 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/make/known-architectures/linux | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib/make/known-architectures/linux') diff --git a/lib/make/known-architectures/linux b/lib/make/known-architectures/linux index a497a3fa..17ea2b15 100644 --- a/lib/make/known-architectures/linux +++ b/lib/make/known-architectures/linux @@ -371,10 +371,17 @@ else else : ${CXXFLAGS='-restrict'} fi - if test "$host_cpu" = 'ia64' -o "$host_cpu" = 'x86_64'; then - : ${CXX_OPTIMISE_FLAGS='-O2 -ip'} - else - : ${CXX_OPTIMISE_FLAGS='-O3 -ip'} + if test -z ${CXX_OPTIMISE_FLAGS}; then + if test "$host_cpu" = 'ia64' -o "$host_cpu" = 'x86_64'; then + CXX_OPTIMISE_FLAGS='-O2' + else + CXX_OPTIMISE_FLAGS='-O3' + fi + # Intel 8.1 has a bug when using anonymous namespaces + # taking out '-ip' bypasses this optimization bug + if test "`$CXX -V 2>&1 | grep Version | sed 's/.*Version //' | cut -c1-3`" != '8.1'; then + CXX_OPTIMISE_FLAGS="$CXX_OPTIMISE_FLAGS -ip" + fi fi : ${CXX_DEPEND='$(CXX) -M $(CPPFLAGS)'} ;; -- cgit v1.2.3