summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>2011-03-04 09:30:13 -0800
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>2011-03-04 09:30:45 -0800
commit88cc244e3202593d76d1f31a3d93f0d8942face2 (patch)
treead3c4313ccc33a9a3bc7bf91237d8f93ea701253
parent3d62938350352dff4a81d529cee0504c227e0224 (diff)
downloadceph-88cc244e3202593d76d1f31a3d93f0d8942face2.tar.gz
do_autogen.sh: add -P option
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
-rwxr-xr-xdo_autogen.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/do_autogen.sh b/do_autogen.sh
index 4a9355c1fac..982d7654e37 100755
--- a/do_autogen.sh
+++ b/do_autogen.sh
@@ -5,14 +5,13 @@ usage() {
do_autogen.sh: make a ceph build by running autogen, etc.
-h: this help message
--3: build 32-bit
--6: build 64-bit
-d <level> debug build
level 0: no debug
level 1: -g
level 2: -Wall
level 3: -Wextra
level 4: even more...
+-P profiling build
EOF
}
@@ -26,16 +25,13 @@ debug_level=0
verbose=0
CFLAGS=""
CXXFLAGS=""
+profile=0
while getopts "36d:hPv" flag
do
case $flag in
- 3) CFLAGS="$CFLAGS -m32";;
-
- 6) CFLAGS="$CFLAGS -m64";;
-
d) debug_level=$OPTARG;;
- P) with_profiler="--with-profiler ";;
+ P) profile=1;;
h) usage
exit 0;;
@@ -49,6 +45,16 @@ do
esac
done
+if [ $profile -eq 1 ]; then
+ if [ $debug_level -ne 0 ]; then
+ echo "Can't specify both -d and -P. Profiling builds are \
+different than debug builds."
+ exit 1
+ fi
+ CFLAGS="${CFLAGS} -fno-omit-frame-pointer"
+ debug_level=1
+fi
+
if [ "${debug_level}" -ge 1 ]; then
CFLAGS="${CFLAGS} -g"
fi