From aa01c3e72e2115d0caa4999e5b2e762544db7bf2 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 18 Apr 2008 09:40:53 +0000 Subject: [PATCH] Disable strict aliasing on GCCs newer than 2 until we have analyzed and fixed all aliasing issues. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25016 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/BuildSetup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index 4fa705d8c0..1896f2a352 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -156,6 +156,12 @@ if $(HAIKU_USE_GCC_PIPE) = 1 { HAIKU_GCC_BASE_FLAGS = -pipe ; } +# disable strict aliasing on anything newer than gcc 2 as it may lead to unexpected results. +# TODO: remove this when all code has been analyzed/fixed with regard to aliasing. +if $(HAIKU_GCC_VERSION[1]) >= 3 { + HAIKU_GCC_BASE_FLAGS += -fno-strict-aliasing ; +} + # override gcc 2.95.3's header directory -- strictly necessary only when using # the BeOS native compiler (since its headers are incompatible), but it doesn't # harm for the cross-compiler either.