Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions build-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@ if ! hostname | grep -q ^gitbuilder- ; then
exit 1
fi

if hostname | grep -q -- -clang ; then
echo "hostname has -clang, will build with CC=clang CXX=clang++"
export CC=clang
export CXX=clang++
# Workaround nfortunate interactions between clang and distcc < 3.2.
export CCACHE_CPP2=yes
export CFLAGS="-Qunused-arguments $CFLAGS"
export CXXFLAGS="-Qunused-arguments $CXXFLAXS"
fi
if hostname | grep -q -- -analyze ; then
echo "hostname has -analyze, will wrap build with scan-build static analyzer"
echo "Disabling CCache to ensure complete coverage."
export CCACHE_DISABLE=yes
export BUILD_WRAPPER="scan-build -o scan-build-report.tmp/"
fi
if hostname | grep -q -- -asan; then
echo "hostname has -asan, will build with -fsanitize=address"
export CFLAGS="-fsanitize=address $CFLAGS"
export CXXFLAGS="-fsanitize=address $CXXFLAGS"
fi
if hostname | grep -q -- -tsan; then
echo "hostname has -tsan, will build with -fsanitize=thread"
export CFLAGS="-fsanitize=thread $CFLAGS"
export CXXFLAGS="-fsanitize=thread $CXXFLAGS"
fi
if hostname | grep -q -- -wall; then
echo "hostname has -wall, will build with all possible warnings enabled"
export CFLAGS="-Wall -Weverything -Wpedantic $CFLAGS"
export CXXFLAGS="-Wall -Weverything -Wpedantic $CXXFLAGS"
fi
if hostname | grep -q -- -notcmalloc ; then
echo "hostname has -notcmalloc, will build --without-tcmalloc --without-cryptopp"
export CEPH_EXTRA_CONFIGURE_ARGS="$CEPH_EXTRA_CONFIGURE_ARGS --without-tcmalloc"
Expand Down
14 changes: 12 additions & 2 deletions build-ceph-deb-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@ rm -rf .git/modules/
/srv/git/bin/git submodule update --init
git clean -fdx

# If CC is not already defined, use gcc.
if [ "x$CC" = "x" ]; then
export CC=gcc
fi

# If CXX is not already defined, use g++.
if [ "x$CXX" = "x" ]; then
export CXX=g++
fi

DIST=`lsb_release -sc`

echo --START-IGNORE-WARNINGS
[ ! -x autogen.sh ] || ./autogen.sh || exit 1
autoconf || true
echo --STOP-IGNORE-WARNINGS
[ ! -x configure ] || CFLAGS="-fno-omit-frame-pointer -g -O2" CXXFLAGS="-fno-omit-frame-pointer -g -O2" ./configure --with-debug --with-radosgw --with-fuse --with-tcmalloc --with-libatomic-ops --with-gtk2 --with-profiler --enable-cephfs-java || exit 2
[ ! -x configure ] || CFLAGS="-fno-omit-frame-pointer -g -O2 $CFLAGS" CXXFLAGS="-fno-omit-frame-pointer -g -O2 $CXXFLAGS" ./configure --with-debug --with-radosgw --with-fuse --with-tcmalloc --with-libatomic-ops --with-gtk2 --with-profiler --enable-cephfs-java || exit 2

if [ ! -e Makefile ]; then
echo "$0: no Makefile, aborting." 1>&2
Expand All @@ -42,7 +52,7 @@ if command -v ccache >/dev/null; then
if [ ! -e "$CCACHE_DIR" ]; then
echo "$0: have ccache but cache directory does not exist: $CCACHE_DIR" 1>&2
else
set -- CC='ccache gcc' CXX='ccache g++'
set -- CC="ccache $CC" CXX="ccache $CXX"
fi
else
echo "$0: no ccache found, compiles will be slower." 1>&2
Expand Down
11 changes: 10 additions & 1 deletion build-ceph-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ rm -rf .git/modules/
/srv/git/bin/git submodule update --init
git clean -fdx

# If CC is not already defined, use gcc.
if [ "x$CC" = "x" ]; then
export CC=gcc
fi

