Skip to content

Commit

Permalink
rust: update to 1.70.0
Browse files Browse the repository at this point in the history
set _bootstrapping=no for clang (temporarily?)
remove 0012-revert-install-llvm-tools.patch
  • Loading branch information
filnet committed Jun 3, 2023
1 parent 214fba1 commit afde6f4
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 77 deletions.
2 changes: 1 addition & 1 deletion mingw-w64-rust/0004-unbundle-gcc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@@ -342,7 +344,7 @@
// install will *also* include the rust-mingw package, which also needs
// licenses, so to be safe we just include it here in all MinGW packages.
if host.ends_with("pc-windows-gnu") {
if host.ends_with("pc-windows-gnu") && builder.config.dist_include_mingw_linker {
- make_win_dist(tarball.image_dir(), &tmpdir(builder), host, builder);
+ // make_win_dist(tarball.image_dir(), &tmpdir(builder), host, builder);
tarball.add_dir(builder.src.join("src/etc/third-party"), "share/doc");
Expand Down
62 changes: 31 additions & 31 deletions mingw-w64-rust/0005-win32-config.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- rustc-1.30.1-src/src/bootstrap/configure.py.orig 2018-11-10 03:13:51.191178900 +0300
+++ rustc-1.30.1-src/src/bootstrap/configure.py 2018-11-10 03:16:36.580638600 +0300
@@ -289,6 +289,11 @@
--- rustc-1.70.0-src/src/bootstrap/configure.py.orig 2023-05-29 19:14:10.000000000 +0200
+++ rustc-1.70.0-src/src/bootstrap/configure.py 2023-05-31 23:58:14.183420700 +0200
@@ -297,6 +297,11 @@
arr[part] = {}
arr = arr[part]

Expand All @@ -10,31 +10,31 @@
+ return '.exe'
+ return ''

for key in known_args:
# The `set` option is special and can be passed a bunch of times
@@ -321,18 +326,18 @@
set('llvm.ccache', 'sccache')
elif option.name == 'local-rust':
for path in os.environ['PATH'].split(os.pathsep):
- if os.path.exists(path + '/rustc'):
- set('build.rustc', path + '/rustc')
+ if os.path.exists(path + '/rustc' + exe_suffix()):
+ set('build.rustc', path + '/rustc' + exe_suffix())
break
for path in os.environ['PATH'].split(os.pathsep):
- if os.path.exists(path + '/cargo'):
- set('build.cargo', path + '/cargo')
+ if os.path.exists(path + '/cargo' + exe_suffix()):
+ set('build.cargo', path + '/cargo' + exe_suffix())
break
elif option.name == 'local-rust-root':
- set('build.rustc', value + '/bin/rustc')
- set('build.cargo', value + '/bin/cargo')
+ set('build.rustc', value + '/bin/rustc' + exe_suffix())
+ set('build.cargo', value + '/bin/cargo' + exe_suffix())
elif option.name == 'llvm-root':
- set('target.{}.llvm-config'.format(build()), value + '/bin/llvm-config')
+ set('target.{}.llvm-config'.format(build()), value + '/bin/llvm-config' + exe_suffix())
elif option.name == 'llvm-config':
set('target.{}.llvm-config'.format(build()), value)
elif option.name == 'llvm-filecheck':
def apply_args(known_args, option_checking, config):
for key in known_args:
@@ -332,18 +337,18 @@
set('llvm.ccache', 'sccache', config)
elif option.name == 'local-rust':
for path in os.environ['PATH'].split(os.pathsep):
- if os.path.exists(path + '/rustc'):
- set('build.rustc', path + '/rustc', config)
+ if os.path.exists(path + '/rustc' + exe_suffix()):
+ set('build.rustc', path + '/rustc' + exe_suffix(), config)
break
for path in os.environ['PATH'].split(os.pathsep):
- if os.path.exists(path + '/cargo'):
- set('build.cargo', path + '/cargo', config)
+ if os.path.exists(path + '/cargo' + exe_suffix()):
+ set('build.cargo', path + '/cargo' + exe_suffix(), config)
break
elif option.name == 'local-rust-root':
- set('build.rustc', value + '/bin/rustc', config)
- set('build.cargo', value + '/bin/cargo', config)
+ set('build.rustc', value + '/bin/rustc' + exe_suffix(), config)
+ set('build.cargo', value + '/bin/cargo' + exe_suffix(), 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 + '/bin/llvm-config' + exe_suffix(), config)
elif option.name == 'llvm-config':
set('target.{}.llvm-config'.format(build_triple), value, config)
elif option.name == 'llvm-filecheck':
14 changes: 7 additions & 7 deletions mingw-w64-rust/0011-disable-uac-for-installer.patch
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ diff -urN rustc-1.64.0-src.orig/src/tools/rust-installer/build.rs rustc-1.64.0-s
+ }
+ println!("cargo:rerun-if-changed=build.rs");
+}
diff -urN rustc-1.64.0-src.orig/src/tools/rust-installer/Cargo.toml rustc-1.64.0-src/src/tools/rust-installer/Cargo.toml
--- rustc-1.64.0-src.orig/src/tools/rust-installer/Cargo.toml 2022-09-19 16:07:38.000000000 +0200
+++ rustc-1.64.0-src/src/tools/rust-installer/Cargo.toml 2022-11-08 00:17:47.651048800 +0100
@@ -26,3 +26,6 @@
[target."cfg(windows)".dependencies]
lazy_static = "1"
winapi = { version = "0.3", features = ["errhandlingapi", "handleapi", "ioapiset", "winerror", "winioctl", "winnt"] }
diff -urN rustc-1.70.0-src/src/tools/rust-installer/Cargo.toml.orig rustc-1.70.0-src/src/tools/rust-installer/Cargo.toml
--- rustc-1.70.0-src/src/tools/rust-installer/Cargo.toml.orig 2023-06-02 01:41:35.452626900 +0200
+++ rustc-1.70.0-src/src/tools/rust-installer/Cargo.toml 2023-06-02 01:45:20.662796000 +0200
@@ -22,3 +22,6 @@
[dependencies.clap]
features = ["derive"]
version = "3.1"
+
+[build-dependencies]
+embed-manifest = "1.3.1"
25 changes: 0 additions & 25 deletions mingw-w64-rust/0012-revert-install-llvm-tools.patch

