[arch-commits] Commit in rust/trunk (4 files)

Jan Steffens heftig at gemini.archlinux.org
Thu Aug 11 16:42:52 UTC 2022


    Date: Thursday, August 11, 2022 @ 16:42:51
  Author: heftig
Revision: 452581

1.63.0-1

Added:
  rust/trunk/remove-include-linux-fs.h.patch
Modified:
  rust/trunk/0001-bootstrap-Change-libexec-dir.patch
  rust/trunk/0002-compiler-Change-LLVM-targets.patch
  rust/trunk/PKGBUILD

-----------------------------------------+
 0001-bootstrap-Change-libexec-dir.patch |    4 +-
 0002-compiler-Change-LLVM-targets.patch |   10 ++---
 PKGBUILD                                |   25 ++++++------
 remove-include-linux-fs.h.patch         |   59 ++++++++++++++++++++++++++++++
 4 files changed, 78 insertions(+), 20 deletions(-)

Modified: 0001-bootstrap-Change-libexec-dir.patch
===================================================================
--- 0001-bootstrap-Change-libexec-dir.patch	2022-08-11 16:38:31 UTC (rev 452580)
+++ 0001-bootstrap-Change-libexec-dir.patch	2022-08-11 16:42:51 UTC (rev 452581)
@@ -8,10 +8,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index 6181a611ec31..ef2eccab8dc3 100644
+index b1fae356d893..a9783708d7a7 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -968,7 +968,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
+@@ -950,7 +950,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
          for dirent in fs::read_dir(cargo.parent().unwrap()).expect("read_dir") {
              let dirent = dirent.expect("read dir entry");
              if dirent.file_name().to_str().expect("utf8").starts_with("cargo-credential-") {

Modified: 0002-compiler-Change-LLVM-targets.patch
===================================================================
--- 0002-compiler-Change-LLVM-targets.patch	2022-08-11 16:38:31 UTC (rev 452580)
+++ 0002-compiler-Change-LLVM-targets.patch	2022-08-11 16:42:51 UTC (rev 452581)
@@ -24,10 +24,10 @@
  4 files changed, 12 insertions(+), 3 deletions(-)
 
 diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 530c1a06f8f4..bb6228bd4a7b 100644
+index 14ad1a42a7d8..efd47c47293b 100644
 --- a/compiler/rustc_session/src/config.rs
 +++ b/compiler/rustc_session/src/config.rs
-@@ -1830,7 +1830,7 @@ pub fn parse_target_triple(
+@@ -1867,7 +1867,7 @@ pub fn parse_target_triple(
                  early_error(error_format, &format!("target file {path:?} does not exist"))
              })
          }
@@ -50,11 +50,11 @@
          data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
              f64:32:64-f80:32-n8:16:32-S128"
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 832eeec3e8b2..d35c0b342869 100644
+index da0589cdd209..dc9865bdf64a 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -2424,6 +2424,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
-         Ok(TargetTriple::TargetPath(canonicalized_path))
+@@ -2506,6 +2506,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
+         Ok(TargetTriple::TargetJson { path_for_rustdoc: canonicalized_path, triple, contents })
      }
  
 +    /// Creates a target triple from its alias

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-11 16:38:31 UTC (rev 452580)
+++ PKGBUILD	2022-08-11 16:42:51 UTC (rev 452581)
@@ -7,7 +7,7 @@
 pkgbase=rust
 pkgname=(rust lib32-rust-libs rust-musl rust-wasm rust-src)
 epoch=1
-pkgver=1.62.1
+pkgver=1.63.0
 pkgrel=1
 pkgdesc="Systems programming language focused on safety, speed and concurrency"
 url=https://www.rust-lang.org/
@@ -14,27 +14,25 @@
 arch=(x86_64)
 license=(MIT Apache)
 options=(!emptydirs !strip !lto)
-_llvm_ver=14.0.6
 depends=(gcc-libs llvm-libs curl libssh2 gcc)
-makedepends=(rust "llvm=$_llvm_ver" libffi lib32-gcc-libs perl python cmake musl
-             ninja wasi-libc lld)
+makedepends=(rust llvm libffi lib32-gcc-libs perl python cmake musl ninja
+             wasi-libc lld)
 checkdepends=(procps-ng gdb)
 source=(
   "https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
-  "https://github.com/llvm/llvm-project/releases/download/llvmorg-$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz"{,.sig}
   0001-cargo-Change-libexec-dir.patch
   0001-bootstrap-Change-libexec-dir.patch
   0002-compiler-Change-LLVM-targets.patch
   0003-compiler-Use-wasm-ld-for-wasm-targets.patch
+  remove-include-linux-fs.h.patch
 )
