Some of the CTCS testsuite modules was being compiled
under linux with the flag -static, breaking the build
under F12. As this change won't affect other targets,
took the time and remastered the build fix patches
for the cerberus module.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 client/tests/cerberus/0001-Fix-CTCS2-Build.patch   |  212 ++++++++++++++++++++
 client/tests/cerberus/0001-fix-ctcs2-build.patch   |  174 ----------------
 .../0002-Fix-CTCS2-build-in-64-bit-boxes.patch     |  192 ++++++++++++++++++
 client/tests/cerberus/0002-compile-on-64bit.patch  |  175 ----------------
 client/tests/cerberus/cerberus.py                  |    9 +-
 5 files changed, 409 insertions(+), 353 deletions(-)
 create mode 100644 client/tests/cerberus/0001-Fix-CTCS2-Build.patch
 delete mode 100644 client/tests/cerberus/0001-fix-ctcs2-build.patch
 create mode 100644 
client/tests/cerberus/0002-Fix-CTCS2-build-in-64-bit-boxes.patch
 delete mode 100644 client/tests/cerberus/0002-compile-on-64bit.patch

diff --git a/client/tests/cerberus/0001-Fix-CTCS2-Build.patch 
b/client/tests/cerberus/0001-Fix-CTCS2-Build.patch
new file mode 100644
index 0000000..e5ec037
--- /dev/null
+++ b/client/tests/cerberus/0001-Fix-CTCS2-Build.patch
@@ -0,0 +1,212 @@
+From df9ce2db84fca3902d3688d227a749618304611a Mon Sep 17 00:00:00 2001
+From: Lucas Meneghel Rodrigues <[email protected]>
+Date: Sat, 17 Apr 2010 15:58:41 -0300
+Subject: [PATCH 1/2] Fix CTCS2 Build
+
+* Newer linux distributions don't have asm/page.h therefore
+  we are going to get the page size using the value of
+  _SC_PAGESIZE instead
+* Enable gcc specific makefile options
+* Fixing some 64 bits types
+* Getting rid of static compilation of objects in sort.src
+
+Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
+---
+ runin/src/chartst.c               |    1 +
+ runin/src/memtst.src/maxalloc.c   |    3 ---
+ runin/src/memtst.src/memtst.c     |   22 +++++++++++++---------
+ runin/src/memtst.src/sizeofint.c  |    1 +
+ runin/src/pi_fftc6/Makefile_64bit |   12 ++++++------
+ runin/src/pi_fftc6/config.h       |    4 ++--
+ runin/src/sort.src/Makefile       |    2 +-
+ runin/src/sort.src/error.c        |    1 +
+ 8 files changed, 25 insertions(+), 21 deletions(-)
+
+diff --git a/runin/src/chartst.c b/runin/src/chartst.c
+index 4a20b38..63b1a5a 100644
+--- a/runin/src/chartst.c
++++ b/runin/src/chartst.c
+@@ -9,6 +9,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <signal.h>
++#include <string.h>
+ 
+ void handler(int i) {
+       exit (0);
+diff --git a/runin/src/memtst.src/maxalloc.c b/runin/src/memtst.src/maxalloc.c
+index 5c48356..4863791 100755
+--- a/runin/src/memtst.src/maxalloc.c
++++ b/runin/src/memtst.src/maxalloc.c
+@@ -10,9 +10,6 @@
+ 
+ #if defined(__BSD__)
+       static const size_t PAGE_SIZE = 4096;
+-#else
+-/* this is horribly architecture specific */
+-      #include <asm/page.h>
+ #endif
+ 
+ 
+diff --git a/runin/src/memtst.src/memtst.c b/runin/src/memtst.src/memtst.c
+index f086f28..538f770 100755
+--- a/runin/src/memtst.src/memtst.c
++++ b/runin/src/memtst.src/memtst.c
+@@ -10,8 +10,6 @@
+ 
+ #if defined(__BSD__)
+       static const size_t PAGE_SIZE = 4096;
+-#else
+-      #include <asm/page.h>
+ #endif
+ 
+ /* The verbose global from memtst_main.c */
+@@ -331,6 +329,12 @@ void kmemscan (int *nbuf, int block_size, int offset) {
+       int kmem_file;
+       int d;
+ 
++      /* Newer linux distributions don't have asm/page.h therefore
++       * we are going to get the page size using the value of
++       * _SC_PAGESIZE instead.
++       */
++      u_long page_size = sysconf(_SC_PAGESIZE);
++
+       /* window manipulation, iterator, read retval, etc */
+       int low, high, foo;
+               int rd;
+@@ -353,7 +357,7 @@ void kmemscan (int *nbuf, int block_size, int offset) {
+ 
+       /* Now compute the offset (in chars) of the error from the page
+          boundary. */
+-      fail_page_offset = ((int) (&nbuf[offset])) % PAGE_SIZE;
++      fail_page_offset = ((int) (&nbuf[offset])) % page_size;
+ 
+       kmem_file = open("/proc/kcore",0);
+       if (kmem_file < 0) {
+@@ -370,7 +374,7 @@ void kmemscan (int *nbuf, int block_size, int offset) {
+        * window.
+        */
+       fail_page_offset -= ((offset - low) * sizeof(int));
+-      if (fail_page_offset < 0) fail_page_offset+=PAGE_SIZE;
++      if (fail_page_offset < 0) fail_page_offset+=page_size;
+ 
+       printf("%d %x fail_page_offset\n",fail_page_offset,fail_page_offset);
+ 
+@@ -382,8 +386,8 @@ void kmemscan (int *nbuf, int block_size, int offset) {
+        */     #include <sys/types.h>
+      #include <sys/sysctl.h>
+ 
+-      lseek(kmem_file,pages*PAGE_SIZE+fail_page_offset,SEEK_SET);
+-      phys_addr=pages*PAGE_SIZE+fail_page_offset;
++      lseek(kmem_file,pages*page_size+fail_page_offset,SEEK_SET);
++      phys_addr=pages*page_size+fail_page_offset;
+ 
+       /* We now use lseeks to (hugely) improve the performance of this
+          thing.  Large memory systems were extremely painful before. 
+@@ -396,8 +400,8 @@ void kmemscan (int *nbuf, int block_size, int offset) {
+                       foo = low;      
+                       /* Every time we miss, skip to the next page. */
+                       ++pages;
+-                      
lseek(kmem_file,pages*PAGE_SIZE+fail_page_offset,SEEK_SET);
+-                      phys_addr=pages*PAGE_SIZE+fail_page_offset;
++                      
lseek(kmem_file,pages*page_size+fail_page_offset,SEEK_SET);
++                      phys_addr=pages*page_size+fail_page_offset;
+                       continue;
+               }
+               /* If foo made it to high, we've found it. */
+@@ -410,7 +414,7 @@ void kmemscan (int *nbuf, int block_size, int offset) {
+                       fprintf(stderr, "Possible location of memory failure: 
%p (%dM) on page %d\n",
+                               (void *) failure,
+                               (int) (failure/1024/1024),
+-                              (int) (failure/PAGE_SIZE));
++                              (int) (failure/page_size));
+                       close(kmem_file);
+                       return;
+               } 
+diff --git a/runin/src/memtst.src/sizeofint.c 
b/runin/src/memtst.src/sizeofint.c
+index d1f9cfe..8d0404f 100755
+--- a/runin/src/memtst.src/sizeofint.c
++++ b/runin/src/memtst.src/sizeofint.c
+@@ -1,6 +1,7 @@
+ /* Jason continues to not use autoconf despite the fact he should. */
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ 
+ main ()
+ {
+diff --git a/runin/src/pi_fftc6/Makefile_64bit 
b/runin/src/pi_fftc6/Makefile_64bit
+index de06626..57fe30c 100644
+--- a/runin/src/pi_fftc6/Makefile_64bit
++++ b/runin/src/pi_fftc6/Makefile_64bit
+@@ -1,7 +1,7 @@
+ # ---- for GNU gcc ----
+-#CC = gcc
+-#OFLAGS_FFT = -O6 -ffast-math
+-#OFLAGS_PI = -O6 -ffast-math
++CC = gcc
++OFLAGS_FFT = -O6 -ffast-math
++OFLAGS_PI = -O6 -ffast-math
+ 
+ # ---- for SUN WS cc ----
+ #CC = cc
+@@ -9,9 +9,9 @@
+ #OFLAGS_PI = -fast -xO5
+ 
+ # ---- for DEC cc ----
+-CC = cc
+-OFLAGS_FFT = -fast -O6
+-OFLAGS_PI = -fast -O6
++#CC = cc
++#OFLAGS_FFT = -fast -O6
++#OFLAGS_PI = -fast -O6
+ 
+ 
+ # ---- use POSIX Thread ----
+diff --git a/runin/src/pi_fftc6/config.h b/runin/src/pi_fftc6/config.h
+index ecdf0cb..5b4cb3c 100644
+--- a/runin/src/pi_fftc6/config.h
++++ b/runin/src/pi_fftc6/config.h
+@@ -16,7 +16,7 @@
+ #ifndef dgt_int
+ #ifdef USE_DGT_LONG_INT
+ #define dgt_int long long int /* 64 bit int */
+-#define DGT_INT_MAX LLONG_MAX /* 64 bit int max */
++#define DGT_INT_MAX LONG_MAX /* 64 bit int max */
+ #else
+ #ifdef USE_DGT_NORMAL_INT
+ #define dgt_int int           /* 32 bit int */
+@@ -31,7 +31,7 @@
+ #ifndef fft_int
+ #ifdef USE_FFT_LONG_INT
+ #define fft_int long long int /* 64 bit int */
+-#define FFT_INT_MAX LLONG_MAX /* 64 bit int max */
++#define FFT_INT_MAX LONG_MAX /* 64 bit int max */
+ #else
+ #define fft_int int           /* 32 bit int */
+ #define FFT_INT_MAX INT_MAX   /* 32 bit int max */
+diff --git a/runin/src/sort.src/Makefile b/runin/src/sort.src/Makefile
+index 68b5731..cfdfadf 100644
+--- a/runin/src/sort.src/Makefile
++++ b/runin/src/sort.src/Makefile
+@@ -1,5 +1,5 @@
+ 
+-COPTIMIZE = -O3 --combine-fwhole-prgram -ffunction-sections -static -msse2
++COPTIMIZE = -O3 --combine-fwhole-prgram -ffunction-sections -msse2
+ CFLAGS2 = $(CFLAGS) -g ${COPTIMIZE}
+ CC = @gcc
+ OBJS = main.o error.o heap.o quick.o merge.o shell.o
+diff --git a/runin/src/sort.src/error.c b/runin/src/sort.src/error.c
+index 9e23046..141e05d 100644
+--- a/runin/src/sort.src/error.c
++++ b/runin/src/sort.src/error.c
+@@ -1,5 +1,6 @@
+ /* Fatal error unrelated to system call
+  * Print message and terminate */
++#include <string.h>
+ #include "sort.h"
+ #define MAXLINE       120
+ #define LOG_ERR       120
+-- 
+1.6.6.1
+
diff --git a/client/tests/cerberus/0001-fix-ctcs2-build.patch 
b/client/tests/cerberus/0001-fix-ctcs2-build.patch
deleted file mode 100644
index acf1566..0000000
--- a/client/tests/cerberus/0001-fix-ctcs2-build.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-diff --git a/runin/src/chartst.c b/runin/src/chartst.c
-index 4a20b38..63b1a5a 100644
---- a/runin/src/chartst.c
-+++ b/runin/src/chartst.c
-@@ -9,6 +9,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <signal.h>
-+#include <string.h>
- 
- void handler(int i) {
-       exit (0);
-diff --git a/runin/src/memtst.src/maxalloc.c b/runin/src/memtst.src/maxalloc.c
-index 5c48356..4863791 100755
---- a/runin/src/memtst.src/maxalloc.c
-+++ b/runin/src/memtst.src/maxalloc.c
-@@ -10,9 +10,6 @@
- 
- #if defined(__BSD__)
-       static const size_t PAGE_SIZE = 4096;
--#else
--/* this is horribly architecture specific */
--      #include <asm/page.h>
- #endif
- 
- 
-diff --git a/runin/src/memtst.src/memtst.c b/runin/src/memtst.src/memtst.c
-index f086f28..538f770 100755
---- a/runin/src/memtst.src/memtst.c
-+++ b/runin/src/memtst.src/memtst.c
-@@ -10,8 +10,6 @@
- 
- #if defined(__BSD__)
-       static const size_t PAGE_SIZE = 4096;
--#else
--      #include <asm/page.h>
- #endif
- 
- /* The verbose global from memtst_main.c */
-@@ -331,6 +329,12 @@ void kmemscan (int *nbuf, int block_size, int offset) {
-       int kmem_file;
-       int d;
- 
-+      /* Newer linux distributions don't have asm/page.h therefore
-+       * we are going to get the page size using the value of
-+       * _SC_PAGESIZE instead.
-+       */
-+      u_long page_size = sysconf(_SC_PAGESIZE);
-+
-       /* window manipulation, iterator, read retval, etc */
-       int low, high, foo;
-               int rd;
-@@ -353,7 +357,7 @@ void kmemscan (int *nbuf, int block_size, int offset) {
- 
-       /* Now compute the offset (in chars) of the error from the page
-          boundary. */
--      fail_page_offset = ((int) (&nbuf[offset])) % PAGE_SIZE;
-+      fail_page_offset = ((int) (&nbuf[offset])) % page_size;
- 
-       kmem_file = open("/proc/kcore",0);
-       if (kmem_file < 0) {
-@@ -370,7 +374,7 @@ void kmemscan (int *nbuf, int block_size, int offset) {
-        * window.
-        */
-       fail_page_offset -= ((offset - low) * sizeof(int));
--      if (fail_page_offset < 0) fail_page_offset+=PAGE_SIZE;
-+      if (fail_page_offset < 0) fail_page_offset+=page_size;
- 
-       printf("%d %x fail_page_offset\n",fail_page_offset,fail_page_offset);
- 
-@@ -382,8 +386,8 @@ void kmemscan (int *nbuf, int block_size, int offset) {
-        */     #include <sys/types.h>
-      #include <sys/sysctl.h>
- 
--      lseek(kmem_file,pages*PAGE_SIZE+fail_page_offset,SEEK_SET);
--      phys_addr=pages*PAGE_SIZE+fail_page_offset;
-+      lseek(kmem_file,pages*page_size+fail_page_offset,SEEK_SET);
-+      phys_addr=pages*page_size+fail_page_offset;
- 
-       /* We now use lseeks to (hugely) improve the performance of this
-          thing.  Large memory systems were extremely painful before. 
-@@ -396,8 +400,8 @@ void kmemscan (int *nbuf, int block_size, int offset) {
-                       foo = low;      
-                       /* Every time we miss, skip to the next page. */
-                       ++pages;
--                      
lseek(kmem_file,pages*PAGE_SIZE+fail_page_offset,SEEK_SET);
--                      phys_addr=pages*PAGE_SIZE+fail_page_offset;
-+                      
lseek(kmem_file,pages*page_size+fail_page_offset,SEEK_SET);
-+                      phys_addr=pages*page_size+fail_page_offset;
-                       continue;
-               }
-               /* If foo made it to high, we've found it. */
-@@ -410,7 +414,7 @@ void kmemscan (int *nbuf, int block_size, int offset) {
-                       fprintf(stderr, "Possible location of memory failure: 
%p (%dM) on page %d\n",
-                               (void *) failure,
-                               (int) (failure/1024/1024),
--                              (int) (failure/PAGE_SIZE));
-+                              (int) (failure/page_size));
-                       close(kmem_file);
-                       return;
-               } 
-diff --git a/runin/src/memtst.src/sizeofint.c 
b/runin/src/memtst.src/sizeofint.c
-index d1f9cfe..8d0404f 100755
---- a/runin/src/memtst.src/sizeofint.c
-+++ b/runin/src/memtst.src/sizeofint.c
-@@ -1,6 +1,7 @@
- /* Jason continues to not use autoconf despite the fact he should. */
- 
- #include <stdio.h>
-+#include <stdlib.h>
- 
- main ()
- {
-diff --git a/runin/src/pi_fftc6/Makefile_64bit 
b/runin/src/pi_fftc6/Makefile_64bit
-index de06626..57fe30c 100644
---- a/runin/src/pi_fftc6/Makefile_64bit
-+++ b/runin/src/pi_fftc6/Makefile_64bit
-@@ -1,7 +1,7 @@
- # ---- for GNU gcc ----
--#CC = gcc
--#OFLAGS_FFT = -O6 -ffast-math
--#OFLAGS_PI = -O6 -ffast-math
-+CC = gcc
-+OFLAGS_FFT = -O6 -ffast-math
-+OFLAGS_PI = -O6 -ffast-math
- 
- # ---- for SUN WS cc ----
- #CC = cc
-@@ -9,9 +9,9 @@
- #OFLAGS_PI = -fast -xO5
- 
- # ---- for DEC cc ----
--CC = cc
--OFLAGS_FFT = -fast -O6
--OFLAGS_PI = -fast -O6
-+#CC = cc
-+#OFLAGS_FFT = -fast -O6
-+#OFLAGS_PI = -fast -O6
- 
- 
- # ---- use POSIX Thread ----
-diff --git a/runin/src/pi_fftc6/config.h b/runin/src/pi_fftc6/config.h
-index ecdf0cb..5b4cb3c 100644
---- a/runin/src/pi_fftc6/config.h
-+++ b/runin/src/pi_fftc6/config.h
-@@ -16,7 +16,7 @@
- #ifndef dgt_int
- #ifdef USE_DGT_LONG_INT
- #define dgt_int long long int /* 64 bit int */
--#define DGT_INT_MAX LLONG_MAX /* 64 bit int max */
-+#define DGT_INT_MAX LONG_MAX /* 64 bit int max */
- #else
- #ifdef USE_DGT_NORMAL_INT
- #define dgt_int int           /* 32 bit int */
-@@ -31,7 +31,7 @@
- #ifndef fft_int
- #ifdef USE_FFT_LONG_INT
- #define fft_int long long int /* 64 bit int */
--#define FFT_INT_MAX LLONG_MAX /* 64 bit int max */
-+#define FFT_INT_MAX LONG_MAX /* 64 bit int max */
- #else
- #define fft_int int           /* 32 bit int */
- #define FFT_INT_MAX INT_MAX   /* 32 bit int max */
-diff --git a/runin/src/sort.src/error.c b/runin/src/sort.src/error.c
-index 9e23046..141e05d 100644
---- a/runin/src/sort.src/error.c
-+++ b/runin/src/sort.src/error.c
-@@ -1,5 +1,6 @@
- /* Fatal error unrelated to system call
-  * Print message and terminate */
-+#include <string.h>
- #include "sort.h"
- #define MAXLINE       120
- #define LOG_ERR       120
diff --git a/client/tests/cerberus/0002-Fix-CTCS2-build-in-64-bit-boxes.patch 
b/client/tests/cerberus/0002-Fix-CTCS2-build-in-64-bit-boxes.patch
new file mode 100644
index 0000000..c4035cf
--- /dev/null
+++ b/client/tests/cerberus/0002-Fix-CTCS2-build-in-64-bit-boxes.patch
@@ -0,0 +1,192 @@
+From ad38da9928b2c46c3be9ffa508cdc273583ed44f Mon Sep 17 00:00:00 2001
+From: Lucas Meneghel Rodrigues <[email protected]>
+Date: Sat, 17 Apr 2010 16:08:09 -0300
+Subject: [PATCH 2/2] Fix CTCS2 build in 64 bit boxes
+
+Signed-off-by: Chen Cao <[email protected]>
+---
+ runin/src/pi_fftc6/Makefile       |    8 ++--
+ runin/src/pi_fftc6/Makefile_32bit |   68 +++++++++++++++++++++++++++++++++++++
+ runin/src/pi_fftc6/Makefile_64bit |   68 -------------------------------------
+ 3 files changed, 72 insertions(+), 72 deletions(-)
+ create mode 100644 runin/src/pi_fftc6/Makefile_32bit
+ delete mode 100644 runin/src/pi_fftc6/Makefile_64bit
+
+diff --git a/runin/src/pi_fftc6/Makefile b/runin/src/pi_fftc6/Makefile
+index e1166bd..57fe30c 100644
+--- a/runin/src/pi_fftc6/Makefile
++++ b/runin/src/pi_fftc6/Makefile
+@@ -1,7 +1,7 @@
+ # ---- for GNU gcc ----
+ CC = gcc
+-OFLAGS_FFT = -O6 -ffast-math 
+-OFLAGS_PI = -O6 -ffast-math -mtune=pentium4 -mfpmath=sse,387 -msse3
++OFLAGS_FFT = -O6 -ffast-math
++OFLAGS_PI = -O6 -ffast-math
+ 
+ # ---- for SUN WS cc ----
+ #CC = cc
+@@ -19,10 +19,10 @@ OFLAGS_PI = -O6 -ffast-math -mtune=pentium4 
-mfpmath=sse,387 -msse3
+ #LFLAGS_TH = -lpthread
+ 
+ # ---- use 64-bit size FFT ----
+-#CFLAGS_FI = -DUSE_FFT_LONG_INT
++CFLAGS_FI = -DUSE_FFT_LONG_INT
+ 
+ 
+-CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI)
++CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI) -DPI_OUT_LOGFILE
+ LFLAGS = -lm $(LFLAGS_TH)
+ 
+ 
+diff --git a/runin/src/pi_fftc6/Makefile_32bit 
b/runin/src/pi_fftc6/Makefile_32bit
+new file mode 100644
+index 0000000..e1166bd
+--- /dev/null
++++ b/runin/src/pi_fftc6/Makefile_32bit
+@@ -0,0 +1,68 @@
++# ---- for GNU gcc ----
++CC = gcc
++OFLAGS_FFT = -O6 -ffast-math 
++OFLAGS_PI = -O6 -ffast-math -mtune=pentium4 -mfpmath=sse,387 -msse3
++
++# ---- for SUN WS cc ----
++#CC = cc
++#OFLAGS_FFT = -fast -xO5
++#OFLAGS_PI = -fast -xO5
++
++# ---- for DEC cc ----
++#CC = cc
++#OFLAGS_FFT = -fast -O6
++#OFLAGS_PI = -fast -O6
++
++
++# ---- use POSIX Thread ----
++#CFLAGS_TH = -DUSE_CDFT_PTHREADS
++#LFLAGS_TH = -lpthread
++
++# ---- use 64-bit size FFT ----
++#CFLAGS_FI = -DUSE_FFT_LONG_INT
++
++
++CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI)
++LFLAGS = -lm $(LFLAGS_TH)
++
++
++all: pi_ca pi_cs pi_cw dgt_div
++
++
++pi_ca : pi_fftca.o fftsgx.o
++      $(CC) pi_fftca.o fftsgx.o $(LFLAGS) -o $@
++
++pi_cs : pi_fftcs.o fftsg_hx.o
++      $(CC) pi_fftcs.o fftsg_hx.o $(LFLAGS) -o $@
++
++pi_cw : pi_fftcw.o fftsg_hx.o
++      $(CC) pi_fftcw.o fftsg_hx.o $(LFLAGS) -o $@
++
++dgt_div : dgt_div.o
++      $(CC) dgt_div.o -o $@
++
++
++pi_fftca.o : pi_fftca.c
++      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
++
++pi_fftcs.o : pi_fftcs.c
++      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
++
++pi_fftcw.o : pi_fftcw.c
++      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
++
++
++fftsgx.o : fftsgx.c
++      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
++
++fftsg_hx.o : fftsg_hx.c
++      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
++
++
++dgt_div.o : dgt_div.c
++      $(CC) $(CFLAGS) -O -c $*.c -o $@
++
++
++clean:
++      rm -f *.o
++
+diff --git a/runin/src/pi_fftc6/Makefile_64bit 
b/runin/src/pi_fftc6/Makefile_64bit
+deleted file mode 100644
+index 57fe30c..0000000
+--- a/runin/src/pi_fftc6/Makefile_64bit
++++ /dev/null
+@@ -1,68 +0,0 @@
+-# ---- for GNU gcc ----
+-CC = gcc
+-OFLAGS_FFT = -O6 -ffast-math
+-OFLAGS_PI = -O6 -ffast-math
+-
+-# ---- for SUN WS cc ----
+-#CC = cc
+-#OFLAGS_FFT = -fast -xO5
+-#OFLAGS_PI = -fast -xO5
+-
+-# ---- for DEC cc ----
+-#CC = cc
+-#OFLAGS_FFT = -fast -O6
+-#OFLAGS_PI = -fast -O6
+-
+-
+-# ---- use POSIX Thread ----
+-#CFLAGS_TH = -DUSE_CDFT_PTHREADS
+-#LFLAGS_TH = -lpthread
+-
+-# ---- use 64-bit size FFT ----
+-CFLAGS_FI = -DUSE_FFT_LONG_INT
+-
+-
+-CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI) -DPI_OUT_LOGFILE
+-LFLAGS = -lm $(LFLAGS_TH)
+-
+-
+-all: pi_ca pi_cs pi_cw dgt_div
+-
+-
+-pi_ca : pi_fftca.o fftsgx.o
+-      $(CC) pi_fftca.o fftsgx.o $(LFLAGS) -o $@
+-
+-pi_cs : pi_fftcs.o fftsg_hx.o
+-      $(CC) pi_fftcs.o fftsg_hx.o $(LFLAGS) -o $@
+-
+-pi_cw : pi_fftcw.o fftsg_hx.o
+-      $(CC) pi_fftcw.o fftsg_hx.o $(LFLAGS) -o $@
+-
+-dgt_div : dgt_div.o
+-      $(CC) dgt_div.o -o $@
+-
+-
+-pi_fftca.o : pi_fftca.c
+-      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
+-
+-pi_fftcs.o : pi_fftcs.c
+-      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
+-
+-pi_fftcw.o : pi_fftcw.c
+-      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
+-
+-
+-fftsgx.o : fftsgx.c
+-      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
+-
+-fftsg_hx.o : fftsg_hx.c
+-      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
+-
+-
+-dgt_div.o : dgt_div.c
+-      $(CC) $(CFLAGS) -O -c $*.c -o $@
+-
+-
+-clean:
+-      rm -f *.o
+-
+-- 
+1.6.6.1
+
diff --git a/client/tests/cerberus/0002-compile-on-64bit.patch 
b/client/tests/cerberus/0002-compile-on-64bit.patch
deleted file mode 100644
index 690ee57..0000000
--- a/client/tests/cerberus/0002-compile-on-64bit.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-diff --git a/runin/src/pi_fftc6/Makefile b/runin/src/pi_fftc6/Makefile
-index e1166bd..57fe30c 100644
---- a/runin/src/pi_fftc6/Makefile
-+++ b/runin/src/pi_fftc6/Makefile
-@@ -1,7 +1,7 @@
- # ---- for GNU gcc ----
- CC = gcc
--OFLAGS_FFT = -O6 -ffast-math 
--OFLAGS_PI = -O6 -ffast-math -mtune=pentium4 -mfpmath=sse,387 -msse3
-+OFLAGS_FFT = -O6 -ffast-math
-+OFLAGS_PI = -O6 -ffast-math
- 
- # ---- for SUN WS cc ----
- #CC = cc
-@@ -19,10 +19,10 @@ OFLAGS_PI = -O6 -ffast-math -mtune=pentium4 
-mfpmath=sse,387 -msse3
- #LFLAGS_TH = -lpthread
- 
- # ---- use 64-bit size FFT ----
--#CFLAGS_FI = -DUSE_FFT_LONG_INT
-+CFLAGS_FI = -DUSE_FFT_LONG_INT
- 
- 
--CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI)
-+CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI) -DPI_OUT_LOGFILE
- LFLAGS = -lm $(LFLAGS_TH)
- 
- 
-diff --git a/runin/src/pi_fftc6/Makefile_32bit 
b/runin/src/pi_fftc6/Makefile_32bit
-new file mode 100644
-index 0000000..e1166bd
---- /dev/null
-+++ b/runin/src/pi_fftc6/Makefile_32bit
-@@ -0,0 +1,68 @@
-+# ---- for GNU gcc ----
-+CC = gcc
-+OFLAGS_FFT = -O6 -ffast-math 
-+OFLAGS_PI = -O6 -ffast-math -mtune=pentium4 -mfpmath=sse,387 -msse3
-+
-+# ---- for SUN WS cc ----
-+#CC = cc
-+#OFLAGS_FFT = -fast -xO5
-+#OFLAGS_PI = -fast -xO5
-+
-+# ---- for DEC cc ----
-+#CC = cc
-+#OFLAGS_FFT = -fast -O6
-+#OFLAGS_PI = -fast -O6
-+
-+
-+# ---- use POSIX Thread ----
-+#CFLAGS_TH = -DUSE_CDFT_PTHREADS
-+#LFLAGS_TH = -lpthread
-+
-+# ---- use 64-bit size FFT ----
-+#CFLAGS_FI = -DUSE_FFT_LONG_INT
-+
-+
-+CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI)
-+LFLAGS = -lm $(LFLAGS_TH)
-+
-+
-+all: pi_ca pi_cs pi_cw dgt_div
-+
-+
-+pi_ca : pi_fftca.o fftsgx.o
-+      $(CC) pi_fftca.o fftsgx.o $(LFLAGS) -o $@
-+
-+pi_cs : pi_fftcs.o fftsg_hx.o
-+      $(CC) pi_fftcs.o fftsg_hx.o $(LFLAGS) -o $@
-+
-+pi_cw : pi_fftcw.o fftsg_hx.o
-+      $(CC) pi_fftcw.o fftsg_hx.o $(LFLAGS) -o $@
-+
-+dgt_div : dgt_div.o
-+      $(CC) dgt_div.o -o $@
-+
-+
-+pi_fftca.o : pi_fftca.c
-+      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
-+
-+pi_fftcs.o : pi_fftcs.c
-+      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
-+
-+pi_fftcw.o : pi_fftcw.c
-+      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
-+
-+
-+fftsgx.o : fftsgx.c
-+      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
-+
-+fftsg_hx.o : fftsg_hx.c
-+      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
-+
-+
-+dgt_div.o : dgt_div.c
-+      $(CC) $(CFLAGS) -O -c $*.c -o $@
-+
-+
-+clean:
-+      rm -f *.o
-+
-diff --git a/runin/src/pi_fftc6/Makefile_64bit 
b/runin/src/pi_fftc6/Makefile_64bit
-deleted file mode 100644
-index 57fe30c..0000000
---- a/runin/src/pi_fftc6/Makefile_64bit
-+++ /dev/null
-@@ -1,68 +0,0 @@
--# ---- for GNU gcc ----
--CC = gcc
--OFLAGS_FFT = -O6 -ffast-math
--OFLAGS_PI = -O6 -ffast-math
--
--# ---- for SUN WS cc ----
--#CC = cc
--#OFLAGS_FFT = -fast -xO5
--#OFLAGS_PI = -fast -xO5
--
--# ---- for DEC cc ----
--#CC = cc
--#OFLAGS_FFT = -fast -O6
--#OFLAGS_PI = -fast -O6
--
--
--# ---- use POSIX Thread ----
--#CFLAGS_TH = -DUSE_CDFT_PTHREADS
--#LFLAGS_TH = -lpthread
--
--# ---- use 64-bit size FFT ----
--CFLAGS_FI = -DUSE_FFT_LONG_INT
--
--
--CFLAGS = $(CFLAGS_TH) $(CFLAGS_FI) -DPI_OUT_LOGFILE
--LFLAGS = -lm $(LFLAGS_TH)
--
--
--all: pi_ca pi_cs pi_cw dgt_div
--
--
--pi_ca : pi_fftca.o fftsgx.o
--      $(CC) pi_fftca.o fftsgx.o $(LFLAGS) -o $@
--
--pi_cs : pi_fftcs.o fftsg_hx.o
--      $(CC) pi_fftcs.o fftsg_hx.o $(LFLAGS) -o $@
--
--pi_cw : pi_fftcw.o fftsg_hx.o
--      $(CC) pi_fftcw.o fftsg_hx.o $(LFLAGS) -o $@
--
--dgt_div : dgt_div.o
--      $(CC) dgt_div.o -o $@
--
--
--pi_fftca.o : pi_fftca.c
--      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
--
--pi_fftcs.o : pi_fftcs.c
--      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
--
--pi_fftcw.o : pi_fftcw.c
--      $(CC) $(CFLAGS) $(OFLAGS_PI) -c $*.c -o $@
--
--
--fftsgx.o : fftsgx.c
--      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
--
--fftsg_hx.o : fftsg_hx.c
--      $(CC) $(CFLAGS) $(OFLAGS_FFT) -c $*.c -o $@
--
--
--dgt_div.o : dgt_div.c
--      $(CC) $(CFLAGS) -O -c $*.c -o $@
--
--
--clean:
--      rm -f *.o
--
diff --git a/client/tests/cerberus/cerberus.py 
b/client/tests/cerberus/cerberus.py
index 793e190..c8a0b19 100644
--- a/client/tests/cerberus/cerberus.py
+++ b/client/tests/cerberus/cerberus.py
@@ -46,11 +46,12 @@ class cerberus(test.test):
         os.chdir(self.srcdir)
         # Apply patch to fix build problems on newer distros (absence of
         # asm/page.h include, and platform(32/64bit) related issues.
-        utils.system('patch -p1 < ../0001-fix-ctcs2-build.patch')
+        p1 = 'patch -p1 < ../0001-Fix-CTCS2-Build.patch'
+        utils.system(p1)
 
-        output = os.popen('uname -i').read()
-        if output.find('x86_64') != -1:
-            utils.system('patch -p1 < ../0002-compile-on-64bit.patch')
+        if utils.get_cpu_arch() == 'x86_64':
+            p2 = 'patch -p1 < ../0002-Fix-CTCS2-build-in-64-bit-boxes.patch'
+            utils.system(p2)
 
         utils.system('make')
 
-- 
1.6.6.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to