pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/rust rust: Cleanups and fixes from wip.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1b528135135e
branches:  trunk
changeset: 384490:1b528135135e
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Sep 01 09:59:46 2022 +0000

description:
rust: Cleanups and fixes from wip.

No effective functional change to normal builds, primarily whitespace changes,
but does include a fix to the stage0-bootstrap target.

diffstat:

 lang/rust/Makefile                           |  88 ++++++++++++++--------------
 lang/rust/distinfo                           |   4 +-
 lang/rust/do-cross.mk                        |  52 ++++++++--------
 lang/rust/options.mk                         |   3 +-
 lang/rust/patches/patch-src_bootstrap_lib.rs |   4 +-
 5 files changed, 74 insertions(+), 77 deletions(-)

diffs (271 lines):

diff -r 5ca32c8bc8b5 -r 1b528135135e lang/rust/Makefile
--- a/lang/rust/Makefile        Thu Sep 01 09:29:32 2022 +0000
+++ b/lang/rust/Makefile        Thu Sep 01 09:59:46 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.265 2022/08/30 19:22:17 he Exp $
+# $NetBSD: Makefile,v 1.266 2022/09/01 09:59:46 jperkin Exp $
 
 DISTNAME=      rustc-1.62.1-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -28,29 +28,29 @@
 BROKEN_ON_PLATFORM+=   NetBSD-8.*-aarch64
 BROKEN_ON_PLATFORM+=   NetBSD-8.*-sparc64
 
-HAS_CONFIGURE=                 yes
-PYTHON_FOR_BUILD_ONLY=         yes
-CONFIG_SHELL=                  ${PYTHONBIN}
-CONFIGURE_SCRIPT=              src/bootstrap/configure.py
-CONFIGURE_ARGS+=               --prefix=${PREFIX}
-CONFIGURE_ARGS+=               --mandir=${PREFIX}/${PKGMANDIR}
-CONFIGURE_ARGS+=               --sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=               --python=${PYTHONBIN}
-CONFIGURE_ARGS+=               --release-channel=stable
-CONFIGURE_ARGS+=               --local-rust-root=${RUST_BOOTSTRAP_PATH}
-CONFIGURE_ARGS+=               --enable-extended       # Build and install cargo too.
-CONFIGURE_ARGS+=               --enable-rpath
-CONFIGURE_ARGS+=               --disable-codegen-tests
-CONFIGURE_ARGS+=               --disable-compiler-docs
-CONFIGURE_ARGS+=               --disable-llvm-static-stdcpp
-CONFIGURE_ARGS+=               --disable-ninja
-CONFIGURE_ARGS+=               --dist-compression-formats=xz
+HAS_CONFIGURE=         yes
+PYTHON_FOR_BUILD_ONLY= yes
+CONFIG_SHELL=          ${PYTHONBIN}
+CONFIGURE_SCRIPT=      src/bootstrap/configure.py
+CONFIGURE_ARGS+=       --prefix=${PREFIX}
+CONFIGURE_ARGS+=       --mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=       --python=${PYTHONBIN}
+CONFIGURE_ARGS+=       --release-channel=stable
+CONFIGURE_ARGS+=       --local-rust-root=${RUST_BOOTSTRAP_PATH}
+CONFIGURE_ARGS+=       --enable-extended       # Build and install cargo too.
+CONFIGURE_ARGS+=       --enable-rpath
+CONFIGURE_ARGS+=       --disable-codegen-tests
+CONFIGURE_ARGS+=       --disable-compiler-docs
+CONFIGURE_ARGS+=       --disable-llvm-static-stdcpp
+CONFIGURE_ARGS+=       --disable-ninja
+CONFIGURE_ARGS+=       --dist-compression-formats=xz
 
 # Include (optional) settings to cross-build rust
 .include "cross.mk"
 
 # optional from do-cross.mk
-CONFIGURE_ARGS+=               ${ADD_CONFIGURE_ARGS}
+CONFIGURE_ARGS+=       ${ADD_CONFIGURE_ARGS}
 
 # Getting RPATH with $ORIGIN into bootstrap may be troublesome, so
 # uncommenting the LD_LIBRARY_PATH setting may be required to run
