redhat-rpm-config/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test/brp-llvm-compile-lto-elf-test.spec
Nikita Popov 820c23a121 Also test brp-llvm-compile-lto-elf on object file
This serves the dual purpose on making sure that plain object
files can also be converted to ELF, and that the script handles
more than a single file.
2023-09-29 09:33:12 +02:00

27 lines
581 B
RPMSpec

Name: brp-llvm-compile-lto-elf-test
Version: 1
Release: 1
Summary: Library package for testing brp-llvm-compile-lto-elf
License: MIT
BuildRequires: gcc
BuildRequires: brp-llvm-compile-lto-elf-test-lib
Source0: %{name}.c
# FIXME: I'm not sure why this doesn't work
%undefine _package_note_file
%description
%{summary}
%build
gcc ${CFLAGS} -c %{SOURCE0} -o %{name}.o
gcc ${LDFLAGS} %{name}.o %{_libdir}/%{name}-lib.a -o %{name}-ar
gcc ${LDFLAGS} %{name}.o %{_libdir}/%{name}-lib.o -o %{name}-obj
%check
./%{name}-ar | grep "Hello, world!"
./%{name}-obj | grep "Hello, world!"