mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
install-deps.sh: use GCC-7 on xenial also
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 8a0935988f
)
This commit is contained in:
parent
f95ab869e8
commit
acfc351095
@ -31,10 +31,19 @@ function ensure_decent_gcc_on_deb {
|
||||
# new enough
|
||||
local old=$(gcc -dumpversion)
|
||||
local new=$1
|
||||
if dpkg --compare-versions $old ge 5.1; then
|
||||
if dpkg --compare-versions $old ge 7.0; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/bin/gcc-${old} ]; then
|
||||
case $(lsb_release --short --codename) in
|
||||
trusty)
|
||||
old=4.8;;
|
||||
xenial)
|
||||
old=5;;
|
||||
esac
|
||||
fi
|
||||
$SUDO update-alternatives --remove-all gcc || true
|
||||
$SUDO update-alternatives \
|
||||
--install /usr/bin/gcc gcc /usr/bin/gcc-${new} 20 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-${new}
|
||||
@ -139,7 +148,7 @@ else
|
||||
$SUDO apt-get install -y lsb-release devscripts equivs
|
||||
$SUDO apt-get install -y dpkg-dev
|
||||
case "$VERSION" in
|
||||
*Trusty*)
|
||||
*Trusty*|*Xenial*)
|
||||
$SUDO apt-get install -y software-properties-common
|
||||
$SUDO add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
$SUDO apt-get update
|
||||
|
Loading…
Reference in New Issue
Block a user