]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_utils.sh: use gcc-8 on bionic 1286/head
authorKefu Chai <kchai@redhat.com>
Wed, 10 Apr 2019 08:14:13 +0000 (16:14 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 11 Apr 2019 07:06:01 +0000 (15:06 +0800)
in hope to alleviate the ICE issues when building kvstore_tool.cc

see also https://bugzilla.redhat.com/show_bug.cgi?id=1531154

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

index 59db3c13f1a936c09a442508a8bfaa890ccb40fa..d91b1035833f2ea2bd5673b412c09c852988b77c 100644 (file)
@@ -442,6 +442,7 @@ 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
 
@@ -502,6 +503,8 @@ case \$old in
         old=5;;
     7*)
         old=7;;
+    8*)
+        old=8;;
 esac
 
 update-alternatives --remove-all gcc
@@ -590,7 +593,7 @@ setup_pbuilder_for_old_gcc() {
         xenial)
             old=5;;
         bionic)
-            old=7;;
+            old=8;;
     esac
     setup_gcc_hook $old > $hookdir/D10update-gcc-alternatives
     chmod +x $hookdir/D10update-gcc-alternatives
@@ -612,6 +615,25 @@ 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