# If CXX is not already defined, use g++.
if [ "x$CXX" = "x" ]; then
export CXX=g++
fi

DISTS=`cat ../../dists`

Expand All @@ -43,7 +52,7 @@ if command -v ccache >/dev/null; then
if [ ! -e "$CCACHE_DIR" ]; then
echo "$0: have ccache but cache directory does not exist: $CCACHE_DIR" 1>&2
else
set -- CC='ccache gcc' CXX='ccache g++'
set -- CC="ccache $CC" CXX="ccache $CXX"
fi
else
echo "$0: no ccache found, compiles will be slower." 1>&2
Expand Down
14 changes: 12 additions & 2 deletions build-ceph-gcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ rm -rf .git/modules/
/srv/git/bin/git submodule update --init
git clean -fdx

# If CC is not already defined, use gcc.
if [ "x$CC" = "x" ]; then
export CC=gcc
fi

# If CXX is not already defined, use g++.
if [ "x$CXX" = "x" ]; then
export CXX=g++
fi

echo --START-IGNORE-WARNINGS
[ ! -x autogen.sh ] || ./autogen.sh || exit 1
autoconf || true
Expand All @@ -41,14 +51,14 @@ if command -v ccache >/dev/null; then
if [ ! -e "$CCACHE_DIR" ]; then
echo "$0: have ccache but cache directory does not exist: $CCACHE_DIR" 1>&2
else
set -- CC='ccache gcc' CXX='ccache g++'
set -- CC="ccache $CC" CXX="ccache $CXX"
fi
else
echo "$0: no ccache found, compiles will be slower." 1>&2
fi

NCPU=$(( 2 * `grep -c processor /proc/cpuinfo` ))
ionice -c3 nice -n20 make -j$NCPU "$@" || exit 4
ionice -c3 nice -n20 $BUILD_WRAPPER make -j$NCPU "$@" || exit 4

# The "make -q check" probe in build.sh.example is faulty in that
# screwups in Makefiles make it think there are no unit tests to
Expand Down
15 changes: 12 additions & 3 deletions build-ceph-notcmalloc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@ rm -rf .git/modules/
/srv/git/bin/git submodule update --init
git clean -fdx

# If CC is not already defined, use gcc.
if [ "x$CC" = "x" ]; then
export CC=gcc
fi

# If CXX is not already defined, use g++.
if [ "x$CXX" = "x" ]; then
export CXX=g++
fi

echo --START-IGNORE-WARNINGS
[ ! -x autogen.sh ] || ./autogen.sh || exit 1
autoconf || true
echo --STOP-IGNORE-WARNINGS
[ ! -x configure ] || CFLAGS="-fno-omit-frame-pointer -g -O2" CXXFLAGS="-fno-omit-frame-pointer -g" ./configure --with-debug --with-radosgw --with-fuse --without-tcmalloc --with-libatomic-ops --with-gtk2 --with-profiler || exit 2
[ ! -x configure ] || CFLAGS="-fno-omit-frame-pointer -g -O2 $CFLAGS" CXXFLAGS="-fno-omit-frame-pointer -g $CXXFLAGS" ./configure --with-debug --with-radosgw --with-fuse --without-tcmalloc --with-libatomic-ops --with-gtk2 --with-profiler || exit 2

if [ ! -e Makefile ]; then
echo "$0: no Makefile, aborting." 1>&2
Expand All @@ -42,14 +51,14 @@ if command -v ccache >/dev/null; then
if [ ! -e "$CCACHE_DIR" ]; then
echo "$0: have ccache but cache directory does not exist: $CCACHE_DIR" 1>&2
else
set -- CC='ccache gcc' CXX='ccache g++'
set -- CC="ccache $CC" CXX="ccache $CXX"
fi
else
echo "$0: no ccache found, compiles will be slower." 1>&2
fi

NCPU=$(( 2 * `grep -c processor /proc/cpuinfo` ))
ionice -c3 nice -n20 make -j$NCPU "$@" || exit 4
ionice -c3 nice -n20 $BUILD_WRAPPER make -j$NCPU "$@" || exit 4