-sha256sums=('72acbe6ffcd94f598382a7430b0d85ee8f679e6d0b27f3f566ed1c16c978133f'
+sha256sums=('1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0'
             'SKIP'
-            '88df303840ca8fbff944e15e61c141226fe79f5d2b8e89fb024264d77841a02e'
-            'SKIP'
             'c901a9bb036c29ca092f7dbc8b447efdd9aa1044a902a88f9d024cb22681dc19'
-            '839c342ea915ca55adaf1de5d18676ae8e7474265debde0f9e424c17abf2d51f'
-            'ae69ccf45641064c950d8f8cabf74858e0c33f3ddc069930a994d7bf327c3215'
-            '26bf232d144b81a303ed91f6a331ddf004c5d9fefd41a11e36b61812a34459aa')
+            '7080a88e44234aa363ba6321f319c8d9621382dd9581748a43847dae005e55bd'
+            '5137df0a3399e279db4c5b83ae8e99d2c1977f62aec2f90521edb02f51597064'
+            '26bf232d144b81a303ed91f6a331ddf004c5d9fefd41a11e36b61812a34459aa'
+            '34ed866e313e4580130a50118a4410d36fa0159123982521b6ef049439fc32ad')
 validpgpkeys=(108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE  # Rust Language (Tag and Release Signing Key) <rust-key at rust-lang.org>
               474E22316ABF4785A88C6E8EA2C794A986419D8A) # Tom Stellard <tstellar at redhat.com>
 
@@ -52,6 +50,9 @@
   # Use our wasm-ld
   patch -Np1 -i ../0003-compiler-Use-wasm-ld-for-wasm-targets.patch
 
+  # https://github.com/llvm/llvm-project/issues/56421
+  patch -Np1 -d src/llvm-project < ../remove-include-linux-fs.h.patch
+
   cat >config.toml <<END
 changelog-seen = 2
 profile = "user"
@@ -135,8 +136,6 @@
   cd rustc-$pkgver-src
 
   export RUST_BACKTRACE=1
-  export RUST_COMPILER_RT_ROOT="$srcdir/compiler-rt-$_llvm_ver.src"
-  [[ -d $RUST_COMPILER_RT_ROOT ]]
 
   DESTDIR="$srcdir/dest-rust" python ./x.py install -j "$(nproc)"
 

Added: remove-include-linux-fs.h.patch
===================================================================
--- remove-include-linux-fs.h.patch	                        (rev 0)
+++ remove-include-linux-fs.h.patch	2022-08-11 16:42:51 UTC (rev 452581)
@@ -0,0 +1,59 @@
+From 9cf13067cb5088626ba7ee1ec4c42ec59c7995a0 Mon Sep 17 00:00:00 2001
+From: Fangrui Song <i at maskray.me>
+Date: Mon, 11 Jul 2022 12:53:34 -0700
+Subject: [PATCH] [sanitizer] Remove #include <linux/fs.h> to resolve
+ fsconfig_command/mount_attr conflict with glibc 2.36
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It is generally not a good idea to mix usage of glibc headers and Linux UAPI
+headers (https://sourceware.org/glibc/wiki/Synchronizing_Headers). In glibc
+since 7eae6a91e9b1670330c9f15730082c91c0b1d570 (milestone: 2.36), sys/mount.h
+defines `fsconfig_command` which conflicts with linux/mount.h:
+
+    .../usr/include/linux/mount.h:95:6: error: redeclaration of ‘enum fsconfig_command’
+
+Remove #include <linux/fs.h> which pulls in linux/mount.h. Expand its 4 macros manually.
+Android sys/mount.h doesn't define BLKBSZGET and it still needs linux/fs.h.
+In the long term we should move Linux specific definitions to sanitizer_platform_limits_linux.cpp
+but this commit is easy to cherry pick into older compiler-rt releases.
+
+Fix https://github.com/llvm/llvm-project/issues/56421
+
+Reviewed By: #sanitizers, vitalybuka, zatrazz
+
+Differential Revision: https://reviews.llvm.org/D129471
+---
+ .../sanitizer_platform_limits_posix.cpp                | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+index 4bd425435d56..3a94b260686f 100644
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+@@ -73,7 +73,9 @@
+ #include <sys/vt.h>
+ #include <linux/cdrom.h>
+ #include <linux/fd.h>
++#if SANITIZER_ANDROID
+ #include <linux/fs.h>
++#endif
+ #include <linux/hdreg.h>
+ #include <linux/input.h>
+ #include <linux/ioctl.h>
+@@ -876,10 +878,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT;
+   unsigned IOCTL_EVIOCSKEYCODE_V2 = IOCTL_NOT_PRESENT;
+ #endif
+-  unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS;
+-  unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION;
+-  unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS;
+-  unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION;
++  unsigned IOCTL_FS_IOC_GETFLAGS = _IOR('f', 1, long);
++  unsigned IOCTL_FS_IOC_GETVERSION = _IOR('v', 1, long);
++  unsigned IOCTL_FS_IOC_SETFLAGS = _IOW('f', 2, long);
++  unsigned IOCTL_FS_IOC_SETVERSION = _IOW('v', 2, long);
+   unsigned IOCTL_GIO_CMAP = GIO_CMAP;
+   unsigned IOCTL_GIO_FONT = GIO_FONT;
+   unsigned IOCTL_GIO_UNIMAP = GIO_UNIMAP;



More information about the arch-commits mailing list