diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index edd14b9..309e763 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 200 +Version: 201 Release: 1%{?dist} # No version specified. License: GPL+ @@ -127,6 +127,9 @@ Requires: %{_bindir}/grep Requires: %{_bindir}/sed Requires: %{_bindir}/xargs +# for brp-llvm-compile-lto-elf +Requires: (llvm if clang) + # -fstack-clash-protection and -fcf-protection require GCC 8. Conflicts: gcc < 8.0.1-0.22 @@ -250,6 +253,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog +* Mon May 08 2023 Nikita Popov - 201-1 +- Add llvm dependency if clang toolchain used +- Resolves: rhbz#2193406 + * Wed Apr 19 2023 Nikita Popov - 200-1 - Change clang LTO default to ThinLTO - Resolves: rhbz#2178788 diff --git a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.c b/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.c deleted file mode 100644 index 851790f..0000000 --- a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello(void) { - printf("Hello, world!\n"); -} diff --git a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.h b/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.h deleted file mode 100644 index ef77476..0000000 --- a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.h +++ /dev/null @@ -1 +0,0 @@ -void hello(void); diff --git a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.spec b/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.spec deleted file mode 100644 index d8bfb32..0000000 --- a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.spec +++ /dev/null @@ -1,34 +0,0 @@ -Name: brp-llvm-compile-lto-elf-test-lib -Version: 1 -Release: 1 -Summary: Library package for testing brp-llvm-compile-lto-elf -License: MIT - -BuildRequires: clang binutils -Source0: %{name}.c -Source1: %{name}.h - -# FIXME: I'm not sure why this doesn't work -%undefine _package_note_file - -%global toolchain clang - -%description -%{summary} - -%build - -clang ${CFLAGS} -c %{SOURCE0} -o lib.o -ar cr %{name}.a lib.o -ranlib %{name}.a - -%install -mkdir -p %{buildroot}%{_libdir} -mkdir -p %{buildroot}%{_includedir} - -%{__install} -p -m 644 -t %{buildroot}%{_libdir} %{name}.a -%{__install} -p -m 644 -t %{buildroot}%{_includedir} %{SOURCE1} - -%files -%{_libdir}/%{name}.a -%{_includedir}/%{name}.h diff --git a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test/brp-llvm-compile-lto-elf-test.c b/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test/brp-llvm-compile-lto-elf-test.c deleted file mode 100644 index eab7d69..0000000 --- a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test/brp-llvm-compile-lto-elf-test.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test/brp-llvm-compile-lto-elf-test.spec b/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test/brp-llvm-compile-lto-elf-test.spec deleted file mode 100644 index a43e545..0000000 --- a/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test/brp-llvm-compile-lto-elf-test.spec +++ /dev/null @@ -1,24 +0,0 @@ -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} - -%check -./%{name} | grep "Hello, world!" diff --git a/tests/brp-llvm-compile-lto-elf/main.fmf b/tests/brp-llvm-compile-lto-elf/main.fmf deleted file mode 100644 index ada5230..0000000 --- a/tests/brp-llvm-compile-lto-elf/main.fmf +++ /dev/null @@ -1,8 +0,0 @@ -Summary: Test that the brp-llvm-compile-lto-elf script is working correctly - -require: - - dnf-plugins-core - - redhat-rpm-config - - rpm-build - -test: ./runtest.sh diff --git a/tests/brp-llvm-compile-lto-elf/runtest.sh b/tests/brp-llvm-compile-lto-elf/runtest.sh deleted file mode 100755 index 1690d65..0000000 --- a/tests/brp-llvm-compile-lto-elf/runtest.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -set -ex - -lib_dir=brp-llvm-compile-lto-elf-test-lib -lib_spec=$lib_dir/brp-llvm-compile-lto-elf-test-lib.spec - -dnf -y build-dep $lib_spec -rpmbuild --define "_sourcedir ." --define "_builddir ./$lib_dir" --define "_rpmdir ." -bb $lib_spec - -dnf -y install ./`rpm --eval '%{_arch}'`/*.rpm - -test_dir=brp-llvm-compile-lto-elf-test -test_spec=$test_dir/brp-llvm-compile-lto-elf-test.spec - -dnf -y build-dep $test_spec -rpmbuild --define "_sourcedir ." --define "_builddir ./$test_dir" -bi $test_spec