summaryrefslogtreecommitdiff
path: root/tools/CPUMaker
blob: d62ff2318afeab8ff737be07b2e7e5bc2162aade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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