#!/bin/sh -e
# SPDX-FileCopyrightText: 2026 Raspberry Pi
# SPDX-License-Identifier: GPL-3.0-or-later
# Verify that LTO compilation works end-to-end.
riscv32-pico-elf-gcc -flto -o "$AUTOPKGTEST_TMP"/hello_lto debian/tests/hello.c
file "$AUTOPKGTEST_TMP"/hello_lto | grep -q 'ELF 32-bit LSB executable, UCB RISC-V'
echo "LTO compile-and-link test passed"
