Sat Apr 24 12:48:46 2021 UTC ()
Pullup ticket #6446 - requested by gutteridge
lang/rust: NetBSD/i386 build fix

Revisions pulled up:
- lang/rust/Makefile                                            1.228-1.229

---
   Module Name:    pkgsrc
   Committed By:   gutteridge
   Date:           Thu Apr 15 00:55:45 UTC 2021

   Modified Files:
           pkgsrc/lang/rust: Makefile

   Log Message:
   rust: restore NetBSD i386 bootstrap workaround

   The current i386 bootstrap is built for NetBSD 8.x, and so is linked
   against libstdc++.so.8. NetBSD 9.x still requires compat80 for it to
   run.

   This isn't a complete workaround, as builds still fail in a sandboxed
   environment that doesn't have compat80 installed outside it. Dealing
   with that would require another workaround somewhat like the one used
   for ghc*, but a little different.

---
   Module Name:    pkgsrc
   Committed By:   gutteridge
   Date:           Fri Apr 16 01:14:37 UTC 2021

   Modified Files:
           pkgsrc/lang/rust: Makefile

   Log Message:
   rust: the i386 bootstrap workaround is really a BUILD_DEPENDS


(bsiegert)
diff -r1.220.2.1 -r1.220.2.2 pkgsrc/lang/rust/Makefile

cvs diff -r1.220.2.1 -r1.220.2.2 pkgsrc/lang/rust/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/rust/Makefile 2021/04/10 08:36:05 1.220.2.1
+++ pkgsrc/lang/rust/Makefile 2021/04/24 12:48:46 1.220.2.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.220.2.1 2021/04/10 08:36:05 bsiegert Exp $ 1# $NetBSD: Makefile,v 1.220.2.2 2021/04/24 12:48:46 bsiegert Exp $
2 2
3DISTNAME= rustc-1.49.0-src 3DISTNAME= rustc-1.49.0-src
4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} 4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5PKGREVISION= 1 5PKGREVISION= 1
6CATEGORIES= lang 6CATEGORIES= lang
7MASTER_SITES= https://static.rust-lang.org/dist/ 7MASTER_SITES= https://static.rust-lang.org/dist/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.rust-lang.org/ 10HOMEPAGE= https://www.rust-lang.org/
11COMMENT= Safe, concurrent, practical language 11COMMENT= Safe, concurrent, practical language
12LICENSE= mit OR apache-2.0 12LICENSE= mit OR apache-2.0
13 13
14CONFLICTS+= rust-bin-[0-9]* 14CONFLICTS+= rust-bin-[0-9]*
@@ -521,25 +521,33 @@ stage0-bootstrap: install @@ -521,25 +521,33 @@ stage0-bootstrap: install
521 ${GTAR} -zcf ${BOOTSTRAP_NAME}.tar.gz ${BOOTSTRAP_NAME}) 521 ${GTAR} -zcf ${BOOTSTRAP_NAME}.tar.gz ${BOOTSTRAP_NAME})
522.endif 522.endif
523 523
524.include "options.mk" 524.include "options.mk"
525 525
526# These dependencies currently use the bundled sources as they require 526# These dependencies currently use the bundled sources as they require
527# development features not yet available in released versions. 527# development features not yet available in released versions.
528# 528#
529#.include "../../devel/libgit2/buildlink3.mk" 529#.include "../../devel/libgit2/buildlink3.mk"
530#.include "../../security/libssh2/buildlink3.mk" 530#.include "../../security/libssh2/buildlink3.mk"
531#.include "../../www/http-parser/buildlink3.mk" 531#.include "../../www/http-parser/buildlink3.mk"
532#.include "../../devel/jemalloc/buildlink3.mk" 532#.include "../../devel/jemalloc/buildlink3.mk"
533 533
 534## Issues specific to: bootstrap AND NetBSD follow
 535
 536# rust i386 bootstraps are built for 8.0 and still depend on libstdc++.so.8.
 537# Pull in compat80 on 9.x and newer.
 538.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) && empty(OS_VERSION:M8.*)
 539BUILD_DEPENDS+= compat80>=0:../../emulators/compat80
 540.endif
 541
534# This is for when we build natively: 542# This is for when we build natively:
535.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \ 543.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \
536 !empty(MACHINE_PLATFORM:MNetBSD-*-i386) 544 !empty(MACHINE_PLATFORM:MNetBSD-*-i386)
537# LLVM needs libatomic for 64-bit atomics on powerpc and i386 545# LLVM needs libatomic for 64-bit atomics on powerpc and i386
538.include "../../devel/libatomic/buildlink3.mk" 546.include "../../devel/libatomic/buildlink3.mk"
539# Make those libraries available via a unique directory: 547# Make those libraries available via a unique directory:
540DEPENDS+= libatomic-links>=0:../../devel/libatomic-links 548DEPENDS+= libatomic-links>=0:../../devel/libatomic-links
541.endif 549.endif
542 550
543.include "../../devel/zlib/buildlink3.mk" 551.include "../../devel/zlib/buildlink3.mk"
544.include "../../lang/python/tool.mk" 552.include "../../lang/python/tool.mk"
545.include "../../mk/bsd.pkg.mk" 553.include "../../mk/bsd.pkg.mk"