summaryrefslogtreecommitdiff
path: root/tools/CPUMaker
diff options
context:
space:
mode:
Diffstat (limited to 'tools/CPUMaker')
-rwxr-xr-xtools/CPUMaker27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/CPUMaker b/tools/CPUMaker
new file mode 100755
index 0000000..d62ff23
--- /dev/null
+++ b/tools/CPUMaker
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+FLAG="${FLAG} -ansi -Wall -O2 -finline-functions"
+
+case "$(cat /proc/cpuinfo | egrep '^model name'|cut -d ':' -f 2|cut -c 2-)" in
+ 'Intel(R) Pentium(R) M processor 1300MHz')
+ FLAG="${FLAG} -march=pentium3 -fomit-frame-pointer -ffast-math"
+ ;;
+ *)
+ ;;
+esac
+
+for flag in $(cat /proc/cpuinfo | egrep '^flags'|cut -d ':' -f 2|cut -c 2-); do
+ case $flag in
+ mmx)
+ FLAG="${FLAG} -mmmx"
+ ;;
+ sse)
+ FLAG="${FLAG} -msse"
+ ;;
+ sse2)
+ FLAG="${FLAG} -msse2"
+ ;;
+ esac
+done
+
+echo 'GCC_FLAGS = $(QTGCC_FLAGS)' $FLAG