@@ -310,39 +310,39 @@
 
 .endif
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
-RUST_STAGE0_VER=       1.61.0
-RUST_ARCH=             aarch64-unknown-netbsd
-RUST_STAGE0:=          rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-RUST_STD_STAGE0:=      rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-DISTFILES:=            ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
-SITES.${RUST_STAGE0}=  ${MASTER_SITE_LOCAL:=rust/}
+RUST_STAGE0_VER=               1.61.0
+RUST_ARCH=                     aarch64-unknown-netbsd
+RUST_STAGE0:=                  rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+RUST_STD_STAGE0:=              rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+DISTFILES:=                    ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
+SITES.${RUST_STAGE0}=          ${MASTER_SITE_LOCAL:=rust/}
 SITES.${RUST_STD_STAGE0}=      ${MASTER_SITE_LOCAL:=rust/}
 .endif
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64eb) || make(distinfo) || make (makesum) || make(mdi)
-RUST_STAGE0_VER=       1.61.0
-RUST_ARCH=             aarch64_be-unknown-netbsd
-RUST_STAGE0:=          rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-RUST_STD_STAGE0:=      rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-DISTFILES:=            ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
-SITES.${RUST_STAGE0}=  ${MASTER_SITE_LOCAL:=rust/}
+RUST_STAGE0_VER=               1.61.0
+RUST_ARCH=                     aarch64_be-unknown-netbsd
+RUST_STAGE0:=                  rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+RUST_STD_STAGE0:=              rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+DISTFILES:=                    ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
+SITES.${RUST_STAGE0}=          ${MASTER_SITE_LOCAL:=rust/}
 SITES.${RUST_STD_STAGE0}=      ${MASTER_SITE_LOCAL:=rust/}
 .endif
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make (makesum) || make(mdi)
-RUST_STAGE0_VER=       1.61.0
-RUST_ARCH=             sparc64-unknown-netbsd
-RUST_STAGE0:=          rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-RUST_STD_STAGE0:=      rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-DISTFILES:=            ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
-SITES.${RUST_STAGE0}=  ${MASTER_SITE_LOCAL:=rust/}
+RUST_STAGE0_VER=               1.61.0
+RUST_ARCH=                     sparc64-unknown-netbsd
+RUST_STAGE0:=                  rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+RUST_STD_STAGE0:=              rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+DISTFILES:=                    ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
+SITES.${RUST_STAGE0}=          ${MASTER_SITE_LOCAL:=rust/}
 SITES.${RUST_STD_STAGE0}=      ${MASTER_SITE_LOCAL:=rust/}
 .endif
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
-RUST_ARCH=             armv7-unknown-netbsd-eabihf
-RUST_STAGE0_VER=       1.61.0
-RUST_STAGE0:=          rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-RUST_STD_STAGE0:=      rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
-DISTFILES:=            ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
-SITES.${RUST_STAGE0}=  ${MASTER_SITE_LOCAL:=rust/}
+RUST_ARCH=                     armv7-unknown-netbsd-eabihf
+RUST_STAGE0_VER=               1.61.0
+RUST_STAGE0:=                  rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+RUST_STD_STAGE0:=              rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
+DISTFILES:=                    ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
+SITES.${RUST_STAGE0}=          ${MASTER_SITE_LOCAL:=rust/}
 SITES.${RUST_STD_STAGE0}=      ${MASTER_SITE_LOCAL:=rust/}
 .endif
 
@@ -544,7 +544,7 @@
                ${CP} `${PKG_CC} -print-file-name=$${lib}` \
                    ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
        done; \
