mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 03:39:52 +00:00
loader: add the Gate A2 hosted C program and its test (#419)
An original C program, tests/compat_fixtures/gate_a2.c, is built from source with the mingw-w64 C runtime (UCRT) and run through the loader, the standard services and the ARM64 DBT. The runtime's own startup code runs before main; the program uses argc and argv, the heap, qsort, printf, a file written with fprintf and read back with fgets, atexit, and a return from main. Expected output is recomputed in Rust, not read back from a run. Control variants end in a failed check, in exit(42) and in abort(). The test fails, and does not skip, when the compiler is missing, so the CI workflow installs mingw-w64. Nothing from mingw-w64 is stored in the repository. Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
This commit is contained in:
1 parent
db80c0b3e3
commit
0a17f0cb73
8 files changed
+803
-18
No files matched your search
@@ -35,6 +35,17 @@ jobs:
|
||||
run: |
|
||||
rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal --component rustfmt --component clippy
|
||||
rustc -vV
|
||||
- name: Install the Gate A2 C toolchain
|
||||
# crates/loader/tests/gate_a2.rs builds a hosted C program from source
|
||||
# with mingw-w64 and fails, never skips, when the compiler is missing.
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
brew install mingw-w64
|
||||
compiler="$(brew --prefix mingw-w64)/bin/x86_64-w64-mingw32-gcc"
|
||||
"$compiler" --version | head -1
|
||||
file -bL "$compiler" | grep arm64
|
||||
- name: Check generated status and PE fixtures
|
||||
run: |
|
||||
python3 crates/isa/generate_rdna2_meta.py --check
|
||||
|
||||
Reference in new issue
Block a user