Use llvm package instead of llvm15

Signed-off-by: cherry530 <707078654@qq.com>
This commit is contained in:
cherry530 2023-07-18 14:54:38 +08:00
parent 166446cce2
commit 11956a3f82
2 changed files with 4 additions and 35 deletions

View File

@ -1,25 +0,0 @@
From c888313af60f14fe4932fef94fb845cd054215fa Mon Sep 17 00:00:00 2001
From: jchzhou <zhoujiacheng@iscas.ac.cn>
Date: Mon, 5 Jun 2023 00:00:45 +0800
Subject: [PATCH] compile with llvm-15
---
src/bootstrap/configure.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index abd28b400..3b8f133b2 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -343,7 +343,7 @@ def apply_args(known_args, option_checking, config):
set('build.rustc', value + '/bin/rustc', config)
set('build.cargo', value + '/bin/cargo', config)
elif option.name == 'llvm-root':
- set('target.{}.llvm-config'.format(build_triple), value + '/bin/llvm-config', config)
+ set('target.{}.llvm-config'.format(build_triple), value + '/lib64/llvm15/bin/llvm-config', config)
elif option.name == 'llvm-config':
set('target.{}.llvm-config'.format(build_triple), value, config)
elif option.name == 'llvm-filecheck':
--
2.41.0

View File

@ -12,7 +12,7 @@
Name: rust
Version: 1.70.0
Release: 1
Release: 2
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
URL: https://www.rust-lang.org
@ -23,7 +23,6 @@ Patch0001: rustc-1.70.0-disable-http2.patch
Patch0002: clippy-driver-usage-should-user-friendly.patch
Patch0003: cargo-help-clippy-should-have-description-to-user.patch
Patch0004: fix-a-println-wrong-format.patch
Patch0005: compile-with-llvm-15.patch
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
Patch0006: 0001-Use-lld-provided-by-system-for-wasm.patch
# Set a substitute-path in rust-gdb for standard library sources.
@ -100,11 +99,7 @@ BuildRequires: cmake >= 2.8.11
%global llvm_root %{_libdir}/%{llvm}
%else
# default llvm is decent enough on riscv64
%ifnarch riscv64
%global llvm llvm15
%else
%global llvm llvm
%endif
%global llvm_root %{_prefix}
%endif
# rust currently requires llvm 14.0+
@ -257,10 +252,6 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
# default llvm is decent enough on riscv64
%ifnarch riscv64
%patch0005 -p1
%endif
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
@ -481,6 +472,9 @@ export %{rust_env}
%{_mandir}/man1/cargo*.1*
%changelog
* Tue Jul 18 2023 xu_ping <707078654@qq.com> - 1.70.0-2
- Use llvm package instead of llvm15
* Mon Jun 05 2023 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.70.0-1
- Update to 1.70.0
- Fix rotten patch