File: checkarch.sh

package info (click to toggle)
sheepdog 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,364 kB
  • ctags: 3,951
  • sloc: ansic: 30,552; sh: 3,573; perl: 2,924; asm: 453; makefile: 391; python: 192
file content (26 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
arch=`gcc -dumpmachine`

case $arch in
`echo $arch | grep x86_64`)
	echo -D__SIZEOF_POINTER__=8 -m64
	;;
`echo $arch | grep "i[3-6]86"`)
	echo -D__SIZEOF_POINTER__=4 -m32
	;;
*)
	echo '
	Failed to parse your architecture.
	Please run

	$ make check32

	or

	$ make check64

	manually.
	'
	exit 1
;;
esac