about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2025-06-14 11:52:19 -0400
committerAntoni Boucher <bouanto@zoho.com>2025-06-14 17:44:47 -0400
commit735a6d3a50d422cb2cd4b1a6275481c6ae393834 (patch)
treefa675a64d1c8d9a64d1e9113dfabb91f5e5a7dfa
parent5bd2c804b0972158fda69cb3500024f1bfd4d0e7 (diff)
downloadrust-735a6d3a50d422cb2cd4b1a6275481c6ae393834.tar.gz
rust-735a6d3a50d422cb2cd4b1a6275481c6ae393834.zip
Switch to gcc-14 by default to fix some run-make tests
-rw-r--r--.github/workflows/ci.yml12
-rw-r--r--.github/workflows/release.yml8
2 files changed, 14 insertions, 6 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ab46c73c0ad..453e8b54013 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -50,11 +50,7 @@ jobs:
 
     - name: Install packages
       # `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
-      run: sudo apt-get install ninja-build ripgrep llvm-14-tools llvm libstdc++6
-
-    - run: g++ -v
-
-    - run: find / -name libstdc++.so | true
+      run: sudo apt-get install ninja-build ripgrep llvm-14-tools llvm
 
     - name: Install rustfmt & clippy
       run: rustup component add rustfmt clippy
@@ -67,6 +63,12 @@ jobs:
           sudo dpkg --force-overwrite -i ${{ matrix.libgccjit_version.gcc }}
           echo 'gcc-path = "/usr/lib/"' > config.toml
 
+    # Some run-make tests fail if we use our forked GCC because it doesn't
+    # bundle libstdc++, so we switch to gcc-14 to have a GCC that has
+    # libstdc++.
+    - name: Set default GCC to gcc-14
+      run: sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 30
+
     - name: Set env
       run: |
         echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a75c2910b80..1d8eaf9a141 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -39,7 +39,7 @@ jobs:
 
     - name: Install packages
       # `llvm-14-tools` is needed to install the `FileCheck` binary which is used for run-make tests.
-      run: sudo apt-get install ninja-build ripgrep llvm-14-tools llvm libstdc++6
+      run: sudo apt-get install ninja-build ripgrep llvm-14-tools llvm
 
     - name: Download artifact
       run: curl -LO https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
@@ -49,6 +49,12 @@ jobs:
           sudo dpkg --force-overwrite -i gcc-15.deb
           echo 'gcc-path = "/usr/lib/"' > config.toml
 
+    # Some run-make tests fail if we use our forked GCC because it doesn't
+    # bundle libstdc++, so we switch to gcc-14 to have a GCC that has
+    # libstdc++.
+    - name: Set default GCC to gcc-14
+      run: sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 30
+
     - name: Set env
       run: |
         echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV