4949 run : |
5050 sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
5151 sudo apt update
52- sudo apt-get install ninja-build ripgrep llvm-14-tools gcc-13 gcc-multilib
52+ sudo apt-get install ninja-build ripgrep llvm-14-tools
5353
5454 - name : Install libgccjit12
5555 if : matrix.libgccjit_version.gcc == 'libgccjit12.so'
@@ -67,46 +67,81 @@ jobs:
6767 event : push
6868 search_artifacts : true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
6969
70+ - name : Download artifact
71+ if : matrix.libgccjit_version.gcc != 'libgccjit12.so'
72+ uses : dawidd6/action-download-artifact@v2
73+ with :
74+ workflow : main.yml
75+ name : gcc-13
76+ path : gcc-13
77+ repo : antoyo/gcc
78+ branch : " master"
79+ event : push
80+ search_artifacts : true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
81+
7082 - name : Setup path to libgccjit
7183 if : matrix.libgccjit_version.gcc == 'libgccjit12.so'
7284 run : echo /usr/lib/gcc/x86_64-linux-gnu/12 > gcc_path
7385
7486 - name : Setup path to libgccjit
7587 if : matrix.libgccjit_version.gcc != 'libgccjit12.so'
7688 run : |
77-
78- echo stddef.h
79- find / -name stddef.h 2> /dev/null || true
80- echo "************"
81-
82- echo lto1
83- find / -name lto1 2> /dev/null || true
84- echo "************"
85-
86- echo lto-wrapper
87- find / -name lto-wrapper 2> /dev/null || true
88- echo "************"
89-
90- echo gcc
91- find / -name gcc 2> /dev/null || true
92- echo "************"
93-
94- echo liblto_plugin.so
95- find / -name liblto_plugin.so 2> /dev/null || true
96- echo "************"
97-
98- echo $(readlink -f gcc-build/build/gcc) > gcc_path
99- # NOTE: the filename is still libgccjit.so even when the artifact name is different.
100- ln gcc-build/build/gcc/libgccjit.so gcc-build/build/gcc/libgccjit.so.0
101- mkdir -p /opt/gcc/libexec/gcc/x86_64-linux-gnu/13 /opt/gcc/libexec/x86_64-linux-gnu/13/
102- cd gcc-build/build/gcc
103- chmod +x lto-wrapper lto1
104- cp *lto* /opt/gcc/libexec/gcc/x86_64-linux-gnu/13/
105- cp /usr/lib/gcc/x86_64-linux-gnu/12/libgcc_s.so /opt/gcc/libexec/x86_64-linux-gnu/13/
106- cp /usr/lib/gcc/x86_64-linux-gnu/12/libgcc.a /opt/gcc/libexec/
107- cp /usr/libexec/gcc/x86_64-linux-gnu/13/cc1 /opt/gcc/libexec/gcc/cc1
108- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
109- sudo update-alternatives --all
89+ sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb
90+ echo /usr/lib/ > gcc_path
91+
92+ #echo stddef.h
93+ #find / -name stddef.h 2> /dev/null || true
94+ #echo "************"
95+
96+ #echo lto1
97+ #find / -name lto1 2> /dev/null || true
98+ #echo "************"
99+ # /usr/libexec/gcc/x86_64-linux-gnu/13/lto1
100+ # /usr/lib/gcc/x86_64-linux-gnu/12/lto1
101+
102+ #echo lto-wrapper
103+ #find / -name lto-wrapper 2> /dev/null || true
104+ #echo "************"
105+ # /usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper
106+ # /usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
107+
108+ #echo gcc
109+ #find / -name gcc 2> /dev/null || true
110+ #echo "************"
111+
112+ #echo liblto_plugin.so
113+ #find / -name liblto_plugin.so 2> /dev/null || true
114+ #echo "************"
115+ # /usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so
116+ # /usr/lib/gcc/x86_64-linux-gnu/12/liblto_plugin.so
117+ # /usr/lib/gcc/x86_64-linux-gnu/13/liblto_plugin.so
118+
119+ #echo $(readlink -f gcc-build/build/gcc) > gcc_path
120+ ## NOTE: the filename is still libgccjit.so even when the artifact name is different.
121+ #ln gcc-build/build/gcc/libgccjit.so gcc-build/build/gcc/libgccjit.so.0
122+ ##mkdir -p /opt/gcc/libexec/gcc/x86_64-linux-gnu/13 /opt/gcc/libexec/x86_64-linux-gnu/13/
123+ #sudo mkdir -p /usr/lib/gcc/x86_64-pc-linux-gnu/13.0.0/ /usr/libexec/gcc/x86_64-pc-linux-gnu/13.0.0
124+ #sudo cp gcc-build/install/bin/gcc /usr/bin/gcc-13
125+ #cd gcc-build/build/gcc
126+ #chmod +x lto-wrapper lto1
127+ ##sudo cp liblto_plugin.so /usr/lib/gcc/x86_64-pc-linux-gnu/13.0.0/liblto_plugin.so # FIXME: might not work.
128+ #sudo cp liblto_plugin.so /usr/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/liblto_plugin.so # TODO: should work.
129+ #sudo cp lto1 /usr/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto1
130+ #sudo cp lto-wrapper /usr/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper
131+
132+ # TODO TODO TODO: probably need to build gcc with --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib
133+ # TODO TODO TODO: bundle that into a .deb file.
134+ # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gcc11
135+
136+ ##cp /usr/lib/gcc/x86_64-linux-gnu/12/libgcc_s.so /opt/gcc/libexec/x86_64-linux-gnu/13/
137+ ## TODO: copy from version 13.
138+ ## TODO: understand why it doesn't pick the one from the version 13 automatically.
139+ #sudo cp /usr/lib/gcc/x86_64-linux-gnu/12/libgcc_s.so /usr/lib/
140+ #sudo cp /usr/lib/gcc/x86_64-linux-gnu/12/libgcc.a /usr/lib
141+ ##cp /usr/lib/gcc/x86_64-linux-gnu/12/libgcc.a /opt/gcc/libexec/
142+ ##cp /usr/libexec/gcc/x86_64-linux-gnu/13/cc1 /opt/gcc/libexec/gcc/cc1
143+ #sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
144+ #sudo update-alternatives --all
110145
111146 - name : Set env
112147 run : |
@@ -174,6 +209,9 @@ jobs:
174209 if : ${{ matrix.libgccjit_version.gcc == 'libgccjit12.so' }}
175210 run : cat failing-ui-tests12.txt >> failing-ui-tests.txt
176211
212+ - name : Add more failing tests because the sysroot is not compiled with LTO
213+ run : cat failing-non-lto-tests.txt >> failing-ui-tests.txt
214+
177215 - name : Run tests
178216 run : |
179217 ${{ matrix.libgccjit_version.env_extra }} ./test.sh --release --clean --build-sysroot ${{ matrix.commands }} ${{ matrix.libgccjit_version.extra }}
0 commit comments