diff options
author | tnn <tnn@pkgsrc.org> | 2022-07-27 00:39:35 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2022-07-27 00:39:35 +0000 |
commit | f8143afc1b83b75c2679b9f1342824952cd8a571 (patch) | |
tree | 4e361e030eef61432ce51d3ec1364c14e0e68457 /lang | |
parent | a1022cc94ae60c017508c36bc10062d30cf61692 (diff) | |
download | pkgsrc-f8143afc1b83b75c2679b9f1342824952cd8a571.tar.gz |
rust: clean up pre-build target
Only needed for NetBSD i386, no need to copypasta it to all configurations.
XXX is it even needed on i386? Bootstrap toolchain should ship with PaX
settings if needed.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/rust/Makefile | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 896fd1edfcf..3c693774dfd 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.263 2022/07/15 07:03:30 jperkin Exp $ +# $NetBSD: Makefile,v 1.264 2022/07/27 00:39:35 tnn Exp $ DISTNAME= rustc-1.60.0-src PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} @@ -171,7 +171,6 @@ BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags BUILDLINK_TRANSFORM+= opt:x86_64:arm64 .endif -.PHONY: pre-build-fix # # Rust unfortunately requires itself to build. On platforms which aren't # supported by upstream (where they offer binary bootstraps), or where we do @@ -186,7 +185,6 @@ RUST_ARCH:= aarch64-apple-darwin RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -194,7 +192,6 @@ RUST_ARCH:= x86_64-apple-darwin RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MLinux-*-aarch64) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -202,7 +199,6 @@ RUST_ARCH:= aarch64-unknown-linux-gnu RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MLinux-*-earmv6hf) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -210,7 +206,6 @@ RUST_ARCH:= arm-unknown-linux-gnueabihf RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MLinux-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -218,7 +213,6 @@ RUST_ARCH:= armv7-unknown-linux-gnueabihf RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -226,7 +220,6 @@ RUST_ARCH:= i686-unknown-linux-gnu RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -234,7 +227,6 @@ RUST_ARCH:= x86_64-unknown-linux-gnu RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif # # The SunOS target defaults to illumos as that's what the current bootstraps @@ -253,7 +245,6 @@ CONFIGURE_ARGS+= --set=target.${RUST_ARCH}.llvm-config=${LLVM_CONFIG_PATH} CONFIGURE_ARGS+= --build=${RUST_ARCH} CONFIGURE_ARGS+= --host=${RUST_ARCH} CONFIGURE_ARGS+= --target=${RUST_ARCH} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -261,7 +252,6 @@ RUST_ARCH:= x86_64-unknown-freebsd RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -277,7 +267,9 @@ DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} # For atomic ops CFLAGS+= -march=i586 CONFIGURE_ARGS+= --build=${RUST_ARCH} -pre-build-fix: +pre-build: pre-build-fix-paxctl +.PHONY: pre-build-fix-paxctl +pre-build-fix-paxctl: ${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/cargo ${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/rustc .endif @@ -287,7 +279,6 @@ RUST_ARCH= x86_64-unknown-netbsd RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -311,7 +302,6 @@ SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} . endif -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -321,7 +311,6 @@ RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64eb) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -331,7 +320,6 @@ RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make (makesum) || make(mdi) RUST_STAGE0_VER= 1.59.0 @@ -341,7 +329,6 @@ RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} -pre-build-fix: .endif .if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi) RUST_ARCH= armv7-unknown-netbsd-eabihf @@ -351,7 +338,6 @@ RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} -pre-build-fix: .endif # You may override RUST_BOOTSTRAP_PATH and RUST_ARCH in mk.conf @@ -448,11 +434,12 @@ MAKE_ENV+= OPENSSL_DIR=${SSLBASE} .if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang) && !exists(/lib/libgcc_s.so) BUILDLINK_TRANSFORM+= rm:-lgcc_s MAKE_ENV+= PKGSRC_HAVE_LIBCPP=yes -.endif - -pre-build: pre-build-fix -.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang) && !exists(/lib/libgcc_s.so) +pre-build: provide-libgcc-for-bootstrap +.PHONY: provide-libgcc-for-bootstrap +provide-libgcc-for-bootstrap: +. if exists(${FILESDIR}/libgcc_s.so.1) cp ${FILESDIR}/libgcc_s.so.1 ${RUST_BOOTSTRAP_PATH}/lib/. +. endif .endif # |