Skip to content

Commit 3769549

Browse files
committed
Test wrt libstdc++
1 parent 5bd2c80 commit 3769549

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ jobs:
5252
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
5353
run: sudo apt-get install ninja-build ripgrep llvm-14-tools llvm libstdc++6
5454

55-
- run: g++ -v
55+
- run: find / -name libstdc++.so.6 2> /dev/null || true
56+
- run: find / -name libstdc++.so 2> /dev/null || true
5657

57-
- run: find / -name libstdc++.so | true
58+
- run: |
59+
ls $(which cc)
60+
cc tests/main.cpp -o main -lstdc++
61+
ldd main
5862
5963
- name: Install rustfmt & clippy
6064
run: rustup component add rustfmt clippy
@@ -67,6 +71,29 @@ jobs:
6771
sudo dpkg --force-overwrite -i ${{ matrix.libgccjit_version.gcc }}
6872
echo 'gcc-path = "/usr/lib/"' > config.toml
6973
74+
#- name: Install libstdc++
75+
#run: |
76+
#sudo apt-get --reinstall install libstdc++6
77+
#sudo mkdir -p /usr/lib/gcc/x86_64-linux-gnu/15/
78+
#sudo mkdir -p /usr/lib/gcc/x86_64-linux-gnu/16/
79+
#sudo cp /usr/lib/gcc/x86_64-linux-gnu/14/libstdc++.so /usr/lib/gcc/x86_64-linux-gnu/15/
80+
#sudo cp /usr/lib/gcc/x86_64-linux-gnu/14/libstdc++.so /usr/lib/gcc/x86_64-linux-gnu/16/
81+
82+
- run: find / -name libstdc++.so.6 2> /dev/null || true
83+
- run: find / -name libstdc++.so 2> /dev/null || true
84+
85+
- run: g++ -v
86+
- run: cc -v
87+
88+
- run: |
89+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 30
90+
cc -v
91+
92+
- run: ls /usr/bin
93+
94+
- run: cc tests/main.cpp -o main -lstdc++
95+
#- run: cc tests/main.cpp -o main
96+
7097
- name: Set env
7198
run: |
7299
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
sudo dpkg --force-overwrite -i gcc-15.deb
5050
echo 'gcc-path = "/usr/lib/"' > config.toml
5151
52+
- run: sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 30
53+
5254
- name: Set env
5355
run: |
5456
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV

tests/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <iostream>
2+
3+
int main() {
4+
std::cout << "Hello, world!\n";
5+
return 0;
6+
}

0 commit comments

Comments
 (0)