# The "make -q check" probe in build.sh.example is faulty in that
# screwups in Makefiles make it think there are no unit tests to
Expand Down
12 changes: 11 additions & 1 deletion build-ceph-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ rm -rf .git/modules/
/srv/git/bin/git submodule update --init
git clean -fdx

# If CC is not already defined, use gcc.
if [ "x$CC" = "x" ]; then
export CC=gcc
fi

# If CXX is not already defined, use g++.
if [ "x$CXX" = "x" ]; then
export CXX=g++
fi

DISTS=`cat ../../dists`
TARGET="$(cat ../../rsync-target)"
TARGET="$(basename $TARGET)"
Expand Down Expand Up @@ -67,7 +77,7 @@ if command -v ccache >/dev/null; then
if [ ! -e "$CCACHE_DIR" ]; then
echo "$0: have ccache but cache directory does not exist: $CCACHE_DIR" 1>&2
else
set -- CC='ccache gcc' CXX='ccache g++'
set -- CC="ccache $CC" CXX="ccache $CXX"
fi
else
echo "$0: no ccache found, compiles will be slower." 1>&2
Expand Down
16 changes: 13 additions & 3 deletions build-ceph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ rm -rf .git/modules/
/srv/git/bin/git submodule update --init
git clean -fdx

# If CC is not already defined, use gcc.
if [ "x$CC" = "x" ]; then
export CC=gcc
fi

# If CXX is not already defined, use g++.
if [ "x$CXX" = "x" ]; then
export CXX=g++
fi

echo --START-IGNORE-WARNINGS
[ ! -x autogen.sh ] || ./autogen.sh || exit 1
autoconf || true
echo --STOP-IGNORE-WARNINGS
[ ! -x configure ] || CFLAGS="-fno-omit-frame-pointer -g -O2" CXXFLAGS="-fno-omit-frame-pointer -g" ./configure --with-debug --with-radosgw --with-fuse --with-tcmalloc --with-libatomic-ops --with-gtk2 --with-hadoop --with-profiler --enable-cephfs-java --with-librocksdb-static=check || exit 2
[ ! -x configure ] || CFLAGS="-fno-omit-frame-pointer -g -O2 $CFLAGS" CXXFLAGS="-fno-omit-frame-pointer -g $CXXFLAGS" ./configure --with-debug --with-radosgw --with-fuse --with-tcmalloc --with-libatomic-ops --with-gtk2 --with-hadoop --with-profiler --enable-cephfs-java --with-librocksdb-static=check || exit 2

if [ ! -e Makefile ]; then
echo "$0: no Makefile, aborting." 1>&2
Expand All @@ -40,14 +50,14 @@ if command -v ccache >/dev/null; then
if [ ! -e "$CCACHE_DIR" ]; then
echo "$0: have ccache but cache directory does not exist: $CCACHE_DIR" 1>&2
else
set -- CC='ccache gcc' CXX='ccache g++'
set -- CC="ccache $CC" CXX="ccache $CXX"
fi
else
echo "$0: no ccache found, compiles will be slower." 1>&2
fi

NCPU=$(( 2 * `grep -c processor /proc/cpuinfo` ))
ionice -c3 nice -n20 make -j$NCPU "$@" || exit 4
ionice -c3 nice -n20 $BUILD_WRAPPER make -j$NCPU "$@" || exit 4

# The "make -q check" probe in build.sh.example is faulty in that
# screwups in Makefiles make it think there are no unit tests to
Expand Down
3 changes: 3 additions & 0 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def _rh_gitbuilder(flavor, git_repo, extra_remotes={}, extra_packages=[], ignore
_rpm_install(
'ntp',
'ccache',
'clang',
'clang-analyzer',
'git',
'logrotate',
'rsync',
Expand Down Expand Up @@ -282,6 +284,7 @@ def _gitbuilder(flavor, git_repo, extra_remotes={}, extra_packages=[], ignore=[]
'ntp',
'build-essential',
'ccache',
'clang',
'git',
'logrotate',
# 'sun-java6-jdk',
Expand Down