Switch to building with clang

This commit is contained in:
Nikita Popov 2022-09-23 17:18:35 +02:00
parent 7121d6eea6
commit 2986b2b297
2 changed files with 6 additions and 30 deletions

View File

@ -1,25 +0,0 @@
From c6d15e4a5fc0a012356eb984e617ddb6d05ff8a6 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 29 Jul 2022 23:37:43 -0700
Subject: [PATCH] Fix for compiler-rt stand-alone builds
---
compiler-rt/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 62737735695f..70568cdb201c 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -68,7 +68,7 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOL
"Build for a bare-metal target.")
if (COMPILER_RT_STANDALONE_BUILD)
- load_llvm_config()
+ find_package(LLVM)
if (TARGET intrinsics_gen)
# Loading the llvm config causes this target to be imported so place it
# under the appropriate folder in an IDE.
--
2.27.0

View File

@ -1,3 +1,4 @@
%global toolchain clang
%global compiler_rt_version 15.0.0
#global rc_ver 3
%global crt_srcdir compiler-rt-%{compiler_rt_version}%{?rc_ver:rc%{rc_ver}}.src
@ -10,7 +11,7 @@
Name: compiler-rt
Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}
Release: 2%{?dist}
Release: 3%{?dist}
Summary: LLVM "compiler-rt" runtime libraries
License: NCSA or MIT
@ -19,10 +20,7 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compil
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz.sig
Source2: release-keys.asc
Patch0: 0001-Fix-for-compiler-rt-stand-alone-builds.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: clang
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: python3
@ -113,6 +111,9 @@ popd
%endif
%changelog
* Fri Sep 23 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-3
- Switch to building with clang
* Tue Sep 13 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-2
- Make sure asm files are built with -fcf-protection