This file was deleted.

23 changes: 10 additions & 13 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

_realname=rust
_bootstrapping=yes
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
_bootstrapping=no
fi
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-rust-docs")
pkgver=1.69.0
pkgrel=2
pkgver=1.70.0
pkgrel=1
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
Expand All @@ -39,17 +39,15 @@ source=("https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz"{,
"0005-win32-config.patch"
"0007-clang-subsystem.patch"
"0008-disable-self-contained.patch"
"0011-disable-uac-for-installer.patch"
"0012-revert-install-llvm-tools.patch")
sha256sums=('fb05971867ad6ccabbd3720279f5a94b99f61024923187b56bb5c455fa3cf60f'
"0011-disable-uac-for-installer.patch")
sha256sums=('b2bfae000b7a5040e4ec4bbc50a09f21548190cb7570b0ed77358368413bd27c'
'SKIP'
'7cb1773c288ffb1c1e751edc49b1890c84bf9c362742bc5225d19d474edb73a0'
'36c531c73a2c12b3e66aa22526a404c3f770f1ab7e0e76c55af6fcc1a17e46fe'
'c4e5ffeef84296d39c3e3e8f807fc8b33ce786b1e4edb21eef26b053586aca27'
'15d897850d474afd004b071926a81f1f72b13330d0b56d565090b10f868cc766'
'7d1c4e49524b835a8eadc961b39f5594b12a522a1e24368999be2c7e85399e4e'
'3388c413fffeeaa84f775a176b1653b360ffba7b0c0a6f5baa0c3a95aec8827a'
'a214cd8394ab7416fd170c7fa05daf701a5357d38e4e54149370e6efff208e50'
'e72ee077cd62bfc24c592a12ca27242d24ee14237d414c7e8fc4004bf8b031b8'
'fc14094d0a0fde559be647fd9063260592378ac38d88a640b24ee85a1400be0c')
'951f6278ce661136912be343ef50047ef46c409313050c711978651b301e80dd')
validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
Expand Down Expand Up @@ -89,8 +87,7 @@ prepare() {
0001-rustc-llvm-fix-libs.patch \
0004-unbundle-gcc.patch \
0005-win32-config.patch \
0008-disable-self-contained.patch \
0012-revert-install-llvm-tools.patch
0008-disable-self-contained.patch

if [[ $MINGW_PACKAGE_PREFIX == *-clang-i686 || $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
apply_patch_with_msg \
Expand All @@ -107,7 +104,7 @@ build() {
mkdir -p "${srcdir}/${MSYSTEM}" && cd "${srcdir}/${MSYSTEM}"

# The ultimate hack to let the bootstrap compiler use libgcc* libs
if [[ $MINGW_PACKAGE_PREFIX == *-clang-i686 || $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
if [[ $_bootstrapping != "no" ]] && [[ $MINGW_PACKAGE_PREFIX == *-clang-i686 || $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
export GCC_LIBS_HACK="$(cygpath -am build/missing-libs-hack)"
mkdir -p "${GCC_LIBS_HACK}"
cp "$(cygpath -u $(clang -print-libgcc-file-name))" "${GCC_LIBS_HACK}/libgcc.a"
Expand Down

0 comments on commit afde6f4

Please sign in to comment.