From ad240fecc0494d4a1ebf5ad2762da67f8c14f96a Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 25 May 2008 23:17:39 +0000 Subject: [PATCH] floating point rules to ensure same output with release and debug --- src/Jamrules | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Jamrules b/src/Jamrules index fad0b9aa1..1e3d84cc4 100644 --- a/src/Jamrules +++ b/src/Jamrules @@ -14,6 +14,7 @@ if ! $(HAVE_LUA) { if ! $(CPU) { CPU = pentium2 ; + ARCH = -march=$(CPU) -mtune=$(CPU) -mmmx -mieee-fp ; } if $(DISTCC_HOSTS) { @@ -142,12 +143,15 @@ rule TargetDirectory if $(DEBUG) = 1 { SubDirCcFlags -ggdb ; SubDirC++Flags -ggdb ; - OPTIM = -O0 ; + OPTIM = -O0 -ffloat-store ; } else { - SubDirCcFlags -DNDEBUG -march=$(CPU) -mtune=$(CPU) ; - SubDirC++Flags -DNDEBUG -march=$(CPU) -mtune=$(CPU) ; + SubDirCcFlags -DNDEBUG ; + SubDirC++Flags -DNDEBUG ; + OPTIM = -Os -ffloat-store ; } + SubDirCcFlags $(ARCH) ; + SubDirC++Flags $(ARCH) ; } if ! $(DEBUG) {