The recent gcc had dropped support of -fforce-mem and it was turned on by default with -O2 flag.

Removing this flag from Makefile.

Risk: This change was tested under gcc4.* x86 platform. gcc 2.7.* or 2.8.* or other platforms were not tested at all.

From: ericli@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4069 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/unixbench/Makefile.patch b/client/tests/unixbench/Makefile.patch
new file mode 100644
index 0000000..cb8f5a0
--- /dev/null
+++ b/client/tests/unixbench/Makefile.patch
@@ -0,0 +1,39 @@
+diff -c -r src/Makefile newsrc/Makefile
+*** src/Makefile	Wed Jul 28 15:05:02 1999
+--- newsrc/Makefile	Mon Jan  4 19:04:45 2010
+***************
+*** 35,50 ****
+  CC=gcc
+  
+  ## For Linux 486/Pentium, GCC 2.7.x and 2.8.x
+! #OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math \
+  #	-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2
+  ## For Linux, GCC previous to 2.7.0
+! #OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math -m486
+  
+! #OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math \
+  #	-m386 -malign-loops=1 -malign-jumps=1 -malign-functions=1
+  
+  ## For Solaris 2, or general-purpose GCC 2.7.x
+! OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math -Wall
+  
+  ## Very generic
+  #OPTON = -O
+--- 35,51 ----
+  CC=gcc
+  
+  ## For Linux 486/Pentium, GCC 2.7.x and 2.8.x
+! # -O2 already turned -fforce-mem
+! OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math \
+  #	-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2
+  ## For Linux, GCC previous to 2.7.0
+! #OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -m486
+  
+! #OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math \
+  #	-m386 -malign-loops=1 -malign-jumps=1 -malign-functions=1
+  
+  ## For Solaris 2, or general-purpose GCC 2.7.x
+! #OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math -Wall
+  
+  ## Very generic
+  #OPTON = -O
diff --git a/client/tests/unixbench/unixbench.py b/client/tests/unixbench/unixbench.py
index 35e85ea..f7ae7c6 100755
--- a/client/tests/unixbench/unixbench.py
+++ b/client/tests/unixbench/unixbench.py
@@ -18,6 +18,7 @@
         os.chdir(self.srcdir)
 
         utils.system('patch -p1 < ../unixbench.patch')
+        utils.system('patch -p1 < ../Makefile.patch')
         utils.system('make')