-       for lib in libLLVM-13.so libcrypto.so.1.1 libcurl.so.4 \
+       for lib in libLLVM-14.so libcrypto.so.1.1 libcurl.so.4 \
                   libssl.so.1.1 libz.so.1; do \
                ${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
        done; \
diff -r 5ca32c8bc8b5 -r 1b528135135e lang/rust/distinfo
--- a/lang/rust/distinfo        Thu Sep 01 09:29:32 2022 +0000
+++ b/lang/rust/distinfo        Thu Sep 01 09:59:46 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.148 2022/08/30 19:22:17 he Exp $
+$NetBSD: distinfo,v 1.149 2022/09/01 09:59:46 jperkin Exp $
 
 BLAKE2s (rust-1.61.0-aarch64-apple-darwin.tar.gz) = 302f636b2e73cdd5233e520bdfec0a2071d7c0c3c299780e2de75e727024fb38
 SHA512 (rust-1.61.0-aarch64-apple-darwin.tar.gz) = 248c5d1c3b440aa1ebb8d8d519651259566407f3efd0c33724d274a4f85a371c1b3ead79be24bf38cbca8b57740cb017b26634a4c34c1f3c605d28a8d181a8af
@@ -116,7 +116,7 @@
 SHA1 (patch-src_bootstrap_bootstrap.py) = f836e7fc935680eeb725e2d07ed5905b8ffd1d1f
 SHA1 (patch-src_bootstrap_builder.rs) = e17ec4c4fbcac0824f0e45fb60f35c2db842bc6c
 SHA1 (patch-src_bootstrap_compile.rs) = 858e3b74fc9132d228e07f56ffafacb8e3ba76b8
-SHA1 (patch-src_bootstrap_lib.rs) = a033c8ae319a6e6e0f6ea5f98b952878a58f887e
+SHA1 (patch-src_bootstrap_lib.rs) = d0f4e9fe2ba34ad4fed678d7b4c90e4542faa199
 SHA1 (patch-src_llvm-project_llvm_CMakeLists.txt) = fb1b9ea0c81bf96abb5a88fcb523631c42cd8f14
 SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = fef9f055d2b918c4480fbf8ee68e259197490a0f
 SHA1 (patch-src_llvm-project_llvm_include_llvm-c_DataTypes.h) = cb011fc19957883c01725797f7c85ed1b20f96f1
diff -r 5ca32c8bc8b5 -r 1b528135135e lang/rust/do-cross.mk
--- a/lang/rust/do-cross.mk     Thu Sep 01 09:29:32 2022 +0000
+++ b/lang/rust/do-cross.mk     Thu Sep 01 09:59:46 2022 +0000
@@ -1,3 +1,4 @@
+# $NetBSD: do-cross.mk,v 1.3 2022/09/01 09:59:46 jperkin Exp $
 # Do all the NetBSD cross builds
 # Collect the bootstrap kits in dist/
 
@@ -17,34 +18,34 @@
 
 # Root of target directories.
 # Must have dest/ (build.sh's DESTDIR) and tools/ subdirectories
-ROOT.armv7?=   /u/evbarm-armv7hf
-ROOT.sparc64?= /u/sparc64
-ROOT.powerpc?= /u/macppc
-ROOT.powerpc90?=/u/9.0-macppc
-ROOT.arm64?=   /u/evbarm64
-ROOT.arm64_be?=        /u/evbarm64eb
-ROOT.i386?=    /u/i386
+ROOT.armv7?=           /u/evbarm-armv7hf
+ROOT.sparc64?=         /u/sparc64
+ROOT.powerpc?=         /u/macppc
+ROOT.powerpc90?=       /u/9.0-macppc
+ROOT.arm64?=           /u/evbarm64
+ROOT.arm64_be?=                /u/evbarm64eb
+ROOT.i386?=            /u/i386
 
 # Mapping to GNU triple
-G_TGT.armv7=   armv7--netbsdelf-eabihf
-G_TGT.sparc64= sparc64--netbsd
-G_TGT.powerpc= powerpc--netbsd
-G_TGT.powerpc90=powerpc--netbsd
-G_TGT.arm64=   aarch64--netbsd
-G_TGT.arm64_be=        aarch64_be--netbsd
-G_TGT.i386=    i486--netbsdelf
+G_TGT.armv7=           armv7--netbsdelf-eabihf
+G_TGT.sparc64=         sparc64--netbsd
+G_TGT.powerpc=         powerpc--netbsd
+G_TGT.powerpc90=       powerpc--netbsd
+G_TGT.arm64=           aarch64--netbsd
+G_TGT.arm64_be=                aarch64_be--netbsd
+G_TGT.i386=            i486--netbsdelf
 
 # Mapping to rust's TARGET specification
-TGT.armv7=     armv7-unknown-netbsd-eabihf
-TGT.sparc64=   sparc64-unknown-netbsd
-TGT.powerpc=   powerpc-unknown-netbsd
-TGT.powerpc90= powerpc-unknown-netbsd
-TGT.arm64=     aarch64-unknown-netbsd
-TGT.arm64_be=  aarch64_be-unknown-netbsd
-TGT.i386=      i586-unknown-netbsd
+TGT.armv7=             armv7-unknown-netbsd-eabihf
+TGT.sparc64=           sparc64-unknown-netbsd
+TGT.powerpc=           powerpc-unknown-netbsd
+TGT.powerpc90=         powerpc-unknown-netbsd
+TGT.arm64=             aarch64-unknown-netbsd
+TGT.arm64_be=          aarch64_be-unknown-netbsd
+TGT.i386=              i586-unknown-netbsd
 
 # Optional target tweak for bootstrap files
-TT.powerpc90=  powerpc-unknown-netbsd90
+TT.powerpc90=          powerpc-unknown-netbsd90
 
 WRKDIR=                ${.CURDIR}/work
 SCRIPTS=       ${WRKDIR}/scripts
@@ -68,7 +69,7 @@
 CA.${st}+=--set=target.${TGT.${st}}.ar=${ROOT.${st}}/tools/bin/${G_TGT.${st}}-ar
 do-${st}:
        mkdir -p dist
-       echo "=======> Cross-building rust for ${st}"
+       ${ECHO} "=======> Cross-building rust for ${st}"
        ${DEBUG} make -f Makefile clean
        ${DEBUG} env \
                CROSS_ROOT=${ROOT.${st}} \
@@ -86,14 +87,13 @@
                src=$${distdir}/$${comp}-${V_NOREV}-${TGT.${st}}.tar.xz; \
                tgt=dist/$${comp}-${VERSION}-$${TT}.tar.xz; \
                if [ ! -f "$${tgt}" ]; then \
-                       echo ln $${src} $${tgt}; \
+                       ${ECHO} ln $${src} $${tgt}; \
                        ${DEBUG} ln $${src} $${tgt}; \
                fi; \
        done; \
        src_comp=rust-src-${V_NOREV}.tar.xz; \
        if [ ! -f dist/$${src_comp} ]; then \
-               echo ln $${distdir}/$${src_comp} dist; \
+               ${ECHO} ln $${distdir}/$${src_comp} dist; \
                ${DEBUG} ln $${distdir}/$${src_comp} dist; \
        fi
 .endfor
-
diff -r 5ca32c8bc8b5 -r 1b528135135e lang/rust/options.mk
--- a/lang/rust/options.mk      Thu Sep 01 09:29:32 2022 +0000
+++ b/lang/rust/options.mk      Thu Sep 01 09:59:46 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.27 2022/08/30 19:22:17 he Exp $
+# $NetBSD: options.mk,v 1.28 2022/09/01 09:59:46 jperkin Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.rust
 PKG_SUPPORTED_OPTIONS+=        rust-cargo-static rust-docs
@@ -33,7 +33,6 @@
 # Use the internal copy of LLVM or the external one?
 #
 .if empty(PKG_OPTIONS:Mrust-internal-llvm)
-BUILDLINK_API_DEPENDS.llvm+=   llvm>=12.0.0
 .include "../../lang/llvm/buildlink3.mk"
 CONFIGURE_ARGS+=       --enable-llvm-link-shared
 #CONFIGURE_ARGS+=      --llvm-libunwind=system
diff -r 5ca32c8bc8b5 -r 1b528135135e lang/rust/patches/patch-src_bootstrap_lib.rs
--- a/lang/rust/patches/patch-src_bootstrap_lib.rs      Thu Sep 01 09:29:32 2022 +0000
+++ b/lang/rust/patches/patch-src_bootstrap_lib.rs      Thu Sep 01 09:59:46 2022 +0000
@@ -1,10 +1,8 @@
-$NetBSD: patch-src_bootstrap_lib.rs,v 1.15 2022/08/30 19:22:17 he Exp $
+$NetBSD: patch-src_bootstrap_lib.rs,v 1.16 2022/09/01 09:59:46 jperkin Exp $
 
 Don't filter out optimization flags.
 FreeBSD has a particular C++ runtime library name
 
---- src/bootstrap/lib.rs.orig  2021-09-06 18:42:35.000000000 +0000
-+++ src/bootstrap/lib.rs
 --- src/bootstrap/lib.rs.orig  2022-07-16 08:49:08.000000000 +0000
 +++ src/bootstrap/lib.rs
 @@ -1029,14 +1029,13 @@ impl Build {



Home | Main Index | Thread Index | Old Index