#!/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-g++ -o "$AUTOPKGTEST_TMP"/hello_cpp debian/tests/hello.cpp
file "$AUTOPKGTEST_TMP"/hello_cpp | grep -q 'ELF 32-bit LSB executable, UCB RISC-V'
echo "C++ compile-and-link test passed"
