]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_utils.sh: install GCC-9 on bionic
authorKefu Chai <kchai@redhat.com>
Fri, 7 Jun 2019 15:31:05 +0000 (23:31 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 17 Jun 2019 02:20:39 +0000 (10:20 +0800)
GCC-8 is good enough for build Ceph. but we are trying to focus on
1 year later's mainstream toolchain, and only the PPA of
"ubuntu-toolchain-r" offers GCC-9 for bionic, so let's just use GCC-9
for building all flavors on bionic. simpler this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
scripts/build_utils.sh

index 3fa59f055c2d24055079076fd5701cd121edbed2..6fee9a1638f1aa4f644ba77eb7df4c63925110f4 100644 (file)
@@ -442,7 +442,6 @@ setup_pbuilder() {
         # https://github.com/shazow/urllib3/issues/567
         echo "USENETWORK=yes" >> ~/.pbuilderrc
         setup_pbuilder_for_ppa >> ~/.pbuilderrc
-        install_extra_packages >> ~/.pbuilderrc
     fi
     sudo pbuilder --clean
 
@@ -480,6 +479,8 @@ use_ppa() {
                     use_ppa=true;;
                 xenial)
                     use_ppa=true;;
+                bionic)
+                    use_ppa=true;;
                 *)
                     use_ppa=false;;
             esac
@@ -608,7 +609,11 @@ setup_pbuilder_for_ppa() {
         hookdir=$HOME/.pbuilder/hook.d
         rm -rf $hookdir
         mkdir -p $hookdir
-        setup_pbuilder_for_new_gcc $hookdir 7
+        local gcc_ver=7
+        if [ "$DIST" = "bionic" ]; then
+            gcc_ver=9
+        fi
+        setup_pbuilder_for_new_gcc $hookdir $gcc_ver
     else
         hookdir=$HOME/.pbuilder/hook-old-gcc.d
         rm -rf $hookdir
@@ -618,25 +623,6 @@ setup_pbuilder_for_ppa() {
     echo "HOOKDIR=$hookdir"
 }
 
-install_extra_packages() {
-    case $vers in
-        1[0-2].*)
-            # jewel, kraken, luminous
-            ;;
-        *)
-            # mimic, nautilus, *
-            case $DIST in
-                trusty|xenial)
-                    ;;
-                bionic)
-                    echo 'EXTRAPACKAGES="g++-8"';;
-                *)
-                    ;;
-            esac
-            ;;
-    esac
-}
-
 extra_cmake_args() {
     # statically link against libstdc++ for building new releases on old distros
     if use_ppa; then