Skip to content

Commit ebd8557

Browse files
committed
Auto merge of #144140 - GuillaumeGomez:subtree-update_cg_gcc_2025-07-18, r=GuillaumeGomez
Subtree update cg gcc 2025 07 18 cc `@antoyo` r? ghost
2 parents 8f08b3a + f16474f commit ebd8557

File tree

20 files changed

+82
-629
lines changed

20 files changed

+82
-629
lines changed

compiler/rustc_codegen_gcc/.github/workflows/m68k.yml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ permissions:
1414
env:
1515
# Enable backtraces for easier debugging
1616
RUST_BACKTRACE: 1
17-
# TODO: remove when confish.sh is removed.
18-
OVERWRITE_TARGET_TRIPLE: m68k-unknown-linux-gnu
1917

2018
jobs:
2119
build:
@@ -59,14 +57,12 @@ jobs:
5957

6058
- name: Setup path to libgccjit
6159
run: |
62-
sudo dpkg -i gcc-m68k-15.deb
60+
sudo dpkg --force-overwrite -i gcc-m68k-15.deb
6361
echo 'gcc-path = "/usr/lib/"' > config.toml
6462
6563
- name: Set env
6664
run: |
6765
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
68-
69-
7066
7167
#- name: Cache rust repository
7268
## We only clone the rust repository for rustc tests
@@ -86,16 +82,20 @@ jobs:
8682
- name: Build sample project with target defined as JSON spec
8783
run: |
8884
./y.sh prepare --only-libcore --cross
89-
./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
90-
./y.sh cargo build --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
85+
./y.sh build --sysroot --features compiler-builtins-no-f16-f128 --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
86+
CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ./y.sh cargo build --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
9187
./y.sh clean all
9288
9389
- name: Build
9490
run: |
9591
./y.sh prepare --only-libcore --cross
96-
./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu
97-
./y.sh test --mini-tests
98-
CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu ./y.sh test --cargo-tests
92+
./y.sh build --sysroot --features compiler-builtins-no-f16-f128 --target-triple m68k-unknown-linux-gnu
93+
./y.sh test --mini-tests --target-triple m68k-unknown-linux-gnu
94+
# FIXME: since https://github.com/rust-lang/rust/pull/140809, we cannot run programs for architectures not
95+
# supported by the object crate, since this adds a dependency on symbols.o for the panic runtime.
96+
# And as such, a wrong order of the object files in the linker command now fails with an undefined reference
97+
# to some symbols like __rustc::rust_panic.
98+
#CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu ./y.sh test --cargo-tests --target-triple m68k-unknown-linux-gnu
9999
./y.sh clean all
100100
101101
- name: Prepare dependencies
@@ -104,9 +104,23 @@ jobs:
104104
git config --global user.name "User"
105105
./y.sh prepare --cross
106106
107-
- name: Run tests
108-
run: |
109-
./y.sh test --release --clean --build-sysroot --sysroot-features compiler_builtins/no-f16-f128 ${{ matrix.commands }}
107+
# FIXME: We cannot run programs for architectures not supported by the object crate. See comment above.
108+
#- name: Run tests
109+
#run: |
110+
#./y.sh test --target-triple m68k-unknown-linux-gnu --release --clean --build-sysroot --sysroot-features compiler-builtins-no-f16-f128 ${{ matrix.commands }}
111+
112+
# FIXME: We cannot run programs for architectures not supported by the object crate. See comment above.
113+
#- name: Run Hello World!
114+
#run: |
115+
#./y.sh build --target-triple m68k-unknown-linux-gnu
116+
117+
#vm_dir=$(pwd)/vm
118+
#cd tests/hello-world
119+
#CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ../../y.sh cargo build --target m68k-unknown-linux-gnu
120+
#sudo cp target/m68k-unknown-linux-gnu/debug/hello_world $vm_dir/home/
121+
#sudo chroot $vm_dir qemu-m68k-static /home/hello_world > hello_world_stdout
122+
#expected_output="40"
123+
#test $(cat hello_world_stdout) == $expected_output || (echo "Output differs. Actual output: $(cat hello_world_stdout)"; exit 1)
110124

111125
# Summary job for the merge queue.
112126
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

compiler/rustc_codegen_gcc/.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ jobs:
7878
- name: Run tests
7979
run: |
8080
# FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
81-
echo -n 'lto = "fat"' >> build_system/build_sysroot/Cargo.toml
81+
# FIXME(antoyo): this should probably not be needed since we embed the LTO bitcode.
82+
printf '[profile.release]\nlto = "fat"\n' >> build/build_sysroot/sysroot_src/library/Cargo.toml
8283
EMBED_LTO_BITCODE=1 ./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}
8384
8485
- name: Run y.sh cargo build

0 commit comments

Comments
 (0)