#!/bin/sh -e
# SPDX-FileCopyrightText: 2026 Raspberry Pi
# SPDX-License-Identifier: GPL-3.0-or-later
# Verify that the C cross compiler can produce a linked RISC-V ELF binary.
riscv32-pico-elf-gcc -o "$AUTOPKGTEST_TMP"/hello debian/tests/hello.c
file "$AUTOPKGTEST_TMP"/hello | grep -q 'ELF 32-bit LSB executable, UCB RISC-V'
echo "C compile-and-link test passed"
