* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2022-10-13 17:41 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2022-10-13 17:41 UTC (permalink / raw
To: gentoo-commits
commit: 53f2e771432ee61187a0154f96250372f92d7712
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 13 17:40:47 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Oct 13 17:41:02 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53f2e771
dev-lang/rust: drop 1.62.1, 1.63.0-r1
Bug: https://bugs.gentoo.org/870166
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 68 --
.../files/1.61.0-gentoo-musl-target-specs.patch | 166 -----
dev-lang/rust/files/1.63.0-CVE-2022-36113.patch | 48 --
dev-lang/rust/files/1.63.0-CVE-2022-36114.patch | 102 ---
dev-lang/rust/rust-1.62.1.ebuild | 741 --------------------
dev-lang/rust/rust-1.63.0-r1.ebuild | 774 ---------------------
6 files changed, 1899 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index a81fde9ae574..6e85f6547c59 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,67 +1,3 @@
-DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz 226403096 BLAKE2B b9927e6d364fe791bef49cea5f0904629a2f01e6a71325c1769c67b845725ae6f54a1a8c0530fa5048591dd0ecfd50a40224243f935b38ad269e35ce2e1c59d9 SHA512 1c00830f67b75eaf23ab759e8218fca48e424cad0ede02e737e341d105f6f8b8113e4d4181cde1b43f9369af9c2f238fbdcac27ccad3dd02db878e2f4e6ba35b
-DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 697df0294d01a19eca2f9b7597df3826e79ea790766c5c5a7b73f5a04919cf64f1489f34c9d2c397523432243e7f3f29f42440ba9aee127753868529196810cf SHA512 78cbc7eeb552965a1b6c4cfc9c8404017fe195acefbda1aa203d1c2ba969b3ac28388930bb4f3ca5dda7ecac5e61163ae0a5d06967eab9f0a7cada87c6b2dc58
-DIST rust-1.61.0-aarch64-unknown-linux-musl.tar.xz 220966060 BLAKE2B e03c6418fed773d1028363979726648d1ffa0e04d6879688efefc15f95fbeff3ff9c0dc7c16a53fedb18c4e0b16e060cee9f3566b0f96027e5dc68820fda149f SHA512 e806f78ecc9edd12bb991533c6bfc95da30c8eaacbfc54f0f4dbf3a95a011da82fca13cf3ef23594a9d1d9d8c79c8186fe98b60658a2cd5c0ed2c6e3984468d0
-DIST rust-1.61.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 426c4c8dac07269d184f61bf2447957cdbdacafdf27fac5ab5a0eea958e15fb3eeed0753dadb1d1bb157322ca5e8c6b7c10d946c4bd3a089ccd8275d0a310014 SHA512 b231afc0c3604aba64277c4f018f1f4b30417bd2fd113919b8b584d5482523b961071a50394a4906d8ba8536685fcff4710b51fee7832a7a041dcb902f1c5ff1
-DIST rust-1.61.0-arm-unknown-linux-gnueabi.tar.xz 200226676 BLAKE2B c55c36524249eaf9ab1e040b6742e1ada46b32bf0511338d23536663050b46103b1765aeb2a145be9cdc0b602d83526fe902fc431e0793d1a307ab0d4b61a356 SHA512 3a9f52b9f4f2a972477a48b629b8345f151d32d491be0cbf3692b76f05ddbd3319de1da7b10959d37fffc08e12b3196a6f4462cc2476ad80d2f9750e0b189cad
-DIST rust-1.61.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 34f251ee19ace45c411f161b383dcda35b8dea62e135cdeceddd73ca029920b0f0ea0484fb79c9680d9b4403c5c01d76d4fd2fb47fd65a2fbcb0375e56a1586b SHA512 641ce73107609d55f98ae00a03a9efd58985539e46a834ceffe5af79822309a40a4eac59e5cec3b1654da733f463f3bca438f42ecbaf5fce5d276466317a7e54
-DIST rust-1.61.0-arm-unknown-linux-gnueabihf.tar.xz 200078864 BLAKE2B 02403c024bf02b9ec42fd0baf52856fbcce2a10477d19e68e4ad06110aaabb90496543fc3de5f385428396979fbb80cdb27f28b4cef8af9266c18fa87a995c30 SHA512 155b2f0c341280bfb7db066b639dc50580a07b21ad6f9f6255a8645d5d944d58fbaff505f1de0c3f51ed92ca0d4dc75d9b92e2aab7e8b64f8c42d3af0a714fe6
-DIST rust-1.61.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 6b4875ac242f11f47518f17a0a039539e56cf3cef78f1e3cb4bc2174e60d6d0f0d444b4c0cfa007643202b5ce92a4cb979e92b5f6f559eb90fd78fdd5f870e57 SHA512 f2618ba9f076c10d0ddd23129e6e8e7050fd1126d7767c8b74c53be209ca87f9bebbc09069f6aed55e14de64b1478fd93b370be7e60858b5226fcfc1e8ed87c0
-DIST rust-1.61.0-armv7-unknown-linux-gnueabihf.tar.xz 206757912 BLAKE2B c702e17e225becc681713a3e819cc38c727377d280a1963efd4e6b1d27e0dbbb71ad0bec4d7add8319417846cf54bb7b5901af0f633b180ca9a5f169c709e43a SHA512 88dbb7a35a8424e5b197566515c21122c1da71df146abb304d7dbb50380b4771a741910abefc9d79831146b28b657ffe53cae07f0392e83a7279a7795aadf0e6
-DIST rust-1.61.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f4b93feba557d81638ead6c3ad72f2e5c321c1103b473096e312d8a3191e98aac65aff0ebcb6f2c23701de17f2602ba18a6462c24a678c2bc2a13e1003189271 SHA512 72d8152d206c1ca9d69ed4704b8638c32b5f136ad985fd4790961935f1b44f08df0960e03066de2dd1cc9f7a140e8070f0a6e671f59c751506847d9e247c5ecd
-DIST rust-1.61.0-i686-unknown-linux-gnu.tar.xz 218220208 BLAKE2B da47b131676258747e27704e2a1abb844567e2ac9ccffdd1c87edaa677e04b1fe73227f7b6afa437d8fe2f2690352623343b8318906038206b5b684fa8eafcc7 SHA512 f19e1a5253c57d250d4de7f0f54b70a296d92bba2e22d8b842bcbb311e393e3bf24c28621f490584497c586c6fdbc41f5af55d86a074b93efaa62d313121cc4a
-DIST rust-1.61.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3b154ab9d414ec6d7dea13c6b2d2def9613544b3d8f6464385fa390bb6228d73826032ed6e536a9a2dd379499ec500788b149c838d5ad1a50f545a47b19a2cbd SHA512 f06ab7e865bf56c153586e146438079ff3ee3de86c610e463cd0ce67c090349b9dd4fa587d9eab0dea4b908770bca0dab955f797ebcc5aee2617a981ff23eb23
-DIST rust-1.61.0-mips-unknown-linux-gnu.tar.xz 157918296 BLAKE2B 0551ab0898491129828be9cd7d6fd22a56c329f85ae9767c8ca216cac16ae3f93d30913c50c8cea8daa2f98878147e2f15f587e38e9e0fca7c8c4b6d3ead6870 SHA512 02cf5d1ed8c28bd52b7c27ba696de30ee23322ddd1e2ef953cd95a6d0b31c63ea66071bfb22c4d11a780243e62e21407d7ada2592b08caac67d7d79e7d9ee0f2
-DIST rust-1.61.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2d050374431b8d48b6a0a3e171d4d2f62cfd8a2df70ddbf0d374bb9351e684d15d3ade7f6717e6abba1de47c4899f0f7575a4ca537d1a39a57e03ea4b0ae281e SHA512 6e2d01d3b8218cae46008328226286abe3f4323891ab41129f9af94b4526d5b21700fa84c880b4efe38d39c57b2a0946eb82e3ac58950761b20f4def1d8b82f2
-DIST rust-1.61.0-mips64-unknown-linux-gnuabi64.tar.xz 162321252 BLAKE2B d49ec8d3a5eec2085a26b4da22a31e5631e3665333a030e4683446cfe3f71e86e466b827942d6a62d32f469ff7fe9208aa51ba9d47822a54d40d89bef45636e5 SHA512 1e6003127963b836c343ae06586b152b1f227529d05b555aefa0bd7d4b92124215cfa1038aba1236c0c42ecd8e429253db4faa13ed388c16a8659e71b0008fe7
-DIST rust-1.61.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B b031019589b12cdf45f0a938c7479ad219c257643b88108d0c524088530df783338d64c1b356055e34a38df8908653c25fc286949826bb7e3539d63c78c36a66 SHA512 ee9178251f5a79803871fa76a22395e4b43958582930f92cf1f5e76970c1583f9b0403da7c05bd8a7cdd83839b319a6640adcaaa5475e9ab5bffb43146116b09
-DIST rust-1.61.0-mipsel-unknown-linux-gnu.tar.xz 162148648 BLAKE2B 492e0c811c9fae9d0052fcdfffe6d96d43674e1775edaf31d63024e56763d44c02763fd70e768ac0987d260665b86d78aa55a0652f5acbf097a3e9a472aa4d9f SHA512 637b081d8357d46030ca206c8feb54a38d9696a0bdbbad9a892ee4a472f29976c82b814f14cc987ad9e473e70d22347e7e01e81f0f59e82dbaad62153c1ec32f
-DIST rust-1.61.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9323f7488fdf603e81018c4b6afa11da952eb6051e9480fee027326ebccd15befed97c75c981f621d7eda3daf2d082c5fb12af426e48cb4c0c733ab55c46af6e SHA512 9d1e6062c4a7714aa754ea586f9bbe3a988e5e6d1e6309316bde89fa83ccddb837e96a8de13fbd4b932c8fc37be89de06802f12f689e17b1ae6cd97b5e2db561
-DIST rust-1.61.0-powerpc-unknown-linux-gnu.tar.xz 180802408 BLAKE2B 41ecab76e35d9ee2b9658730f46ece4191e706714b3b90b6021b4bd9ed2c4f0d563e0c0b39bdc7e633237d55c5375379565d7932e7ffb4896851831f64f61559 SHA512 ed19698f32c1af73ba8c402395b6ee30381d1fff6026d2c94e45ad89ef197cffc1529dc21402e2b463deb47aba0ed4d63d69c62908cdc099da463835757f3fe3
-DIST rust-1.61.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 438143b3474d0cb9e1a19b93de28544f02672e245bba7855da286fb15c58db93021e44d432fbe4a0949592b57cb23b373abd5c0a3f960f6975a0cf433352462e SHA512 7a570c64a79adf78c8c28342d9ab39e8ed953cd44b8038e03beb888b5611625bae95e88220c9c88236ff1672f20ad61976d116da7689cf29f53112deb9b75858
-DIST rust-1.61.0-powerpc64-unknown-linux-gnu.tar.xz 187335836 BLAKE2B 6feca68e47f7e19355ba623cda1d1cd15351017d388d94e2b9d6821493b8a77a09c95148a8fcf7124e3b0c9a9ee205c9f5c14af04172e2d02ea239355755b364 SHA512 b8afcb47653877dd47a808b4aecd95bca715a96311652e0616125e75bc5a457364b0caba2918e2e3e8df2d1fe0afb6fb384bbfa44fde25ebe0dd368414984acb
-DIST rust-1.61.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 20bc76dea5484d2a6bf60ffdacc1dacb8d3f7abdb428fee3b1d3e6e19d499f18afbe667a5de96a28005661bd0b4f5e4c8429df917a31b86d72b9aaa9ec56c7e0 SHA512 cf10c0f1ca50894deba5f02a4e3491fe61ea8def4b0f76fe790eb52ff66295d2570ae50acea66a51e710822d6109a2ab3c8f1e703388ae0ee19fcfc5657d4f38
-DIST rust-1.61.0-powerpc64le-unknown-linux-gnu.tar.xz 196945316 BLAKE2B 23ac372f7bbeac3eb757adcb6ca93187ad01492992327533452ab348ec899cb97f5ac9335b32039a62ccf4c34125de3c4b6c1d7829839c95f638b6531be59c57 SHA512 6cf969cef60d2b70db17902ceb71d2616de0df1ff4fda15578347372bf5a349fc8f4377eb1d003abb84a93a122ab0e54aac52c95568813148d3c0113d663a07f
-DIST rust-1.61.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b4bdcba7c5b681512b98b39f8035788f612ee1c8f44d98d58f8a29bc71e470d57ae587a6ea2e02a22263d40bb452054d03483a3922db6c131d3947e65da23bb SHA512 cd102d958ad3ca62f534033473664e867892dce0ca8a2f96271ecfabe34e0afbd63d8281086c5cd692fdb961894313e7430ce2e1d14c3a686b40d8a514c124e3
-DIST rust-1.61.0-riscv64gc-unknown-linux-gnu.tar.xz 190408604 BLAKE2B 1f37d88201f0e3517194d810f99ce3167fa132c72f8580704750b926b838956157b1ccd303ccf5de15615733383d1009cc135ede7dd8dc7c1e39b4246a8ed604 SHA512 8f6f469484ff9c10af2b1a822a8193f313ac244783921c68dc1feee4d6897e7083cfb90d19384a266d41b97aeb845ef073ed955fb7beaf7e1810d682185c2d42
-DIST rust-1.61.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c413b2f55e3d45dbfccf193f5cb9f6866abf895d23c850e3744a0bd897c2c812f57457211efaab7416c0d8fc079cc4feaa35de879ad76356a961e704e711be46 SHA512 0155b4e0ba86cc190b85f2f82e8ee75c14825e52e05ab3446283512f0b42f113d85ef89d72e0929382637dc0a44ef72f06552957285463c2edd7f83d9c8234ff
-DIST rust-1.61.0-s390x-unknown-linux-gnu.tar.xz 214196912 BLAKE2B 31eeaabdbca2fa837610179eafd0cb6cde2ce8d4feb57e86cd1fc8962e1f8b84bf067d7782414380616d5b56fef5db19c91c54c89f5dd935debf6ed2d3841466 SHA512 7de0ea08c4834e60d12098d92d4366689c0b959f58667bc68e35ad3c976011e8d9375566cebd9260933e13bd74105d297dabf40a0d09b34f83905d4cb9995f7f
-DIST rust-1.61.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 617bfd93b883cc36c8504ac326813511bee205a508489be168060863d967efe9a2e8276c3834d872f419317047ba83624c996be9d6f913be58f9feab66f292b2 SHA512 933689de3c1fabc31dd1910844479b3505e1a8b8474fdaeb4936df118a6da4f9597c45f0a0056d5c1efc33ae8ffb2910f5aa07b91afbd231ad7c20f0c79ceeb4
-DIST rust-1.61.0-x86_64-unknown-linux-gnu.tar.xz 157592468 BLAKE2B 0877c0794280a5ab7e74553c02cebad67e36148a3f34a709973310d89d7ea65dc8ecfa8b9c461e4f96939ed2ff09b7bacbef0b4fcf409758a0429bc431f87ebe SHA512 365191453f37775cf8bed66e12224294d4d99f3bacc635c3c13f05bf8585838a04b602c2fef7964f26a6cc35ab432a5c0a9745e9ffad0a83b0c761ec02de3484
-DIST rust-1.61.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5296a8df210a4cf2fd7dffcba1ae6bd8cda9e408ff4c55d997199c2890b9faab9e8d6d22a3c0961786bb80231836047929621edf9043d474b352fe28bd9192e8 SHA512 cb97e84cd793aa8676c41297d8da14125855c008815e65d8191868eb88241ccb408c6f9ae85b7ba8de1a02ea8923f5e042f4fea662fa593e5ec03505b41ee52d
-DIST rust-1.61.0-x86_64-unknown-linux-musl.tar.xz 259724324 BLAKE2B d005bd2794d196136c42842fbb7bc64d827898b5713f768cf0e88be5a40e3906139027ee58571cfccd8d2c864f672d1986da28c72f0d1c4a7f78d18efe14385e SHA512 96d09ac3a48bb2956dd6bf219e605c68327a94d09e72290ee74781c4886dce93b217163fb08dac0ce69bfaa2e3ab8cccd4a26d10b9df4c3162822a38e355bdb6
-DIST rust-1.61.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e1c8061c80cd5445f7df9c44044ccb47731704b93d4e86cf95bd3b1b08a3c3cdb61e21349088cd0127632c63a0f7c22f0fa209809450dd81607bf7353d61a7b4 SHA512 587f487a3c8159a4b102f15a484a0ffa4f32c2abd2fb4ca078c27d36f6ff365c95015a99494e852631e9f92bfc9f33a0266c5f62b7edfce823c34993ff6a836b
-DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz 228388556 BLAKE2B 2b2d8428c97bfeb64bd999670e4ef2b6c4732cdfd7cac0cf37c5adb8ee83fd467e1e94bcb6a9edf28838fd052d19a7cbc273175c8360696bbec4523e1ff069a6 SHA512 10964fe48ee59ef2e44e9d0a0daa750cd06cc52198664b544166a846667366e7f0000129612f4d68e1530dab28987f62ccacd82f6d5663d0091cf7a451469219
-DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6cf85d71d188bc931cbb21dac1387fa9fb8b45bcf0984bfd5af1a3f1ac581b74e37df337138b05b2d74ed1572d6e859418c33c2fe4bb72f5a3b15cb6302060d4 SHA512 452610627d8d01474ed38b7d3ff7c3c0174cc5b3468cbd0f274b6124ff6497dcae6f0abb6b9688f64be89c524c8fe18aaf5fd56dcd2530df6c247688cac1a230
-DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz 223168712 BLAKE2B 9007a612ed5ec279c346abaeb4213a71d3acae9e5b1934380c9959e74db8b196b59f1197d1714a076040ff68f2b4f0e4937feb226cfaa0bdd272838d67eb07cb SHA512 253ba647102cb5599cfbfbfaf5f77ab2389e4bc77bce6cfd8aba037f6bd349081965d505fc30e9538df9353e923e66fa451ab73076d7224703cab1e24a81cf1f
-DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 54d54528fed34d0325d50a44ea732c99268d0acd2d78fe778dee369e18e9d7f6a8164617715a8c73aae59d2e856ff437343087542d2eeba9e613cd0418e9cf43 SHA512 79a049aad9cf0d50455747bbd2809611ca9d8eb2890c4a0dda71b64842c75cc4503f9f308d6f418e0f207d5cea04d21b352d45c1774a24b9270071d232dfb1d6
-DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz 203832692 BLAKE2B 964278ec2d9375d864cd03f7ec4fae1ca89fceebad51ccc2a017fbdf5ed354bd599d8c3eaf9eb9e86870f3d4b7fae8bb9011ae630742b3cc9e6ed38e14e8eae4 SHA512 d388e752fe7fa67c91719858be9ffc872c2b8fa45f6d63ae18298a79bc242e640784722d82461629bd0f07ce56a7dd850376ca9882bf0a084a5a19b01e5d59f3
-DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 1f24c48e0648f80d7107db921917372bd51ff4b630bd36830d5bb76386b486776311c67854bd4d6366e820003b89ba1a4c8eecbe001f2221c1063661c71ab513 SHA512 f134e874d59bc7979e821f881098f9d91eb81a1c5c68db80d738def722273ecf4957d842c3f0ee9f9b415448477bcd0b022624cea95f99850bd2267dc545423f
-DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz 203946052 BLAKE2B b0e2a8a0068dc758d772f3dbc8003a57fdb43ead64e30bdf338c60b195bb2f78ef7e7a6df6dd2f02f13f47b9e913ab2fc010ce9fc6d39d5014709a71886e7eb6 SHA512 515d16b3ec5e8ec4af24c6baaf4e5443774c2140e5379019f29ce8a63eb1fd908408f42092e0fc0c3dd5e62ac7d43357af13fd74678cd2635451a2d775934386
-DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 661439263a89d2206fbb7c3e00ac42e5975403670953df6be12dbf10e624a3bce0a16a846084aa621284e1d2dbb997af19b0f45808a2ddf7bb65af306a1745ba SHA512 bade26ccb646cc16822ae3235c00d048373f6c38eea79af128e3f299e8a69086fd254b4cd7c602c653d6573232594a27c7f8eb915797b8f1afbf56db3efb5008
-DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz 209318492 BLAKE2B 959488e4a957e19e5fe44e9b2b83406e135d7598cf4fa9db3b132c80cc40a54a73dee3c0b3db6f2f9299adf1b2d80fe453d1f0dab73fe46cacd5fa2ebf45b3ac SHA512 2c447c39f22f1f11f1e58d6adfea440a7d0bb91ffbb60df555b4e3eb41379b586f531a31c3ef86bb5e7a5b46889071f509157dc031fa174d93942d21dd241180
-DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B a1e12a459d62fccd35bbc34d043f8a7512dfe3edb6563f02b84bfdd1e4cdf9c16570302644d71dc208dfe9782f48d4310a13b748d22571d1d43dcf7b61b2819a SHA512 82d2d1eb7ee0f8ba0bfaf93cd2ef0899973f535080af960a2b0f54049285df43e758a9bbe2f0e36e64e85bd530e4511e8ed828ce046c82b74a252b92e7dd42db
-DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz 223720860 BLAKE2B 117364630b38f4a97f9b7183ca7e9f30836ffd0f73c4e3ce2af97ad3c837edc7fa247afba70858009b5ba34bcb7adc87f29b8c87f03f79d060d9bab68b0625ba SHA512 99a87fef7870ee3478ac2faf1ebaec9fde28737ddc2423ec3da4173051f542e24b5666b0e276b3fdd2f02259f16bd119bf79515d057c63da2f6659c0e7ea2fd3
-DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b9b4289aa38ad09d7f5098665a490dfa934676c37385f966d10c978f5320e374976617fb31a5e835661a81edab1ff244c74d8f8f5748954817db8171ed251b0d SHA512 9c44413bf71c416ad08289b4fa0223cb2a5299609ea5c94aff4f0bf7e793a9794155ee0c12a9f19c1c6e20112eb642f22be357d287adcea4e53e0285214c9661
-DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz 161572400 BLAKE2B b1f4b797319574b4e7cfb0d591988444238f3a735466e336b4c13e3af6754d18962f6f282011147c35ea48df375651d4cad3c368042073ff4da35c9ea6ab4855 SHA512 8c3cbb699f1a821889b70c56653380ad2a6d42d2ed444610cad5971230f3cbe5b7e71f1775f21788f0f54dad2f9c2c7eaa81ecde1a319d98ffcdb3701d6ef144
-DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b68152d3a6221cb57d03826055477be0701c6520228ef2c67cf856a4d5bee5854ecc7dfe3e062121ba5d1e82be0eda0691e0d133ba5d644fed78fbf328021a9f SHA512 eedc2ba881ae0e2d709c8f2cb92ad360c091953b48bf77ce5eb1c93e296f0d532e29f9613d21327e8ca388cc5db7d26a8e612300bb3f94195db08d1d40f15909
-DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz 166210748 BLAKE2B d3a612e44132db49ab41eaf822a472f11b24b250ad1c5ca61a85b161d0a892d392d9a4789b42b4f35968887895e964ffbb5dfa69a8205b2ee94baf02cb2ef311 SHA512 f3ea74fad41c197c8af69d65ff6024832ddfeb3c7fd4913b35219b1954fc7b6d3ebc345686043ee3250c17624e133b6c8680272b5b73c38dce1d6c39b763b002
-DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 15806c5684651c2920692d36c733ad8b8a6b8d39e901889457988205e04dd425083bf119053040b73ddba65a44d9330db021a85094d2c84e60c7cd1724d95116 SHA512 46f83dc667361cf4bd10103b1aa990796c1a45ee1af02c142f068fee7aa235c9d982189757184378b2230940134b1462116c09a3c0c043810e077fcf33bac316
-DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz 165275936 BLAKE2B a875ff4675559f9a4b7ff87c271dc4f51112a68c06677b78bbd97f7b4af8f69c75407ef711a9d700ddbf9d85863e24c2f3e27956181bbe00e4afd83220290998 SHA512 9e489cb27b9b8f00e9fd2210b3bf5c1e60ddc83c5fe3d9a381fc4469badda89c02948554d70710d8438333d6629c24282a8a9855241e46ded9c6cf368dce1c2e
-DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 63b7d7487a7dd561a95a175584b798fea1b4157e59b660ec2063724e6ef4ceb7455a1912fb73a88c9315de0d80e6e622ef5c81258b670833e15c421cc3bbc562 SHA512 83420778147112aec58ad81f39f61a13fef97dbae6ff927c55a360588cab56cb58c48c31d19ed6b3b77d73277b044559db6184224d4e4d5bd5371e4cd3f701c2
-DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz 183062288 BLAKE2B c987b07862687203f716494cf5dde444d150628ae021f7a0ed990b47c892b7c247a6f8e790a2a88d49c3abcfe6236b18bbebaf76e0f2720a8c318b8f8e3e5a01 SHA512 d0db86e475fadf2535bc6955abb7b6e397553ad6843ddd369e15c9c35800866f27dcd0515a898a65f7ca868672cf458114320769cd14db258a279cfd3de3c57b
-DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7398231bfc5624f6e7ef8af55405b861fc06fbfbca9159b9c60a1ab27a5bee6551d228958e6f56abfb598c6f24f53d35f510e863176d03639c47703bd8064c7c SHA512 8713ef73a1a9f30f246dc61086993f2f4a8d6f04595401b312c43fc97f667b44126e4b7f176001b68622d452bb74ee460d60ae2e6d44938e02c4da4fcdfc7855
-DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz 191619800 BLAKE2B 276f427d0ceed4926f46081c57f6aba69e3c541d896dbbd0375da0d1f6461840e20ab8b7cbb9dec53b67dfff668e91fc8c68ea70aa3d9f333e2b21ec345a876f SHA512 039d321f90f960276ad06ccdcc2549d2c07335d61b21abcc534b33ff406e130d54dd3d79d471be9588546e30f5e1d4952e33c7890cb2d66eac80436471d3db89
-DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8ca8447d2c69ba58439ed36077882da80696427190761e5dcde99c8957fd476c73fbcc8111ebb3409c86e0a7c315dfbf7f1202204f7755a9ed87eb523bf34e38 SHA512 0f8efdf23aacf435e06854aed7f4366f5fe0f83a9a256d1026b02c2817badbd072a726bce052b0333e8cdc2907fd0e5b81a9cdef617a34e7d963d9d3c4742fb5
-DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz 201394312 BLAKE2B 60bc2fc5beee3f6d0ce695fed0c2148982b6ae3936bbf44fe0ccb97be80e9a2532f20c7234c924f500c4edc3bf82d4ca25b1f1dadc89bb29718c4a9e41bb8894 SHA512 4a8cfcffb7069e2bc4679a8da9acecf12514c512854bb9eef6f3f861e319b0098fd206d743ef7a0f25ef5b65892ad9dcc0adc1bc19525900c3edf5ea5489849e
-DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 55391a58d2ffd6c21b1ff6d77595e424cf269ad44d59f7c2a29d149306563028b402e7393e4d802a47818d7e831455768e86d4f9d882ad0ca70cf216ed72c9db SHA512 c1cf19959de1348ed34448a3f9999ef53324be81d1c99967e4091406463dc0dc28a384f8f04e07e4b54791d1d4a2b1c4aea570503abb0c91c83eafdb5e389243
-DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz 194848260 BLAKE2B 35a283e87bd0d338500ed71d539760cc19a1522875d20f7cdf8cce7ac79fdf993530082e0078a9f12c2df41d3366dec30f5326f9584ab9dd0bc37811bc931e1b SHA512 60a9e4a0ffec3763e6e5f4f9a7f3f52f423b6af86eeb4eddbd5fa00682ec3f6881a6d0be717079f508c1d0ef94f3d794b7da2884ed5b7c88219aabd49bf20662
-DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2cc8e9724e3d0f3af2d5c8e8c9f51f7f5e2d36a9e8cda23bf16fdcce0ecbd1a8965b0fc7b339dc27c779346cfe3f26fe8a2d3e1929431a2190452cbe4a949978 SHA512 587b6ab43a3c0258b0393e13f9f231f086527dd28f7f65fa6f00ac61c974e1d8c0305c2cc154a8a106d506b17f505ec8d8e6e5d39d4512072ab39da680fa1574
-DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz 218505248 BLAKE2B 6f8026b1779527f0dd781843e2f2deb423c2b541711d3e8efb981ea972cd5405568e6ca274e1b78cc6427e038d59e147652da26cedaa83b02f5daa79491db2f3 SHA512 10c99efe46acbe2bdbd27f28cae28d6db223c3cee2abc835d04f7ff1662c8b998d354ae22af9dcf00c078e96cdbb1f01df5f6c9e9c587d3459ea88f9acf37267
-DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7053c6f041695ad7b9c5ea304a0d71b9b17c5737b7d7082ef2de6e52dc52bc18c170c3fe7e7a658823abc5f80ab775b544dd2b2b3e27690bd8209357945b0f04 SHA512 8bc1d64180f55b0ed93fd506bc193a51e4519a66ed8d6f4e331395bcdb8584171d81397d594460952d7983129aa08e278ee15a584571d404f2f6a304d1d7241d
-DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz 153662720 BLAKE2B ff19ebb8a0607b5a3a29b2676dc12466e0c9969f6ac31a588a5dff2d3c10ade70e705873e2606ed84efeaeeb87b8afe6c88285edbdd2bf1a8433f24c48009c21 SHA512 b329dc015dc70ceae0a3b9b8d8e674fb443769bf82f88ed06ca306cedaa52e26756a2491c92315e51b63d4272c0a1f43b2150d5636101814f6e2b59772f1f048
-DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a1602b9cfbdf1b66c479f13b7171cb445068b5f18eae620435b25c3ab1e762e41977e31f02158d259acf16b0c8cdf895af16d6f68904939333b030f21b6c7a01 SHA512 2d79af9fca5a7e19448aeefd330fcc436c3ecb8e617662f144b12303ef2a214a3ae3ec4d9a42f68a4d0d6e343b81b495deddf3df23031aacfbead0c97b083174
-DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz 254266584 BLAKE2B f566cdc94726532c50726ccf081eb2b825e52a56c74eb9d9e846f9933dafedef0a8a1b7c485938f96ae9945706192218cc318750738596923329bc23ef770ce1 SHA512 9cd01f0539db8cd344e9dd39fc5ffcd5b65c9c8c95ed692b9f7c23bc19c970c9f0056f8c8bb61813f1402143177a5b1c20bf844e64af8cf0be110e17e30aa4af
-DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 46f38806b5a6b67953c607d4a3074a9177e14245e746771d876530c398ea98019e534a22a099c087ea2386124cc952f0a488e45f8175922b19b42441d6607938 SHA512 bc30af1e75cbfc8b488782af26d91ccee6e3b3220913af8d2ca3fc6beb5790bd81e3348f8da5c0c542bd13ab6c4cee77f50f4ba0d48e9600620034acc2dafe15
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz 230083616 BLAKE2B 2b66b809d53cc971c9cd44435c10c4bf0faa20dcc3782b47955d0fac252c370c670f0adb59f51b6842b46277d584c5fd44b94202e57aed078480f5cb6952d815 SHA512 c9f7b885008c58f7aac0edd5b6cd0295d768215e2b26cb1f590206248d468fa78409f42f48d505080ee14e2a59dd887cfc564db5a41e91ed36d738a90961f89e
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a323669f0587c9785c587ac0eac72915e421a61d2b5252c2dcc7f637176d5d425fc8cbcfa6ef848fd0d7acfa17cd430e4d42e8c03729c563dda59aa13e6d5c5b SHA512 be2e1eff9228576b66e0a0434e1edbb4525d0ef66743082afef1ef55565e312e63fed7274d01298128fda0c7ab63827d5aed90f50e184582781a4e10ee311de1
DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz 224541836 BLAKE2B b32b7886ddc5da3af0c6e394ecb167288897b2c44b0108e33aeabb3842ff563c769e635413b092a36246bbcf137d692e94c6ce66cccad34c7e728c4cf4af7bc2 SHA512 e462c8b94defc5ac5dfe923c3a6273c3d414cf576840d46a680a4f333bc34fea874c4ec4363c4e1891a6fe95087bf4a68bba7f316bfed9db6313be989afd7428
@@ -94,9 +30,5 @@ DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz 155435832 BLAKE2B d5427a7380a21
DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0b4465f1afbf2f5f9135cf722632ffd7df9ef4e92c65e9ef6d4aede5b1ff392973949a6737e88685033ee571dfefe9b099d477480d7aaec2a329926a87a6f5b2 SHA512 0c8d339204a23000cdebfaee7faaa576673bd8d98111ea187f5e19f03f7231f3bbec8158c5b04d8d903877f1addeebc9f4fdc6b1de0fc0ad2995742987eafb1c
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz 254705824 BLAKE2B 8d35bbc3ffa53b52d7d7aacc51b90283d9703a40d5623c184a79195799aa3768a34942e235e2002a0b72d76110c0d66fb5ea403f9d0c81021ead52cea2a51e40 SHA512 995530319a14bd6674d5be145e777b7fd482953e62ecf672a29e2c5b4bf567e010d7db4d5c6acef1603d79135e74f21955d9fc13ed7e1c33279d05aae39bdfec
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2681d77ffb4c40305ff532f975a9e31ea72a50fa2a25661ecd721a50f081a4ab3a659b2a06500540dbf21357af098add2a4a4dec63f50d5b3ed4c041fe4b49dd SHA512 012b2cb560e0d2514eb288960e6a3703f9be9a7e611b915f07f1150645b8527fe653d3fbb795ad62c5e431cb4ca175a915710913eb2b9f2912c188d17baa0d14
-DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b75944d47ec747d9c337cc7ba9f38dfd749415c9a00acf9d9d8743874ba1c51da7915315bd25e011eeb8a2aaa8812773850 SHA512 6f7fa855acdf20525e907a6fc8c7aa8b206603e3bcbd532d3bdce165380f0019f45dba2b2b06d20b541381accf67ca0d256fbddfcb1642a2e60e1237807d5410
-DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
-DIST rustc-1.63.0-src.tar.xz 136597192 BLAKE2B 52eb64ee11e7d9724a4c2654f7eea13521959ac5e04a4925eed5c89ec3661a7827146d6f9a9d05c98466bd4b74393af7bb18d9f418c785924f559833434dfe38 SHA512 0dd3cd1546bd9c1438afe0c4694e1ed80507f6b437674682c0474e13f83457e9ced4560ddeee58602e01837140f9e34a9e24c6828643dd6f613e07755af6997c
-DIST rustc-1.63.0-src.tar.xz.asc 801 BLAKE2B b6c133768e368a7aeb0a4612a4c824d13f91ccdca6660feb5774ed6d79537084020780532c882ae3c9e4b6be3d36ceb0652eb134a580293ba8d8be74c4ba3c6e SHA512 f8807d46b9a3ca2a15a60f8062d63b3ee6e3210657cc752c948b3c7aa1626ec63cbd57529d010ad33f07ac47cf70dbf2cb50f200587338f77c631fc9e6786b17
DIST rustc-1.64.0-src.tar.xz 137841332 BLAKE2B 8acd9e0a4632ba2114018a5cd3f2d544324c601c246658f60a9e0be513c40375434d0a416f0bfd4d24493eae3fec7c9f5bb52d008c88cde14de503a3b6873dd1 SHA512 919f40acd8c6eaaef399aa3248503bea19feb96697ab221aaede9ee789ce340b47cb899d1e0e41a31e5d7756653968a10d2faaa4aee83294c9f1243949b43516
DIST rustc-1.64.0-src.tar.xz.asc 801 BLAKE2B 69f7bd7600d99794859c6fad4b44f0e98868e4e16041d6fe81d9d09a8435c75abac67a735adb0b81a2d9f85651841d404bc1ef4cd64fccd75e8a25d6d95729d0 SHA512 a831e3941849add1082c5b47b619ea87405b875d6eeb90a35f42742a511d124c29503debd17dcc8c6aa9e03a754ab51c3a15e99192bdd0dd1b8a59af9b6eb0b8
diff --git a/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch b/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
deleted file mode 100644
index 970148124365..000000000000
--- a/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From 331c3839ebb0099101e1d2f88205ea42f4e3b319 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Tue, 24 May 2022 12:03:20 -0700
-Subject: [PATCH] add gentoo musl target specs
-
----
- .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +
- .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +
- .../src/spec/i686_gentoo_linux_musl.rs | 11 +
- compiler/rustc_target/src/spec/mod.rs | 8 +
- compiler/rustc_target/src/spec/mod.rs.orig | 2465 +++++++++++++++++
- .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +
- .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +
- .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +
- .../src/spec/x86_64_gentoo_linux_musl.rs | 11 +
- 9 files changed, 2550 insertions(+)
- create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
- create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/mod.rs.orig
- create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-
-diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..ca5f28f
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::aarch64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "aarch64-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-new file mode 100644
-index 0000000..24b3b30
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target();
-+
-+ base.llvm_target = "armv7-gentoo-linux-musleabihf".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..cab0923
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::i686_unknown_linux_musl::target();
-+
-+ base.llvm_target = "i686-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712..34b923b 100644
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -808,6 +808,14 @@ macro_rules! supported_targets {
- }
-
- supported_targets! {
-+ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
-+ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf),
-+ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
-+ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
-+ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
-+ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl),
-+ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
-+
- ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
- ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
- ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
-diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..b188a7c
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..395f603
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64le_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64le-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..cb3121d
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..2fcdb66
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::x86_64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "x86_64-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
---
-2.35.1
-
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
deleted file mode 100644
index a87687dce387..000000000000
--- a/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 97b80919e404b0768ea31ae329c3b4da54bed05a Mon Sep 17 00:00:00 2001
-From: Josh Triplett <josh@joshtriplett.org>
-Date: Thu, 18 Aug 2022 17:17:19 +0200
-Subject: [PATCH] CVE-2022-36113: avoid unpacking .cargo-ok from the crate
-
----
- src/cargo/sources/registry/mod.rs | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
-
-diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-index c17b822fd0..a2863bf78a 100644
---- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
-+++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-@@ -639,6 +639,13 @@ impl<'cfg> RegistrySource<'cfg> {
- prefix
- )
- }
-+ // Prevent unpacking the lockfile from the crate itself.
-+ if entry_path
-+ .file_name()
-+ .map_or(false, |p| p == PACKAGE_SOURCE_LOCK)
-+ {
-+ continue;
-+ }
- // Unpacking failed
- let mut result = entry.unpack_in(parent).map_err(anyhow::Error::from);
- if cfg!(windows) && restricted_names::is_windows_reserved_path(&entry_path) {
-@@ -654,16 +661,14 @@ impl<'cfg> RegistrySource<'cfg> {
- .with_context(|| format!("failed to unpack entry at `{}`", entry_path.display()))?;
- }
-
-- // The lock file is created after unpacking so we overwrite a lock file
-- // which may have been extracted from the package.
-+ // Now that we've finished unpacking, create and write to the lock file to indicate that
-+ // unpacking was successful.
- let mut ok = OpenOptions::new()
-- .create(true)
-+ .create_new(true)
- .read(true)
- .write(true)
- .open(&path)
- .with_context(|| format!("failed to open `{}`", path.display()))?;
--
-- // Write to the lock file to indicate that unpacking was successful.
- write!(ok, "ok")?;
-
- Ok(unpack_dir.to_path_buf())
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
deleted file mode 100644
index 1afbaa94138c..000000000000
--- a/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From d1f9553c825f6d7481453be8d58d0e7f117988a7 Mon Sep 17 00:00:00 2001
-From: Josh Triplett <josh@joshtriplett.org>
-Date: Thu, 18 Aug 2022 17:45:45 +0200
-Subject: [PATCH] CVE-2022-36114: limit the maximum unpacked size of a crate to
- 512MB
-
-This gives users of custom registries the same protections, using the
-same size limit that crates.io uses.
-
-`LimitErrorReader` code copied from crates.io.
----
- src/cargo/sources/registry/mod.rs | 6 +++++-
- src/cargo/util/io.rs | 27 +++++++++++++++++++++++++++
- src/cargo/util/mod.rs | 2 ++
- 3 files changed, 34 insertions(+), 1 deletion(-)
- create mode 100644 src/cargo/util/io.rs
-gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
-
-diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-index a2863bf78a..c9c414e500 100644
---- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
-+++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-@@ -182,7 +182,9 @@ use crate::util::hex;
- use crate::util::interning::InternedString;
- use crate::util::into_url::IntoUrl;
- use crate::util::network::PollExt;
--use crate::util::{restricted_names, CargoResult, Config, Filesystem, OptVersionReq};
-+use crate::util::{
-+ restricted_names, CargoResult, Config, Filesystem, LimitErrorReader, OptVersionReq,
-+};
-
- const PACKAGE_SOURCE_LOCK: &str = ".cargo-ok";
- pub const CRATES_IO_INDEX: &str = "https://github.com/rust-lang/crates.io-index";
-@@ -194,6 +196,7 @@ const VERSION_TEMPLATE: &str = "{version}";
- const PREFIX_TEMPLATE: &str = "{prefix}";
- const LOWER_PREFIX_TEMPLATE: &str = "{lowerprefix}";
- const CHECKSUM_TEMPLATE: &str = "{sha256-checksum}";
-+const MAX_UNPACK_SIZE: u64 = 512 * 1024 * 1024;
-
- /// A "source" for a local (see `local::LocalRegistry`) or remote (see
- /// `remote::RemoteRegistry`) registry.
-@@ -615,6 +618,7 @@ impl<'cfg> RegistrySource<'cfg> {
- }
- }
- let gz = GzDecoder::new(tarball);
-+ let gz = LimitErrorReader::new(gz, MAX_UNPACK_SIZE);
- let mut tar = Archive::new(gz);
- let prefix = unpack_dir.file_name().unwrap();
- let parent = unpack_dir.parent().unwrap();
-diff --git a/src/tools/cargo/src/cargo/util/io.rs b/src/tools/cargo/src/cargo/util/io.rs
-new file mode 100644
-index 0000000000..f62672db03
---- /dev/null
-+++ b/src/tools/cargo/src/cargo/util/io.rs
-@@ -0,0 +1,27 @@
-+use std::io::{self, Read, Take};
-+
-+#[derive(Debug)]
-+pub struct LimitErrorReader<R> {
-+ inner: Take<R>,
-+}
-+
-+impl<R: Read> LimitErrorReader<R> {
-+ pub fn new(r: R, limit: u64) -> LimitErrorReader<R> {
-+ LimitErrorReader {
-+ inner: r.take(limit),
-+ }
-+ }
-+}
-+
-+impl<R: Read> Read for LimitErrorReader<R> {
-+ fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-+ match self.inner.read(buf) {
-+ Ok(0) if self.inner.limit() == 0 => Err(io::Error::new(
-+ io::ErrorKind::Other,
-+ "maximum limit reached when reading",
-+ )),
-+ e => e,
-+ }
-+ }
-+}
-+
-diff --git a/src/tools/cargo/src/cargo/util/mod.rs b/src/tools/cargo/src/cargo/util/mod.rs
-index 28f685c209..47bbf37aad 100644
---- a/src/tools/cargo/src/cargo/util/mod.rs
-+++ b/src/tools/cargo/src/cargo/util/mod.rs
-@@ -14,6 +14,7 @@ pub use self::hasher::StableHasher;
- pub use self::hex::{hash_u64, short_hash, to_hex};
- pub use self::into_url::IntoUrl;
- pub use self::into_url_with_base::IntoUrlWithBase;
-+pub(crate) use self::io::LimitErrorReader;
- pub use self::lev_distance::{closest, closest_msg, lev_distance};
- pub use self::lockserver::{LockServer, LockServerClient, LockServerStarted};
- pub use self::progress::{Progress, ProgressStyle};
-@@ -44,6 +45,7 @@ pub mod important_paths;
- pub mod interning;
- pub mod into_url;
- mod into_url_with_base;
-+mod io;
- pub mod job;
- pub mod lev_distance;
- mod lockserver;
diff --git a/dev-lang/rust/rust-1.62.1.ebuild b/dev-lang/rust/rust-1.62.1.ebuild
deleted file mode 100644
index 330a83219754..000000000000
--- a/dev-lang/rust/rust-1.62.1.ebuild
+++ /dev/null
@@ -1,741 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ppc64 ~riscv sparc x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 14 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use profiler; then
- tools="\"rust-demangler\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if is_libcxx_linked; then
- # https://bugs.gentoo.org/732632
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- [llvm.build-config]
- CMAKE_VERBOSE_MAKEFILE = "ON"
- CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
- CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
- CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="${RUSTFLAGS:-}"
- echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
- echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
diff --git a/dev-lang/rust/rust-1.63.0-r1.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
deleted file mode 100644
index d0595ed73590..000000000000
--- a/dev-lang/rust/rust-1.63.0-r1.ebuild
+++ /dev/null
@@ -1,774 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 14 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- system-llvm? (
- ${LLVM_DEPEND}
- llvm-libunwind? ( sys-libs/llvm-libunwind:= )
- )
- !system-llvm? (
- !llvm-libunwind? (
- elibc_musl? ( sys-libs/libunwind:= )
- )
- )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
- "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
- "${FILESDIR}"/1.63.0-CVE-2022-36113.patch
- "${FILESDIR}"/1.63.0-CVE-2022-36114.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- has_version sys-devel/gcc || esetup_unwind_hack
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use profiler; then
- tools="\"rust-demangler\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if is_libcxx_linked; then
- # https://bugs.gentoo.org/732632
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- [llvm.build-config]
- CMAKE_VERBOSE_MAKEFILE = "ON"
- CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
- CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
- CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
- _EOF_
- # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- # but we patch it and set to false here as well
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="\"${RUSTFLAGS}\""
- echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
- echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
- echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2024-10-12 4:04 Sam James
0 siblings, 0 replies; 33+ messages in thread
From: Sam James @ 2024-10-12 4:04 UTC (permalink / raw
To: gentoo-commits
commit: 867d488d1eedef28864dc3f773e020dac36979b4
Author: Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk>
AuthorDate: Fri Oct 11 22:51:48 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 12 04:03:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=867d488d
dev-lang/rust: backport llvm patches for gcc-15
No revbump since this is build-only.
Bug: https://bugs.gentoo.org/937164
Closes: https://bugs.gentoo.org/937525
Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Closes: https://github.com/gentoo/gentoo/pull/38947
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../rust/files/1.81.0-backport-bug937164.patch | 15 +++++++++++
.../rust/files/1.81.0-backport-llvm-pr101761.patch | 30 ++++++++++++++++++++++
.../rust/files/1.81.0-backport-llvm-pr101766.patch | 29 +++++++++++++++++++++
dev-lang/rust/rust-1.81.0.ebuild | 3 +++
4 files changed, 77 insertions(+)
diff --git a/dev-lang/rust/files/1.81.0-backport-bug937164.patch b/dev-lang/rust/files/1.81.0-backport-bug937164.patch
new file mode 100644
index 000000000000..a6e887db34ab
--- /dev/null
+++ b/dev-lang/rust/files/1.81.0-backport-bug937164.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+
+Unnecessary on 19+ because 2222fddfc0a2ff02036542511597839856289094 adds
+SmallVector and SmallVector is fixed by another patch.
+--- a/src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
++++ b/src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+@@ -13,6 +13,7 @@
+ #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+ #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+
++#include <cstdint>
+ #include <memory>
+ #include <string>
+
diff --git a/dev-lang/rust/files/1.81.0-backport-llvm-pr101761.patch b/dev-lang/rust/files/1.81.0-backport-llvm-pr101761.patch
new file mode 100644
index 000000000000..fccb22d57ce4
--- /dev/null
+++ b/dev-lang/rust/files/1.81.0-backport-llvm-pr101761.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1
+https://github.com/llvm/llvm-project/pull/101761
+
+From 7e44305041d96b064c197216b931ae3917a34ac1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Aug 2024 23:07:21 +0100
+Subject: [PATCH] [ADT] Add `<cstdint>` to SmallVector (#101761)
+
+SmallVector uses `uint32_t`, `uint64_t` without including `<cstdint>`
+which fails to build w/ GCC 15 after a change in libstdc++ [0]
+
+[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
+---
+ src/llvm-project/llvm/include/llvm/ADT/SmallVector.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h b/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
+index 09676d792dfebd..17444147b102a9 100644
+--- a/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
++++ b/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
+@@ -19,6 +19,7 @@
+ #include <algorithm>
+ #include <cassert>
+ #include <cstddef>
++#include <cstdint>
+ #include <cstdlib>
+ #include <cstring>
+ #include <functional>
diff --git a/dev-lang/rust/files/1.81.0-backport-llvm-pr101766.patch b/dev-lang/rust/files/1.81.0-backport-llvm-pr101766.patch
new file mode 100644
index 000000000000..fdecdaf66a95
--- /dev/null
+++ b/dev-lang/rust/files/1.81.0-backport-llvm-pr101766.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+https://github.com/llvm/llvm-project/pull/101766
+
+From 5b69d0cf697f0d78406a5a7ed18eaa4f57a0580a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Aug 2024 23:38:55 +0100
+Subject: [PATCH] [AMDGPU] Include `<cstdint>` in AMDGPUMCTargetDesc
+
+createAMDGPUELFObjectWriter uses `uint8_t` without including `<cstdint>`
+which fails to build w/ GCC 15 after a change in libstdc++ [0].
+
+[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
+---
+ src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h b/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+index 3ef00f75735b0d..879dbe1b279b18 100644
+--- a/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
++++ b/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+@@ -15,6 +15,7 @@
+ #ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+ #define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+
++#include <cstdint>
+ #include <memory>
+
+ namespace llvm {
diff --git a/dev-lang/rust/rust-1.81.0.ebuild b/dev-lang/rust/rust-1.81.0.ebuild
index 5634139adde1..749e2d45e1cf 100644
--- a/dev-lang/rust/rust-1.81.0.ebuild
+++ b/dev-lang/rust/rust-1.81.0.ebuild
@@ -169,6 +169,9 @@ PATCHES=(
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
"${FILESDIR}"/1.67.0-doc-wasm.patch
"${FILESDIR}"/1.79.0-revert-8c40426.patch
+ "${FILESDIR}/1.81.0-backport-bug937164.patch"
+ "${FILESDIR}/1.81.0-backport-llvm-pr101761.patch"
+ "${FILESDIR}/1.81.0-backport-llvm-pr101766.patch"
)
clear_vendor_checksums() {
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2024-02-11 6:01 Sam James
0 siblings, 0 replies; 33+ messages in thread
From: Sam James @ 2024-02-11 6:01 UTC (permalink / raw
To: gentoo-commits
commit: 051355c623854159c59fa1af75c4fbb7dbb8993e
Author: Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Sun Feb 11 01:47:25 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 11 05:59:50 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=051355c6
dev-lang/rust: rebase and re-apply musl dynamic linking patch for 1.75
This somehow got lost in the 1.75 bump, but it is required for e.g.
Firefox to compile on musl.
Bug: https://bugs.gentoo.org/922880
Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/35267
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch | 19 +++++++++++++++++++
.../{rust-1.75.0.ebuild => rust-1.75.0-r1.ebuild} | 1 +
2 files changed, 20 insertions(+)
diff --git a/dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch b/dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch
new file mode 100644
index 000000000000..7dc34f8ad6b8
--- /dev/null
+++ b/dev-lang/rust/files/1.75.0-musl-dynamic-linking.patch
@@ -0,0 +1,19 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+ base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+
+ // These targets statically link libc by default
+- base.crt_static_default = true;
++ base.crt_static_default = false;
+
+ base
+ }
+--
+2.35.1
diff --git a/dev-lang/rust/rust-1.75.0.ebuild b/dev-lang/rust/rust-1.75.0-r1.ebuild
similarity index 99%
rename from dev-lang/rust/rust-1.75.0.ebuild
rename to dev-lang/rust/rust-1.75.0-r1.ebuild
index 1c9761e003fe..19b85fcb4ae6 100644
--- a/dev-lang/rust/rust-1.75.0.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r1.ebuild
@@ -163,6 +163,7 @@ RESTRICT="test"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
+ "${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
"${FILESDIR}"/1.74.1-cross-compile-libz.patch
#"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2023-10-02 8:13 WANG Xuerui
0 siblings, 0 replies; 33+ messages in thread
From: WANG Xuerui @ 2023-10-02 8:13 UTC (permalink / raw
To: gentoo-commits
commit: 515b5920046117355d88b3494c74da269ce9b30a
Author: Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Mon Aug 28 15:16:12 2023 +0000
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Mon Oct 2 08:06:10 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=515b5920
dev-lang/rust: Fix build with musl 1.2.4
Rust 1.72.0 bumped the version of the libc crate required by the std to
0.2.146, which finally means that the stdlib no longer references LFS64
symbols. This commit make rust 1.72.0 bootstrap from 1.72.0, and adds
a patch that bumps all remaining dependencies on libc <0.2.146 in
vendored crates.
Closes: https://github.com/gentoo/gentoo/pull/32488
Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
dev-lang/rust/Manifest | 64 ++++-----
.../files/1.72.0-bump-libc-deps-to-0.2.146.patch | 156 +++++++++++++++++++++
.../{rust-1.72.0.ebuild => rust-1.72.0-r1.ebuild} | 15 +-
3 files changed, 198 insertions(+), 37 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index e6461f7228a6..85e55592165d 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -236,42 +236,34 @@ DIST rust-1.70.0-x86_64-unknown-linux-gnu.tar.xz 163456784 BLAKE2B 49a8397a7129a
DIST rust-1.70.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e5fae8b3c87f54b39d922fe0c7694e0ba115ae34a668cc873390fc9e4638baaff5b6d1b4c67228c6bfc57b4da9bf77d6a452ca12bf6653d5610895b8ba19d64d SHA512 352749df741287107b966fd603113c51e82a426a7151e224e3a8d1cc7bd4658ef86147f6fce62caccd7b5779d9961be72cbb618db79a2850e8a8c4b0bc229ad3
DIST rust-1.70.0-x86_64-unknown-linux-musl.tar.xz 233692884 BLAKE2B 295e815bbee6dc135ad17dd78801999afa7880a7a8f5ad4932a7580f1b03d50b850bcc3eb68e9d679e0a2d68392d446423ea752e47bb22d64823bf3222e0b377 SHA512 5e42224e109d525a321c107005660059ddcb0414392abc660b80fb09a55c936c79215989646be0aff6b0427b2f5d82a2a19ec3bd3235883a2037575808aeb69b
DIST rust-1.70.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 7c5be81109607f191f339cfef87c736e2d35d4a045511036ee6e9bd68f22fbaae825ad5c463b0a5bf29606a8b9cf488172d1338aa4d034767b0f59243613c250 SHA512 241863164ee1a0d702080c9967e2ec5bb7af9222236316c8857b89b517fcbdc362b26ff3e362c4be7fd2989d3fd2aad0a0476feacecd2604855dfa53f5f1af27
-DIST rust-1.71.1-aarch64-unknown-linux-gnu.tar.xz 209839296 BLAKE2B da65e966a6bd8c6a8a13e5ab747da2a8d9b55f90fc20c1bd041ccc1a2f4e2d11d50d2ed9cc7f3a470e7f886ec8b891ef98ea1295491414d5afeae7f83fa3a555 SHA512 a2ea1383a6ea965e4b0c3a7c648bb357fb531a6984418756abcff3c526ccd9221a28aeedd11b65180fd166575e07a00151460dbc15e3b132a0bcac643911d242
-DIST rust-1.71.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 52d1fbdba32db7ac2578615fd10a3db1da84441274bb190624e517aec67279c7330f7c6b7fa0835d8e1cd8f578d34952813228a6a221e41c4193e9a079cc6fb6 SHA512 63cbbdd9a73f0223444565b60f59765a734633ef8e93843639969b96fb67550b85fe58079d486a927174f95619f0d6fdfe3f3b84d871f776bc48986be7965238
-DIST rust-1.71.1-aarch64-unknown-linux-musl.tar.xz 193170880 BLAKE2B 26384119108f4503d35f79fc5401c46e1eee326eca4dc6cc282949d2f195928fda5d3bf56c0509b04fdaa3e7c3c47f4ba44b2b82a60b02f7bc520360b0433efe SHA512 3e79692cd4dba512516eb48970dc9711448c33e1d7a5ebe7c5fadaed7f053ae9c1a8e6efcd1713f87dd84107a37b0fb21b1246e0d5c3e0dab677e5c7ed210825
-DIST rust-1.71.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 223d21586b07645d5860a3a023f42a191fc2490ad9e5736c3b2335565227780aa1f87174060cd6f87c4c873b965bb32b1556fb60fe70a7dc0f753409adabb024 SHA512 197197752e5ce110a1a96ecab8d1ae3aa82769a199c51b42a14b1f0749045a280f00aea0dd0653211bb941b80fbf43960d1e11766cf2dc35be3a34445e336423
-DIST rust-1.71.1-arm-unknown-linux-gnueabi.tar.xz 173870064 BLAKE2B 3c2e440e22199e081f6121513cf2a86b22ba0da08569d0b95edd1a69d890e191bda150429f4329c9932d45c44d49e8dfe1902513bb379b039dabfeb8bca36a44 SHA512 c59b1ba5d8bc29a2d1bb57f19e584af28ac92d8bbf889b80d443684e09a6249453bea429226078c9ffcc4d04a7a03f3605d82e3d8b412ca83720cabf5595a8e5
-DIST rust-1.71.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 38a5fe9e5e67298909d6a36e625b990128649975d47e544847a2d6067ff88fa63cc0c3e1c8e2c8697f0a0f39584b4e60cb8f29390cc6abad721c681a4cf183e2 SHA512 a7230aa7f507e5e4d71d2701fd5c1abe29e3c53109d67a5133fc32ea32018c6ea6dfe512a0e58acfa8d2c39dbaeee2cafe420aef4979e95ce9d62b7520b9b01c
-DIST rust-1.71.1-arm-unknown-linux-gnueabihf.tar.xz 174277632 BLAKE2B c317f946f4fa7b4e5c4e39bf4035108ff1a6085420f932eaa532cb89f15babf4b80a5c231f9980300d4ea18b6dd369bcda33bdceeb7065b03fdde41a01165e76 SHA512 ff4b6ac0e6691820f525a84505a3556a729cb189700209c084e9fe981bd076ad7ec30fb748666b7f51ee901ac039d596670bf782c60018590980ff1e61cd396b
-DIST rust-1.71.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 2fa6e24ac4cd9ec4772655c5e8b135a0118c38ebb41462940669df0c65c0091e60306a5a09cb020dcdaf06aca7b2c8cdff904dd2a5f4ca87acfbc5775adf2b6c SHA512 c9cf9c1f8e19fe0576dd805f21ed8afd1d3536fa8ba00fcd39d6e6638198fca51114a8d99cd62164d8a0aee6bdf37831e678f08241fb8ba63ccdd6e8c7225717
-DIST rust-1.71.1-armv7-unknown-linux-gnueabihf.tar.xz 178239136 BLAKE2B ae0ca46260aa4bb60760812f50e606ecc18fc14b3dfa56135cb6a83249c0cd5e0544d29ef5eb34d3ce45e53552f736c8db2928b3d65d847a9b3d61be7e863ee2 SHA512 56c63d4e9dd99ba3604bec5c0f0d8c2a51a93c0d11beed721d99cca05b20310f4439c049ee5b3ddb6e723381e315ac991d9a7327cea86e852b6cfca4cc7f9a0d
-DIST rust-1.71.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B d5cea850a1930a316574c977542e7026eed67dc244d8857c720d9de168f39b5437912634cd5ebefb63e8d58200e7b11d69b8c6ea0e257642a0df7c1ae8026c80 SHA512 2d06f90f916e4f184d536b695d123628a28f452ad4fb3da53dd3fcf5e013df594e8ee6eb1819268bc5b20ceb1c05d6d3b68a4021e60c73c7da934fc05014d2c1
-DIST rust-1.71.1-i686-unknown-linux-gnu.tar.xz 202188608 BLAKE2B 153f94771d68ab8bc25d1e38afea206cdd182a1ca0b7ea8616b932617c2368acaffda959ce3220506d7b2601b5120ce65ab83fbef167429b1b8a76108f3137b6 SHA512 e835354cee992f751d994943718d8908bc687a540b91b4b296962ceb0047d447e5b12a7cfc6661de8a4ee9c90722f8274c3e6a37f6842e8012f883cff32ac2aa
-DIST rust-1.71.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d2e47ce2eaf7d8c16a12630778cffb25fdbbe23d978ff46d02fb6363f6ce45a6295cb948f7b20c9a966d14f832a38e3c53018188b54fcfaac7b2df85508990a9 SHA512 2e5d191ba550965de6962c595c5dd063f96603522eff467433f3cffb31539e3406c1a62e3fd37a66c4eeaff2c1200a33439c6ca5133dc00930c89c7713ecb0ee
-DIST rust-1.71.1-loongarch64-unknown-linux-gnu.tar.xz 158000652 BLAKE2B 6ca5a251202330755f53eff6151abb724cbfbdf190e19d15df009e33cb17795b74a491e8a6c040ea69fcb603d19b7baf6f1f47afb5a984bcbb6239640748e003 SHA512 be33401e6f02669102e51524ecb2a4bcb75a539084ed0e04f80bd389be8432a7f3952304b21397fc1d6894d86a263da40831625a04b72536dd2af79b0d2e1845
-DIST rust-1.71.1-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5b744b2bd11ff69ac0c66af93a80c0c9f4d6aec465109033a8ffc63d2a1a8bb0e9cde1d3e9aa65e27287105673230acd07511e58112b7c5beb0c452323cea72a SHA512 a5d71f2555bfda22c0366a35032ab902071e3c75e781d1b1c5d090b6b6dac78046b31b789f71f9ed4adf80523903add324c1eb8e8f8a7b744d6a7d8cc6d3be68
-DIST rust-1.71.1-mips-unknown-linux-gnu.tar.xz 152451900 BLAKE2B 86804480dec985aecedec561707ce7dd2dff5e85b25da940051c2d89ae905b630ed7bb0df9e9bf6373917c5f6f513049b8be4b0b673d7c0dd77d8095700e6103 SHA512 0d3069e17c23e6651bc6dc2f7dd4de6b5b54e24ade5aa81a8ddbaa5f4f13c26084c3a04d246181d49fbb15cedede2a5d8f3e4a21080654a257c1b4285dcdef27
-DIST rust-1.71.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 217ca15420e4ccce2ea287913eaee07b90a1ec534a805b899032a8ba18f7b6a75feba873b8fa773efef32cbb0b265da08ff026e6d387c824e63000b04e7419b5 SHA512 2e0355d8364a9e6b711012fc8e1f227c76290804d967def666ae30e899f52197da06dc1498191f6b9de6868730eb8883ca0849351981efd82a5b9d12da9681d0
-DIST rust-1.71.1-mips64-unknown-linux-gnuabi64.tar.xz 150685836 BLAKE2B 90496f5f9b3af09d9da3b45913a57ac2b1035838cf4940d3a6d4c2fb6bd1c5dacc86b144e8be851a35bcce19100ed2cc800d840c3182b01ea1954353060d56d4 SHA512 af97988af615c7cfe08db0424169cb133f97914fcc75a76356ae3b0eeac2c8eed436208694d218a75879db163963d87523d23d6ce5ccc91688679950536c13df
-DIST rust-1.71.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 04665afa887c047d2e888ee4275faab1efda5f7dbeb4222c056af53c756a00ccfa5cd0f5a792df4bff325cb870f50ce6cb09e713afeeec201050eaa14dd6b0da SHA512 560d1e474e177cdc28cf94b10f72785ccc0db748a185b5bee8ab0c9598d3ef7152f79bffa7f11594be06ae07c3d56bc8176bfbd40284a6888d20e77bd036b9e6
-DIST rust-1.71.1-mips64el-unknown-linux-gnuabi64.tar.xz 153800316 BLAKE2B 63787c2fd44406d45de5f153259237df8116aa5419d241c92c5e9509db1fdea6fbfa0b119bca83cbc23a2abdfd50365de7c7e3f37bb0f7d402382657c97ad226 SHA512 a6c8399f2f4e56340d1712c71f03ac87ecb8f3694f0c4f1ce64a1f810de850f5ece7361cd93e8881d83cea2094a82a51f0d54cb795c4d02a5a1d94ed49b8f0cf
-DIST rust-1.71.1-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B b69e13a4dd21447d7a39c24f96e9416c7b68bdb4af08c1ee7e312d78d2b064d1d67e397c0f04f9f8c68498ff3934350729021c9a4ee521967bdb63f53ab08c17 SHA512 9bcf27125cdf776719c87adb2947b1b9965dd3dcb231293a225e2424906e759f97ce2972d2f7ecaf69d708266303b8dc776c3e119c070e1c21ef59fb90405050
-DIST rust-1.71.1-mipsel-unknown-linux-gnu.tar.xz 155924032 BLAKE2B a4862cfd02053dc8303de9158929da634980c15d8fe32b7b51b316e6aa83de1f0d075ea4acd250d5bb210cb269bff373613bd45eba003f38439e22831b433dc2 SHA512 96708e1481c4790d5c2938ce7664cf83c2b9295023af017345ab0c9afa37bd43c2db93b9e8097d8d1aa6c913bab0db9324f057ecb25aa65bc16295cc625f2bdd
-DIST rust-1.71.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 90063d27ffb9071f6c10cc54d17073ea79436dab947b7f8f0a8f2d7c0671edc66f7e45d5954af77f30f8c3a005d2951af56f129d311cf328c9987bd5a5ea9802 SHA512 a2bc87f7c1baaf6f245b1d008162a1e5f52b6f949a3e06f69a7ae22315fc7770403ace7289830cfa60f6e66fabbb23352fabb5f0c24be05d58f4f891a8d6e956
-DIST rust-1.71.1-powerpc-unknown-linux-gnu.tar.xz 172809692 BLAKE2B dd6e3c96d168dc2ad4b3bca38a42a2b3c5c0ec5555f042ffb9a7e1d6430bce3659953c2c6c5454843ab41e648e479c5cef2645f2ce0bafe72892ff1ed014787d SHA512 bc2a8b9fc8494cdbab89364c15212f7f8e9af416639f9dd05cc57f0ffe18288be7ec489d18061387c43a2f8f4ab1273bcd7de58126546b59a42ae80e9a2c45d8
-DIST rust-1.71.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 620a63d1732cc0cccdc3bf6b141e2467c0ba50668d72be44cf04becfa9e0c30e5a5a4a7f5ae39fd1321130703bc6522c78e9bfdb23e7b3354fd760eb4d118991 SHA512 f6467c3ab3694fb89db06c67e6fb8afde75b4ab86752d9c918c89ca6bcc8914bf45da71076142eeea2dd10910edea42ab0d8144ff7b769b22edcf9bdb447e381
-DIST rust-1.71.1-powerpc64-unknown-linux-gnu.tar.xz 172399116 BLAKE2B ebc82664a4e9f651e9111e862a9cc341615526c6e7af2b181a653eb7d6a0c52156bf1cd35671c6e5aea41fa2653f042a9c865212bef6e8844a88fb9bb7a8891a SHA512 94395abdeb1615f594e4fc86d8bad85a01bbab05893bc8af7890ec509a2006d51c1a8723d3cc8082a214ee851fe4ba06707e01c3f009ed340d791d35e034341a
-DIST rust-1.71.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6d3565b8d9ec5b6d719dbe06120469e2a6f1ac42708bd7ef9705e796f0a4c528929a3984a7090a4da6521b09a53b48db119dc388d66f782f01a1ebfa61c8df21 SHA512 847fa662ddf9234a4a6b73e9d515b06fd0af0f098a826463ddb7df406dfdb25ca7b37110e90ff07f0a58cdf2c42755ccac70f057243b44f3b733ddc449cbde2a
-DIST rust-1.71.1-powerpc64le-unknown-linux-gnu.tar.xz 183620460 BLAKE2B f8c562813364a2ddcad26287f227ea93af4d91fb083998835e469a676c9be1c0262e88d0cb7e06cdd1293ba8807334744d4e4000c58d9f34c07fc851b0e31e5b SHA512 f8f627d847e405c9960a01f59eb1e14aa647e42004cbeaabe734c110827921f019cc01bea13f2ea0b5b3c2e4391f60b6ccbe4298182593564169cce0db6c9ae6
-DIST rust-1.71.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2c09621ed09918bcebc6561f7f12e387be7919568929d0215a6bc5333610c158acca2998ff8c918956d8289da2f3e2ed4850c0ce45a9f1d85a304063eb8d5671 SHA512 5f5361a954d4b0510d48cf5b2f2bd0722f9d99a7b28aab8f3dfea9303489d9b60f6e20ee4fc61b74619d3c0fd298ab9bb903b3509f55c448886e428ba9e28d71
-DIST rust-1.71.1-riscv64gc-unknown-linux-gnu.tar.xz 164813572 BLAKE2B f86f7443da64afd416ea3119933a05a7638ee41576e9d761f491376b781e9362992223186109a6b930ee8a012dac5c37547448dcb903bd5bc480b66f8fef3123 SHA512 525a345dcb09141e4f4f5ef911c8f8dd63180fab956752ce0e9f5e2821c89603a2896e7042e019f61ae8807052e96b52bec492f49508dad2a351ce1a9c6de79b
-DIST rust-1.71.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6d37bd643caa5780e80a51876228bd12175132af89f1fd35dbd55f8c5544afd21c3e844027083d9cd5ba48bd41c3dc8c1427b400c2141dc3e1d128a6f5672ba2 SHA512 ee22b054810c12dbd48e9ac4006d74f2545c5fa090b80f831673e0850e16122569376380d1edea6c6195bf76441c0751ab52c6a143a643e656af0880c12578c5
-DIST rust-1.71.1-s390x-unknown-linux-gnu.tar.xz 195515792 BLAKE2B e8618c69ccc350c7e63461080a3768bf4d7b26f57e75a98a6e62625cb0deed8cf93dc00e485051d01b9996c6b48d3d1a84f88d5194b618d06e926c5543524071 SHA512 7915806421c07b70acf31bab86086981dcabee08e826668c8225db68c4f895fd16ba3e16b710416d2b96de3c30a9dcd137107a04ced21972d3fe52500e56178e
-DIST rust-1.71.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4266dea5182a07d4ea1f28e6a362a2233df684836af9b5d2b78e87aea2626575d3af6716868b1cc10d2f38d77910d845c3997da7bf93fe865d8486d63dbc9e1b SHA512 a70d2d4592021294734ca9e069ce1f22e2531323524e4bc6477efae074026e0685e31c1d06328e2b17eb87a27dd7ec6793804c87280a002733b87a676c374729
-DIST rust-1.71.1-x86_64-unknown-linux-gnu.tar.xz 161080376 BLAKE2B 40bf80551c032dd62e19bae5a235575c5d8894ea75f77dd34510499b4f4e779e27da0faa98aaeacb57f73e9632ee90ff0f60f167108529ade67198841215d109 SHA512 15c5ff75b02357beefe717a36e7755d2841778ce4e39020d2b920239e4c8d0adfc17ee65de7bf42493d287bdfca194189f3276adc0374ac3d1a6af63270ef954
-DIST rust-1.71.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ce029d9af59f26535a3fa121f20672f7eaad5019934457ac7ddc059dafcb2c3a37e5683923d4bba3f3a735805f11092189cf84d0a6352a5f9f475bd3eb00cdf5 SHA512 0376b16b9c845738c3c291ab2a73a3ecb20cbb8bdd0820568a0683c84b211e639413b3046d756e607a0f1b23695c9dcb351711fcc474e6faa8fe3098b1fefefd
-DIST rust-1.71.1-x86_64-unknown-linux-musl.tar.xz 232096648 BLAKE2B 7f4deafa57baa300f037ce3d9dbd101d5d28cf29368c4b2fc8e51799e59382155076aa0a3c0b6fa0c076693fd43dfaf80ad7685cd44233d7c31037c091a90224 SHA512 55b507a30d62a36aece4a2c2cab985e09d9552ae331c1cab51d949777261600e61d4f05ca1e81fe8b37591fb91939b1cdb55e6930d70e5126eea1a78caa74eb4
-DIST rust-1.71.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B d4a9f89274bf4b0004248764c07c7f82f8708f81a826d7509611b75e51d280707a75ff2c9d6b372e79259f7086b3e962afe51c3f0b98dd3fdd4feb683783c9fb SHA512 8be13b63b48740bec80772a826f06a012de58b1294f87374d7b4c844c90f3093ffe86bd3f1d989987696aa095302cc4644e3137fa2c9e1363c9ae8c3e1a05268
+DIST rust-1.72.0-aarch64-unknown-linux-gnu.tar.xz 212153292 BLAKE2B 2896fb7c195bfb0b1b8313c390458c86e18986e2c1fcd973380e26ed78ea955c20c37475c9788fe9b23435020393fd8408566091c2974ba439b86f3b34676100 SHA512 7843b39ac259267c276834c66bb139f0548e5ee2dd1bf9e3830b07cf687e15f4b27f343dc13ff155bd86c8f0580f7f16576bb6731b782447fd0f0511f8c75e95
+DIST rust-1.72.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B aa8b2eac07010a0e564d6681831f99e3379ab5a2520c3fc29cc67803afdcb8952b596b653d8bd8e15305f1ce5b9c97ec611a3d3e8f4f3ab2dd2dd066c0401218 SHA512 308f82d5acdd18469b751d97d89617502ba554e6dfe72cc38cbcda0abb5705dc667f0c18a69aa1260143cfb4a93ce7c77726a917ab2060f7cd7d4a071387fc28
+DIST rust-1.72.0-aarch64-unknown-linux-musl.tar.xz 195414824 BLAKE2B 0bcd33b23ab927c36d2fe4eeca98edf421824d1ac9d88593bfd29476c8faec6fd7deddf0e6efad38faa0000986b234c7f5aed8d15eab9ca37569a434ddfddbf3 SHA512 7ab0adfabe9e5e3226add9fcc34445fecf9bea270cacf5e87c13edfa240c2b26f34cf035386ccd9b8c1edcbd74285d903d3dd7a96f6f1a928f4f60c6e619324d
+DIST rust-1.72.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 243c5108f2f56f742d589a3d510758c7377e5ff2625e1414f6cf5340c111780ad6397305fb01d28af50a9484662777c70328f9b2f490f3e2e3f934a4ff133604 SHA512 49289ccbc79f022d23eaa9d4d9e551365be6cd348e23f01ac099e103cc6cd2508b30494057e181a8246d7c9fe1d7fefb6ff473608e3d8835d098ad6c00dc02a5
+DIST rust-1.72.0-arm-unknown-linux-gnueabi.tar.xz 175875544 BLAKE2B 20dc09b8e2cc48a7a52f184baac30c523cd180524b178a91a72c6b7bc91e8ce0fe3e4d2605b1f9b5aa1535daf29a8e92328bd919a9f5913002086726f5e6d8b7 SHA512 2b8da66ec7575fe4e77d34247cbd91b376f5f00039c02855964883fe0e3610c47f087ff3486b36181ab7724dcecec78762636c9c9fd17a2e9410bee5f7efc84f
+DIST rust-1.72.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 8a5cbed0df91a723f3c96b612c2eeb2580073fc895467a051b714b8d29956caee3199422686ebdeec6f38c8b0b05e5ef7a79f4a5ba92d77ed500ffcc4e3532f9 SHA512 a3259d475ad2722319a15ebcdc5c5c7a74b38813d7ee2de5d1d69e7ddcb9cd2bd3144655df73e1f5736262de5166d444a4aa9ec638ab4e2228de0e5b91fc46e0
+DIST rust-1.72.0-arm-unknown-linux-gnueabihf.tar.xz 176030324 BLAKE2B 8285f86700cd5dfb7ad2bdd70fc58a5222e64d7bb70aa51984001ce379b4fc7117e90faba1c3465357a27691231aab1c601f9b603418fb2004a4b2a8ed74a083 SHA512 9f810fd926b7d425c14ae40f8e47f59609fb18618ff4b16f26cc42904f9797a9633852a6747c2a7ecc130adada08ded4c99565a53d563b17ad04350d15145666
+DIST rust-1.72.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 6465556de7829ac1c02fc8cf6f9f394d87d8af9326710c100f24de5cdca62c3a6dcb831177d98d9b060a6e4338985513072f3430418e4378c1988509d8f10528 SHA512 3a85a1a7111fc86a5974700de196f716c6cef0436a7bbf791be7ec5eed3252ae654d48f60c5056e5d5000196b34d7cd32d821670677363aa9a94200ff269d6d7
+DIST rust-1.72.0-armv7-unknown-linux-gnueabihf.tar.xz 180272644 BLAKE2B e3c1d8cfdb4a3ed8e445ea1814d62f1d072de67f0c217908c7cdbffb30614cabcf8582e393a62ac43624e0d131bde1c51426ca04d9dfbbec265887b674863b83 SHA512 36f7d44e52668e4e67700834d0614d7f37f3b7219eecd1008ff9660f79226a011bac75402ecd43ae12ef5479d2e2187b10691057c188fc5046cb79138bf6e521
+DIST rust-1.72.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 09ed6107a45ffc61a80dd2ef21a286d184f0a2c8c57a8c0e41fa1eca786941cef06b66b5035eefade29781912118ff1da11a7f7fbb3ab3b4873d8cd2249e3f03 SHA512 7735c460247df0a6536561967090eeb5784a44d1a1cabbefd6d57a0afd74bbaeec96f65e206388f7958b32568997ecadaf83c9e75451986e70fb05167584bae4
+DIST rust-1.72.0-i686-unknown-linux-gnu.tar.xz 203434692 BLAKE2B 2affd5b42c664939ea0c15837baf51c9f315aa456c41e916300b45a3eb06c26995394d292380470442f0fd4b187fb58a1730ecbe9a4928837a7ccc0d59d8ed2b SHA512 fc8ed251d6c9888894b168506e5980cb9802b43485de5c9145d128257b1b60d363612115149f39cc13a9e18929422deb8285dd999abdcdb089d2318dec8ec606
+DIST rust-1.72.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 16048265dcb012b67fe9de44c11353a2506b314c45482721648358ee84dd500d13c30ab55e14f0cbc6837761924904355f02a0001a042819201c096965c8bc74 SHA512 5f16000c95372d9799787c3bb0f4d948cca18ab806e368ccee17d4bddb20352492906d54cd56fa3d50545374a70e42a893c37463baaccd1e612358a7c809a9e6
+DIST rust-1.72.0-loongarch64-unknown-linux-gnu.tar.xz 160819080 BLAKE2B 66b5f34f9dbbc633fc240a240d5b0555ac55c5cfddbadeb22168ab90be83410a75a9fbb154fd1aeec2ba8447ff76ed2984966c7352b46afb52fdb2eae82b02a1 SHA512 fdebcca89a65d5cfa6c9d65f89a34989af0b8c5c1396dc182ff6d4ce320111ae6b23c2e06786ebefd8dc40dc391342d38fed38a193daf0b42b6dac64cd79d36e
+DIST rust-1.72.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d7e483773ee6c105829d7b711904dd14194c9e69d6ad1271c45ff826d78cd23da3e8f5dfea688adb157a9c2697d3c36b1e88e7ee2789d571bc90e41701e46540 SHA512 0644e4d76dda08cd95bc45c5797252b26318841844f4d0baa49212c1121c773b64d2a4ea993c83d412e33433e604b1cbdb86ff60f8328cad2f5c741ebfc24a42
+DIST rust-1.72.0-powerpc-unknown-linux-gnu.tar.xz 175099316 BLAKE2B 7eaa2dc7816f63a9a4288d852b2ba7b3e13c5155f5f9a8a6ebb4a2d20f03e900b52054689958a07e7f52918835536ce92a117f8ffa014196040c3bf340d33b78 SHA512 f2e87a12a2d5146011fd9df5532df06b7a936c2ee4866b95d0d484099240df9aa13597877d8f1ef56537928b196dfb89d2b2084784ff9b2f86eb37407661bc4a
+DIST rust-1.72.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 681fae9a730a7f8006e30d05378ca518abd8514edbf69d82e6485f11a8a98f14c819f63618412fbb4c525a4b60367498d79c0b935f6be5c7b8a59f4e60775bfd SHA512 c4f5020297ff35043c1985e04ef5322b18283d1ee24a84cc29fef3f3e48e87612bece6ea5e86a5573b86133fb1cda7402aae98c897062b18d3ab71da48e3b68b
+DIST rust-1.72.0-powerpc64-unknown-linux-gnu.tar.xz 174927468 BLAKE2B 2b7c0d3b22a6b6b80f2f9771a6a6ef678575d94c2dd0dffcde0ab572507a09b663a5a4106f72865b57da37c9e710f75d38882fa0345a73f6f1498566a77e52de SHA512 c7b7f9c2b525c8ea1ec9f9c0090a8a4c098f5680b22b04b30ac86da29586b04d2a901498035ffdb94793b2732ee985c71137c63c1f7b938496568ce8b82d678f
+DIST rust-1.72.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5b9a6805c0ca7af4931d47c9950358b896689b452b898f0ae5d21a4c4027c20c321ce6cb2b150ac3b2508ccf0a3a430124a44974cb011572a126594374e9c182 SHA512 239bb2ae442d2b7d970bcbab4bfca77e09ae17d2caf4a2cdcc231d1c9f1aceb4b98a050eb3f3fae3184c2b6f451d32cafdd0d1e11c2714e180f3e3769b9a1b42
+DIST rust-1.72.0-powerpc64le-unknown-linux-gnu.tar.xz 185829712 BLAKE2B 305af3179f7a66e6fd7b8886e9f86e4fd4d2d71654658f0804182bf7ba1a5da6c71903fd89e899eebb74ccae366ada580a7b4a33436b3b82af928ff5d081fce9 SHA512 2401d3490c1e3ec32d185f7f5886c355384ba2cf28c5d14ace0d2b8d14eb5c5cdf4c507c67c104849decc23bdeb7223a151214e11b67c2276dc8f795878c76cb
+DIST rust-1.72.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 10bd90f3e07d892adcc04d9ca43454a78a5e260dc0e90978ebd50d48aaab488466584180324970f790eb181165f2d3961c515225c95efa55ee3d53d4a8f831a8 SHA512 e72d4482171090bd1e801a94b7ddf7002555e37aea9e9543e3d7f263df938ff223c0980dbae4b56665ea42e2c352e94f0f18c418fad02cd68d3b6d7f087f4e7a
+DIST rust-1.72.0-riscv64gc-unknown-linux-gnu.tar.xz 167275368 BLAKE2B 0e77dadf640c0fae29f720458caffb3dfe1d9a6514526676e1da333098341eba20d2df9b191005e5d66e6396b9e12c25520692f862ad84c1fc91eb1a6a71c470 SHA512 157da3684962c3145206910627bebc9fc5f01fc8d7e56477bae2796bc8fafdcc504dcb77cbdcc96cb2288b0cb019452116df7740fae3a87b5274d103da7f3a41
+DIST rust-1.72.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e660968bd401882034d63884e60ddf0e50a42c1e17a517aaf153731a0d319d9de5c074381fd1e56b535e1a870afe2b17b7dbfbbef33463a6bf4ac0a78226abdd SHA512 87bb2b30710a4159d1b2b87dffd45be772dfaf58218459109c8279da21440ce423cf5ee28fee0281c3b2b9eb433880c0f63177b0b775027b15095c9b6ea99bd0
+DIST rust-1.72.0-s390x-unknown-linux-gnu.tar.xz 197718192 BLAKE2B 465815892d2c4c76978fb3f14fae021f95007f17e3b6937ac64f22432aed808e77eda6081f0918d7fd48e00364099ea147e21dd80ffe93600088d7d1b39ae9fb SHA512 5ba7b7fe39fdf9a542040807283ded3271e37a8576e387c7d5333936623f688192902686027e491a6c5405906102afc0dfd465fd4093956b88942d54e5974e45
+DIST rust-1.72.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cdf0ee76397801ac561e39cddd1eb1ee94454ff52df8e117a35aec010d4534b1ec024e1e1981579924bd976a1a48bc1217c990adb307a2c4fdf618c85801cd0e SHA512 a333a1ecd37aedb9f32365396dcf69e235a3c084bdb34b656929ce38ad78b5a26092ece2b81380efb32544ba578a657615132c02c7f4491855c9ca90d77fb863
+DIST rust-1.72.0-x86_64-unknown-linux-gnu.tar.xz 163402880 BLAKE2B 0f498510f8bbaba4b36e9e1cdc8e1e0482b4f26bc7f42a600b3e3f2294490f230a87d955c4f79c53ce277163660752a39889456d743c74adb2659cde536e09bc SHA512 f02fc82181fe2665aa66ca4948b66abf031c9ca273bb11ba69d1e99bf5bd1707010c4baaa04d8c83e9e97e7bb60440e3562380077903a459f689ef5dbac3ff40
+DIST rust-1.72.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 51083330fef8b0e9f4fafe71e3a08891bec9be8e1c2e64ef37cba463e99c13f44639981c8aae6c86d50c6a23c4846a4f056535dbcbf39a2d9096615862feff87 SHA512 284b74f87e192451ba95cc423089d64334f43da8c221f45acb683a088e7dfd783c488c7ed3fe68619aff4c245271cdcf4b1b8c5f0bef1f8c3d3af0ca13d394c4
+DIST rust-1.72.0-x86_64-unknown-linux-musl.tar.xz 234831716 BLAKE2B 3ee1a5727ad120bcf173dcee3770e342f107777984b06782f5ae588a58e5da94ad4550b00c168ddbe84350605100558bc01e139763b5734cdea32545ee6ee41e SHA512 62d5967669164ce7e8b6815298d79380ca96cce5a6c8a67db84cd3d5fdb6825ba9d2a91d59c2185a93b1c26030ef017c63942dc7a363e742d0abf356bca6f1f5
+DIST rust-1.72.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e04731dd5edfe93d17cb032d772917d49bd46f195738cefe2e685f42b9ba5148d120e8d71c627cae46a665235f14ac0b35aff58498ff92da7edfdc5d6e562773 SHA512 2ed245aa779c594f8d9cbcbf63e7c68165d600408a25288163ceebf78946210a36958a3df80c50b2006e11930e09ecec0eee233ff659a9d2ffc78c1b55d3b0fc
DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec653acaa5eb4b833862d6f0fd4685a8cec097dadc1b8a934e1bf6055672c7a617f9a0ad4a7dbf2e78084297f10b7ada04 SHA512 3d0369ed3028209c4ecb9b9e7b5f5e3a20be8cc05199675df4f091d62a96c0734bc1dbd7630928fe162792392ec6d0daf9ceed10771531ce022200c7b631e3be
DIST rustc-1.65.0-src.tar.xz.asc 801 BLAKE2B 43ff92011cd6f7f34ce0495fa341379e5907d032ea90f91e533e5edaec6ad518aad50a9d8b2694074d6909ee96aa779403b16e95792e962e79c1b967542ae26f SHA512 75b9be53363022c81333117876cbcc573bbd4733edf767cbb164218644efb1a9c4bfc2aa73aaa1e39f248a84f1adacb1930a94a6e63f60093ff760fb9ae02efc
DIST rustc-1.66.1-src.tar.xz 141692940 BLAKE2B 3fae45345998386fda1b11ec896fac4613b8e3f0092bc0df29c9685f4a4012c0bd1b600911c2d19bcfa8f5a84b8a3c39d4c9e062a62cd61925b59129e1cd72b9 SHA512 1944c024c603140d0a9236043a3bd1d0d211dd8d368d6d82a3a620f1ff43b29624755b0943f2b38b40a188c7eee77a840238ea757eaf435e2a3fa6a0e6b82832
diff --git a/dev-lang/rust/files/1.72.0-bump-libc-deps-to-0.2.146.patch b/dev-lang/rust/files/1.72.0-bump-libc-deps-to-0.2.146.patch
new file mode 100644
index 000000000000..bd1c4b589ada
--- /dev/null
+++ b/dev-lang/rust/files/1.72.0-bump-libc-deps-to-0.2.146.patch
@@ -0,0 +1,156 @@
+This patch bumps all libc dependencies and checksums to 0.2.146, which includes the fix for musl 1.2.4.
+
+--- a/vendor/addr2line-0.20.0/Cargo.lock
++++ b/vendor/addr2line-0.20.0/Cargo.lock
+@@ -246,9 +246,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
+
+ [[package]]
+ name = "libc"
+-version = "0.2.141"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "libtest-mimic"
+--- a/vendor/backtrace-0.3.67/Cargo.lock
++++ b/vendor/backtrace-0.3.67/Cargo.lock
+@@ -64,9 +64,9 @@ checksum = "dec7af912d60cdbd3677c1af9352
+
+ [[package]]
+ name = "libc"
+-version = "0.2.138"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "libloading"
+--- a/vendor/bstr/Cargo.lock
++++ b/vendor/bstr/Cargo.lock
+@@ -34,9 +34,9 @@ dependencies = [
+
+ [[package]]
+ name = "libc"
+-version = "0.2.138"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "memchr"
+--- a/vendor/cranelift-jit/Cargo.lock
++++ b/vendor/cranelift-jit/Cargo.lock
+@@ -224,9 +224,9 @@ dependencies = [
+
+ [[package]]
+ name = "libc"
+-version = "0.2.141"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "log"
+--- a/vendor/crossbeam-channel/Cargo.lock
++++ b/vendor/crossbeam-channel/Cargo.lock
+@@ -50,9 +50,9 @@ dependencies = [
+
+ [[package]]
+ name = "libc"
+-version = "0.2.141"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "num_cpus"
+--- a/vendor/elasticlunr-rs/Cargo.lock
++++ b/vendor/elasticlunr-rs/Cargo.lock
+@@ -555,9 +555,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
+
+ [[package]]
+ name = "libc"
+-version = "0.2.140"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "lindera"
+--- a/vendor/handlebars/Cargo.lock
++++ b/vendor/handlebars/Cargo.lock
+@@ -550,9 +550,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
+
+ [[package]]
+ name = "libc"
+-version = "0.2.140"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "lock_api"
+--- a/vendor/icu_locid/Cargo.lock
++++ b/vendor/icu_locid/Cargo.lock
+@@ -318,9 +318,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
+
+ [[package]]
+ name = "libc"
+-version = "0.2.141"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "litemap"
+--- a/vendor/libffi/Cargo.lock
++++ b/vendor/libffi/Cargo.lock
+@@ -10,9 +10,9 @@ checksum = "50d30906286121d95be3d479533b
+
+ [[package]]
+ name = "libc"
+-version = "0.2.140"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "libffi"
+--- a/vendor/terminal_size/Cargo.lock
++++ b/vendor/terminal_size/Cargo.lock
+@@ -47,9 +47,9 @@ dependencies = [
+
+ [[package]]
+ name = "libc"
+-version = "0.2.140"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "linux-raw-sys"
+--- a/vendor/tracing-tree/Cargo.lock
++++ b/vendor/tracing-tree/Cargo.lock
+@@ -100,9 +100,9 @@ checksum = "e2abad23fbc42b3700f2f279844d
+
+ [[package]]
+ name = "libc"
+-version = "0.2.141"
++version = "0.2.146"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
++checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+
+ [[package]]
+ name = "log"
diff --git a/dev-lang/rust/rust-1.72.0.ebuild b/dev-lang/rust/rust-1.72.0-r1.ebuild
similarity index 97%
rename from dev-lang/rust/rust-1.72.0.ebuild
rename to dev-lang/rust/rust-1.72.0-r1.ebuild
index 748a71fd0369..1ccf075cab7b 100644
--- a/dev-lang/rust/rust-1.72.0.ebuild
+++ b/dev-lang/rust/rust-1.72.0-r1.ebuild
@@ -22,7 +22,9 @@ else
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
+# Temporarily set to 1.72.0 since it fixed issues in the stdlib that prevented bootstrapping on musl 1.2.4. Set back to
+# normal in 1.73.0.
+RUST_STAGE0_VERSION="${PV}"
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
@@ -162,6 +164,7 @@ RESTRICT="test"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
PATCHES=(
+ "${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
"${FILESDIR}"/1.67.0-doc-wasm.patch
@@ -169,6 +172,10 @@ PATCHES=(
S="${WORKDIR}/${MY_P}-src"
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
toml_usex() {
usex "${1}" true false
}
@@ -282,6 +289,12 @@ esetup_unwind_hack() {
}
src_prepare() {
+ # Clear vendor checksums for crates that we patched to bump libc.
+ for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ terminal_size tracing-tree; do
+ clear_vendor_checksums "${i}"
+ done
+
if ! use system-bootstrap; then
has_version sys-devel/gcc || esetup_unwind_hack
local rust_stage0_root="${WORKDIR}"/rust-stage0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2023-08-04 12:30 WANG Xuerui
0 siblings, 0 replies; 33+ messages in thread
From: WANG Xuerui @ 2023-08-04 12:30 UTC (permalink / raw
To: gentoo-commits
commit: d7081c418d324fefef6d2e671bd92a84091f989c
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 4 07:19:28 2023 +0000
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Fri Aug 4 12:30:26 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7081c41
dev-lang/rust: add 1.71.1
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
dev-lang/rust/Manifest | 2 +
.../1.71.1-fix-bootstrap-version-comparison.patch | 26 +
dev-lang/rust/rust-1.71.1.ebuild | 747 +++++++++++++++++++++
3 files changed, 775 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 1b61241a7b99..007d6c379685 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -250,3 +250,5 @@ DIST rustc-1.70.0-src.tar.xz 140736896 BLAKE2B f07a800e35dca074df0c76fa91f512ae3
DIST rustc-1.70.0-src.tar.xz.asc 801 BLAKE2B 172744ff679c4554a6992b08a6bdcd65bd133f3db2d7f2eb1fa3659683aeb65228f9c57d101d9d050256217bb4fbbc0ccaf892bfcd8ef69ac742e12e75548c68 SHA512 0b26b176bf957ea5c2465a8da05992907165f11dccfb8f3a8a2c851b20fc9083e8bca80fefee2534d3326e721f41d19ef75b7f49692a342ab7ef5cdb2e8c52a4
DIST rustc-1.71.0-src.tar.xz 151962928 BLAKE2B da8d83cd6621947816630ae487efe7d087266c1352949cedbbd441ba7c7f7c7beb13b9470e66e2f3359c37a050d0e44d22481c418532d3ebb339a456ab092648 SHA512 2c93bafdd248563765a285add48ca77c1e4bad4d5431675ae6a5cdee4cfe7a41e6bcc880a489ca1069a307fd9a005f2d5f8e230dfc95b4a69152b4f9ca49ac44
DIST rustc-1.71.0-src.tar.xz.asc 801 BLAKE2B e5ddc4b18a6caeeb63c5aed5b5d15989d086f408787d2e603e50e7b8548dc078683062627280fd2a0393bec01c314eb1cc59f9b0e3146abf07b8365a0b44c640 SHA512 cb1b208c8b2bfccf02c73c4246fb238edb0dd10e292c1ef781920964e54e40add3089d988769982c0ce06b719014685b1c37daa2d08b513d86ad73808f4ce3ac
+DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4
+DIST rustc-1.71.1-src.tar.xz.asc 801 BLAKE2B a88c073a70552d73e2d7695eceabdaa478f34501b7271fabf7f4a09f3efa545181f34353e45776b05918e6aeba88adb02f9731454f7085a7abf1602fc6589983 SHA512 9dd0406cf22f1daa7fcfd015fc1c6f8d36586aa99bf14c1491ee464c1f892ab759feb83e8b55b64713170fb777fdbe038fb5fd01a59c911b6599223baaba0677
diff --git a/dev-lang/rust/files/1.71.1-fix-bootstrap-version-comparison.patch b/dev-lang/rust/files/1.71.1-fix-bootstrap-version-comparison.patch
new file mode 100644
index 000000000000..8857c4b76580
--- /dev/null
+++ b/dev-lang/rust/files/1.71.1-fix-bootstrap-version-comparison.patch
@@ -0,0 +1,26 @@
+https://github.com/rust-lang/rust/pull/114440
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Thu, 3 Aug 2023 15:05:40 -0700
+Subject: [PATCH] bootstrap: config: fix version comparison bug
+
+Rust requires a previous version of Rust to build, such as the current version, or the
+previous version. However, the version comparison logic did not take patch releases
+into consideration when doing the version comparison for the current branch, e.g.
+Rust 1.71.1 could not be built by Rust 1.71.0 because it is neither an exact version
+match, or the previous version.
+
+Adjust the version comparison logic to tolerate mismatches in the patch version.
+
+Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -2004,7 +2004,8 @@ impl Config {
+ .unwrap();
+ if !(source_version == rustc_version
+ || (source_version.major == rustc_version.major
+- && source_version.minor == rustc_version.minor + 1))
++ && (source_version.minor == rustc_version.minor
++ || source_version.minor == rustc_version.minor + 1)))
+ {
+ let prev_version = format!("{}.{}.x", source_version.major, source_version.minor - 1);
+ eprintln!(
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
new file mode 100644
index 000000000000..1b4f54be32e8
--- /dev/null
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -0,0 +1,747 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 16 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.71.1-fix-bootstrap-version-comparison.patch
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+bootstrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=8192
+ # multiply requirements by 1.3 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+# Is LLVM being linked against libc++?
+is_libcxx_linked() {
+ local code='#include <ciso646>
+#if defined(_LIBCPP_VERSION)
+ HAVE_LIBCXX
+#endif
+'
+ local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
+ [[ ${out} == *HAVE_LIBCXX* ]]
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+esetup_unwind_hack() {
+ # https://bugs.gentoo.org/870280
+ # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
+ # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
+ # the whole idea is for stage0 to bootstrap with fake libgcc_s.
+ # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
+ local fakelib="${T}/fakelib"
+ mkdir -p "${fakelib}" || die
+ # we need both symlinks, one for cargo runtime, other for linker.
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
+ export LD_LIBRARY_PATH="${fakelib}"
+ export RUSTFLAGS+=" -L${fakelib}"
+ # this is a literally magic variable that gets through cargo cache, without it some
+ # crates ignore RUSTFLAGS.
+ # this variable can not contain leading space.
+ export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ has_version sys-devel/gcc || esetup_unwind_hack
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ lto = "$(usex lto fat off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2023-07-20 18:48 Ionen Wolkens
0 siblings, 0 replies; 33+ messages in thread
From: Ionen Wolkens @ 2023-07-20 18:48 UTC (permalink / raw
To: gentoo-commits
commit: 3c8e799b98fd60aa8eac5ecde295d97bb067a8cc
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 20 18:05:04 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Jul 20 18:47:06 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c8e799b
dev-lang/rust: backport lint-docs ld path revert for USE=doc
Seems trivial enough, there may be follow ups needed for
"download-rustc" but we don't use this as far as I can tell.
Closes: https://bugs.gentoo.org/910595
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
dev-lang/rust/files/1.71.0-lint-docs-libpath.patch | 39 ++++++++++++++++++++++
dev-lang/rust/rust-1.71.0.ebuild | 1 +
2 files changed, 40 insertions(+)
diff --git a/dev-lang/rust/files/1.71.0-lint-docs-libpath.patch b/dev-lang/rust/files/1.71.0-lint-docs-libpath.patch
new file mode 100644
index 000000000000..27c673835c7b
--- /dev/null
+++ b/dev-lang/rust/files/1.71.0-lint-docs-libpath.patch
@@ -0,0 +1,39 @@
+https://bugs.gentoo.org/910595
+https://github.com/rust-lang/rust/issues/113678
+
+https://github.com/rust-lang/rust/commit/67b5990472e3cac643d8cf90f45fe42201ddec3c
+From: jyn <github@jyn.dev>
+Date: Mon, 10 Jul 2023 15:59:30 -0500
+Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is
+ enabled"
+
+This was not the correct fix. The problem was two-fold:
+- `download-rustc` didn't respect `llvm.assertions`
+- `rust-dev` was missing a bump to `download-ci-llvm-stamp`
+
+The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
+--- a/src/tools/lint-docs/src/groups.rs
++++ b/src/tools/lint-docs/src/groups.rs
+@@ -39,7 +39,6 @@ impl<'a> LintExtractor<'a> {
+ fn collect_groups(&self) -> Result<LintGroups, Box<dyn Error>> {
+ let mut result = BTreeMap::new();
+ let mut cmd = Command::new(self.rustc_path);
+- cmd.env_remove("LD_LIBRARY_PATH");
+ cmd.arg("-Whelp");
+ let output = cmd.output().map_err(|e| format!("failed to run command {:?}\n{}", cmd, e))?;
+ if !output.status.success() {
+--- a/src/tools/lint-docs/src/lib.rs
++++ b/src/tools/lint-docs/src/lib.rs
+@@ -403,12 +403,6 @@ impl<'a> LintExtractor<'a> {
+ fs::write(&tempfile, source)
+ .map_err(|e| format!("failed to write {}: {}", tempfile.display(), e))?;
+ let mut cmd = Command::new(self.rustc_path);
+- // NOTE: bootstrap sets `LD_LIBRARY_PATH` for building lint-docs itself.
+- // Unfortunately, lint-docs is a bootstrap tool while rustc is built from source,
+- // and sometimes the paths conflict. In particular, when using `download-rustc`,
+- // the LLVM versions can differ between `ci-llvm` and `ci-rustc-sysroot`.
+- // Unset LD_LIBRARY_PATH here so it doesn't interfere with running the compiler.
+- cmd.env_remove("LD_LIBRARY_PATH");
+ if options.contains(&"edition2015") {
+ cmd.arg("--edition=2015");
+ } else {
diff --git a/dev-lang/rust/rust-1.71.0.ebuild b/dev-lang/rust/rust-1.71.0.ebuild
index 63f051219230..0add3729bd1a 100644
--- a/dev-lang/rust/rust-1.71.0.ebuild
+++ b/dev-lang/rust/rust-1.71.0.ebuild
@@ -163,6 +163,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.71.0-fix-bashcomp-installation.patch
+ "${FILESDIR}"/1.71.0-lint-docs-libpath.patch
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
"${FILESDIR}"/1.67.0-doc-wasm.patch
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2023-02-09 20:36 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2023-02-09 20:36 UTC (permalink / raw
To: gentoo-commits
commit: a330ceeccfb336df684cf52d33469b2b69055653
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 9 20:35:28 2023 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Feb 9 20:35:28 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a330ceec
dev-lang/rust: drop 1.67.0
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 2 -
dev-lang/rust/files/1.67.0-bootstrap.patch | 38 --
dev-lang/rust/rust-1.67.0.ebuild | 742 -----------------------------
3 files changed, 782 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 9f1eafd22e3c..a1a5475671c3 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -98,7 +98,5 @@ DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec6
DIST rustc-1.65.0-src.tar.xz.asc 801 BLAKE2B 43ff92011cd6f7f34ce0495fa341379e5907d032ea90f91e533e5edaec6ad518aad50a9d8b2694074d6909ee96aa779403b16e95792e962e79c1b967542ae26f SHA512 75b9be53363022c81333117876cbcc573bbd4733edf767cbb164218644efb1a9c4bfc2aa73aaa1e39f248a84f1adacb1930a94a6e63f60093ff760fb9ae02efc
DIST rustc-1.66.1-src.tar.xz 141692940 BLAKE2B 3fae45345998386fda1b11ec896fac4613b8e3f0092bc0df29c9685f4a4012c0bd1b600911c2d19bcfa8f5a84b8a3c39d4c9e062a62cd61925b59129e1cd72b9 SHA512 1944c024c603140d0a9236043a3bd1d0d211dd8d368d6d82a3a620f1ff43b29624755b0943f2b38b40a188c7eee77a840238ea757eaf435e2a3fa6a0e6b82832
DIST rustc-1.66.1-src.tar.xz.asc 801 BLAKE2B 18e27c88b39eed29147854733c5533b7fffc417ff0b3bd5982174ffa2c5f6d217e2e28ced4da75863a4557800e7ad7a124a4bbb0def4c20da7ed543602185941 SHA512 4511f41ad3d098a339ea3173e3ffa692d1d3cd3ec9dd45af68e4491471f9a72a2e866f6924090eb366bdf6f856650d981eabe1cd851843a17f4a6e4f1dfbc8a9
-DIST rustc-1.67.0-src.tar.xz 142750964 BLAKE2B 5dcea694548f5162bed6020ca12ecfa178fba479fbe6f29ec310f9c5cfaae13999de7b861498e92561f21001fed295d21dd9230ccb5da2f20c638309e785cfda SHA512 6d1ddb54c0ee2c4f8ccf73f3c306c8d8868feb738d5e77eb5a5d25f716395c27d1b3666929c87f9dc84213a9acfdb56254feac92ef0fea3147e2c644391c12b4
-DIST rustc-1.67.0-src.tar.xz.asc 801 BLAKE2B b46159b7cbe081cb34d82b2642397788d09d09f9e55fd961a491862c2c1827b0752530fa74e1a8245cab9ff898d2f021bfdae4820edca34a87c9e18202d7a31e SHA512 cceb0aa5d43c476a051c77263fe152085b8d7d337f78117077a1e460bb9e31b75becd36a8f571fc1275a268ac1107d680012a82a7378851d2a9f16748d95a929
DIST rustc-1.67.1-src.tar.xz 142758844 BLAKE2B 55b2a98592b1a2e465b7fb224607cbcb23cb13d5053b51abbd2e45428794f457b6925955c5c562f577830353e5287929b3588ee78a30036bf0ca13a3610316d9 SHA512 42d77ee93b168ae139b026138fb48d925624ff436a836aa97ee235f870e61ea11643b0cf7ad20bcafda774c6cd3855a4bc10a2e2ed1c4d82c6f15158963b304d
DIST rustc-1.67.1-src.tar.xz.asc 801 BLAKE2B eb507c6f53c592921eb31cccb17c9d6027c67fb1311726f2d25fe7d1f8a1aa051efb99d7207a5e4477df0b75898783437e653fa041ed7daa27e7a7c4263ec230 SHA512 6c962f680d74251b55f77a43d6e383be53bacff8428e0d003bda207de1fea7f716b88f16686d22a88d99518a4834bf299731855fb030477a995d5e1f3d0024f4
diff --git a/dev-lang/rust/files/1.67.0-bootstrap.patch b/dev-lang/rust/files/1.67.0-bootstrap.patch
deleted file mode 100644
index eb160661a2c2..000000000000
--- a/dev-lang/rust/files/1.67.0-bootstrap.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 675fa0b3dd5fe14b43ad5b7862f4528df7322468 Mon Sep 17 00:00:00 2001
-From: Michael Goulet <michael@errs.io>
-Date: Mon, 12 Dec 2022 18:29:33 +0000
-Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20fix=20unsoundness=20in=20bootstr?=
- =?UTF-8?q?ap=20cache=20code?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
----
- src/bootstrap/cache.rs | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/bootstrap/cache.rs b/src/bootstrap/cache.rs
-index be5c9bb078808..05f25af68ea8f 100644
---- a/src/bootstrap/cache.rs
-+++ b/src/bootstrap/cache.rs
-@@ -89,16 +89,16 @@ impl<T: Internable + Hash> Hash for Interned<T> {
-
- impl<T: Internable + Deref> Deref for Interned<T> {
- type Target = T::Target;
-- fn deref(&self) -> &'static Self::Target {
-+ fn deref(&self) -> &Self::Target {
- let l = T::intern_cache().lock().unwrap();
-- unsafe { mem::transmute::<&Self::Target, &'static Self::Target>(l.get(*self)) }
-+ unsafe { mem::transmute::<&Self::Target, &Self::Target>(l.get(*self)) }
- }
- }
-
- impl<T: Internable + AsRef<U>, U: ?Sized> AsRef<U> for Interned<T> {
-- fn as_ref(&self) -> &'static U {
-+ fn as_ref(&self) -> &U {
- let l = T::intern_cache().lock().unwrap();
-- unsafe { mem::transmute::<&U, &'static U>(l.get(*self).as_ref()) }
-+ unsafe { mem::transmute::<&U, &U>(l.get(*self).as_ref()) }
- }
- }
-
diff --git a/dev-lang/rust/rust-1.67.0.ebuild b/dev-lang/rust/rust-1.67.0.ebuild
deleted file mode 100644
index 9cef9622f2b5..000000000000
--- a/dev-lang/rust/rust-1.67.0.ebuild
+++ /dev/null
@@ -1,742 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 15 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
- wasm? ( sys-devel/lld:${_s} )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- system-llvm? (
- ${LLVM_DEPEND}
- llvm-libunwind? ( sys-libs/llvm-libunwind:= )
- )
- !system-llvm? (
- !llvm-libunwind? (
- elibc_musl? ( sys-libs/libunwind:= )
- )
- )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.65.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
- "${FILESDIR}"/1.67.0-bootstrap.patch
- "${FILESDIR}"/1.67.0-doc-wasm.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- has_version sys-devel/gcc || esetup_unwind_hack
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets+=",\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools='"cargo"'
- use clippy && tools+=',"clippy"'
- use miri && tools+=',"miri"'
- use profiler && tools+=',"rust-demangler"'
- use rustfmt && tools+=',"rustfmt"'
- use rust-analyzer && tools+=',"rust-analyzer","analysis"'
- use rust-src && tools+=',"src"'
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if is_libcxx_linked; then
- # https://bugs.gentoo.org/732632
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- [llvm.build-config]
- CMAKE_VERBOSE_MAKEFILE = "ON"
- CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
- CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
- CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
- [build]
- build-stage = 2
- test-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- export CFLAGS_${rust_target//-/_}="${arch_cflags}"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- # but we patch it and set to false here as well
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="\"${RUSTFLAGS}\""
- echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
- echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
- echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- env | grep "CFLAGS_.*"
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
- use rust-analyzer && symlinks+=( rust-analyzer )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- if use rust-analyzer; then
- echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2022-11-13 19:14 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2022-11-13 19:14 UTC (permalink / raw
To: gentoo-commits
commit: 086e806c2bc1ef0e6f2fb37cc9e0a25fab228ca9
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 13 19:12:24 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Nov 13 19:12:24 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=086e806c
dev-lang/rust: drop 1.63.0-r1
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 34 -
.../files/1.61.0-gentoo-musl-target-specs.patch | 166 -----
dev-lang/rust/files/1.63.0-CVE-2022-36113.patch | 48 --
dev-lang/rust/files/1.63.0-CVE-2022-36114.patch | 102 ---
dev-lang/rust/rust-1.63.0-r1.ebuild | 774 ---------------------
5 files changed, 1124 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 91aa11db9f43..25e312b78085 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,35 +1,3 @@
-DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz 228388556 BLAKE2B 2b2d8428c97bfeb64bd999670e4ef2b6c4732cdfd7cac0cf37c5adb8ee83fd467e1e94bcb6a9edf28838fd052d19a7cbc273175c8360696bbec4523e1ff069a6 SHA512 10964fe48ee59ef2e44e9d0a0daa750cd06cc52198664b544166a846667366e7f0000129612f4d68e1530dab28987f62ccacd82f6d5663d0091cf7a451469219
-DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6cf85d71d188bc931cbb21dac1387fa9fb8b45bcf0984bfd5af1a3f1ac581b74e37df337138b05b2d74ed1572d6e859418c33c2fe4bb72f5a3b15cb6302060d4 SHA512 452610627d8d01474ed38b7d3ff7c3c0174cc5b3468cbd0f274b6124ff6497dcae6f0abb6b9688f64be89c524c8fe18aaf5fd56dcd2530df6c247688cac1a230
-DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz 223168712 BLAKE2B 9007a612ed5ec279c346abaeb4213a71d3acae9e5b1934380c9959e74db8b196b59f1197d1714a076040ff68f2b4f0e4937feb226cfaa0bdd272838d67eb07cb SHA512 253ba647102cb5599cfbfbfaf5f77ab2389e4bc77bce6cfd8aba037f6bd349081965d505fc30e9538df9353e923e66fa451ab73076d7224703cab1e24a81cf1f
-DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 54d54528fed34d0325d50a44ea732c99268d0acd2d78fe778dee369e18e9d7f6a8164617715a8c73aae59d2e856ff437343087542d2eeba9e613cd0418e9cf43 SHA512 79a049aad9cf0d50455747bbd2809611ca9d8eb2890c4a0dda71b64842c75cc4503f9f308d6f418e0f207d5cea04d21b352d45c1774a24b9270071d232dfb1d6
-DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz 203832692 BLAKE2B 964278ec2d9375d864cd03f7ec4fae1ca89fceebad51ccc2a017fbdf5ed354bd599d8c3eaf9eb9e86870f3d4b7fae8bb9011ae630742b3cc9e6ed38e14e8eae4 SHA512 d388e752fe7fa67c91719858be9ffc872c2b8fa45f6d63ae18298a79bc242e640784722d82461629bd0f07ce56a7dd850376ca9882bf0a084a5a19b01e5d59f3
-DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 1f24c48e0648f80d7107db921917372bd51ff4b630bd36830d5bb76386b486776311c67854bd4d6366e820003b89ba1a4c8eecbe001f2221c1063661c71ab513 SHA512 f134e874d59bc7979e821f881098f9d91eb81a1c5c68db80d738def722273ecf4957d842c3f0ee9f9b415448477bcd0b022624cea95f99850bd2267dc545423f
-DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz 203946052 BLAKE2B b0e2a8a0068dc758d772f3dbc8003a57fdb43ead64e30bdf338c60b195bb2f78ef7e7a6df6dd2f02f13f47b9e913ab2fc010ce9fc6d39d5014709a71886e7eb6 SHA512 515d16b3ec5e8ec4af24c6baaf4e5443774c2140e5379019f29ce8a63eb1fd908408f42092e0fc0c3dd5e62ac7d43357af13fd74678cd2635451a2d775934386
-DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 661439263a89d2206fbb7c3e00ac42e5975403670953df6be12dbf10e624a3bce0a16a846084aa621284e1d2dbb997af19b0f45808a2ddf7bb65af306a1745ba SHA512 bade26ccb646cc16822ae3235c00d048373f6c38eea79af128e3f299e8a69086fd254b4cd7c602c653d6573232594a27c7f8eb915797b8f1afbf56db3efb5008
-DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz 209318492 BLAKE2B 959488e4a957e19e5fe44e9b2b83406e135d7598cf4fa9db3b132c80cc40a54a73dee3c0b3db6f2f9299adf1b2d80fe453d1f0dab73fe46cacd5fa2ebf45b3ac SHA512 2c447c39f22f1f11f1e58d6adfea440a7d0bb91ffbb60df555b4e3eb41379b586f531a31c3ef86bb5e7a5b46889071f509157dc031fa174d93942d21dd241180
-DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B a1e12a459d62fccd35bbc34d043f8a7512dfe3edb6563f02b84bfdd1e4cdf9c16570302644d71dc208dfe9782f48d4310a13b748d22571d1d43dcf7b61b2819a SHA512 82d2d1eb7ee0f8ba0bfaf93cd2ef0899973f535080af960a2b0f54049285df43e758a9bbe2f0e36e64e85bd530e4511e8ed828ce046c82b74a252b92e7dd42db
-DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz 223720860 BLAKE2B 117364630b38f4a97f9b7183ca7e9f30836ffd0f73c4e3ce2af97ad3c837edc7fa247afba70858009b5ba34bcb7adc87f29b8c87f03f79d060d9bab68b0625ba SHA512 99a87fef7870ee3478ac2faf1ebaec9fde28737ddc2423ec3da4173051f542e24b5666b0e276b3fdd2f02259f16bd119bf79515d057c63da2f6659c0e7ea2fd3
-DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b9b4289aa38ad09d7f5098665a490dfa934676c37385f966d10c978f5320e374976617fb31a5e835661a81edab1ff244c74d8f8f5748954817db8171ed251b0d SHA512 9c44413bf71c416ad08289b4fa0223cb2a5299609ea5c94aff4f0bf7e793a9794155ee0c12a9f19c1c6e20112eb642f22be357d287adcea4e53e0285214c9661
-DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz 161572400 BLAKE2B b1f4b797319574b4e7cfb0d591988444238f3a735466e336b4c13e3af6754d18962f6f282011147c35ea48df375651d4cad3c368042073ff4da35c9ea6ab4855 SHA512 8c3cbb699f1a821889b70c56653380ad2a6d42d2ed444610cad5971230f3cbe5b7e71f1775f21788f0f54dad2f9c2c7eaa81ecde1a319d98ffcdb3701d6ef144
-DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b68152d3a6221cb57d03826055477be0701c6520228ef2c67cf856a4d5bee5854ecc7dfe3e062121ba5d1e82be0eda0691e0d133ba5d644fed78fbf328021a9f SHA512 eedc2ba881ae0e2d709c8f2cb92ad360c091953b48bf77ce5eb1c93e296f0d532e29f9613d21327e8ca388cc5db7d26a8e612300bb3f94195db08d1d40f15909
-DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz 166210748 BLAKE2B d3a612e44132db49ab41eaf822a472f11b24b250ad1c5ca61a85b161d0a892d392d9a4789b42b4f35968887895e964ffbb5dfa69a8205b2ee94baf02cb2ef311 SHA512 f3ea74fad41c197c8af69d65ff6024832ddfeb3c7fd4913b35219b1954fc7b6d3ebc345686043ee3250c17624e133b6c8680272b5b73c38dce1d6c39b763b002
-DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 15806c5684651c2920692d36c733ad8b8a6b8d39e901889457988205e04dd425083bf119053040b73ddba65a44d9330db021a85094d2c84e60c7cd1724d95116 SHA512 46f83dc667361cf4bd10103b1aa990796c1a45ee1af02c142f068fee7aa235c9d982189757184378b2230940134b1462116c09a3c0c043810e077fcf33bac316
-DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz 165275936 BLAKE2B a875ff4675559f9a4b7ff87c271dc4f51112a68c06677b78bbd97f7b4af8f69c75407ef711a9d700ddbf9d85863e24c2f3e27956181bbe00e4afd83220290998 SHA512 9e489cb27b9b8f00e9fd2210b3bf5c1e60ddc83c5fe3d9a381fc4469badda89c02948554d70710d8438333d6629c24282a8a9855241e46ded9c6cf368dce1c2e
-DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 63b7d7487a7dd561a95a175584b798fea1b4157e59b660ec2063724e6ef4ceb7455a1912fb73a88c9315de0d80e6e622ef5c81258b670833e15c421cc3bbc562 SHA512 83420778147112aec58ad81f39f61a13fef97dbae6ff927c55a360588cab56cb58c48c31d19ed6b3b77d73277b044559db6184224d4e4d5bd5371e4cd3f701c2
-DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz 183062288 BLAKE2B c987b07862687203f716494cf5dde444d150628ae021f7a0ed990b47c892b7c247a6f8e790a2a88d49c3abcfe6236b18bbebaf76e0f2720a8c318b8f8e3e5a01 SHA512 d0db86e475fadf2535bc6955abb7b6e397553ad6843ddd369e15c9c35800866f27dcd0515a898a65f7ca868672cf458114320769cd14db258a279cfd3de3c57b
-DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7398231bfc5624f6e7ef8af55405b861fc06fbfbca9159b9c60a1ab27a5bee6551d228958e6f56abfb598c6f24f53d35f510e863176d03639c47703bd8064c7c SHA512 8713ef73a1a9f30f246dc61086993f2f4a8d6f04595401b312c43fc97f667b44126e4b7f176001b68622d452bb74ee460d60ae2e6d44938e02c4da4fcdfc7855
-DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz 191619800 BLAKE2B 276f427d0ceed4926f46081c57f6aba69e3c541d896dbbd0375da0d1f6461840e20ab8b7cbb9dec53b67dfff668e91fc8c68ea70aa3d9f333e2b21ec345a876f SHA512 039d321f90f960276ad06ccdcc2549d2c07335d61b21abcc534b33ff406e130d54dd3d79d471be9588546e30f5e1d4952e33c7890cb2d66eac80436471d3db89
-DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8ca8447d2c69ba58439ed36077882da80696427190761e5dcde99c8957fd476c73fbcc8111ebb3409c86e0a7c315dfbf7f1202204f7755a9ed87eb523bf34e38 SHA512 0f8efdf23aacf435e06854aed7f4366f5fe0f83a9a256d1026b02c2817badbd072a726bce052b0333e8cdc2907fd0e5b81a9cdef617a34e7d963d9d3c4742fb5
-DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz 201394312 BLAKE2B 60bc2fc5beee3f6d0ce695fed0c2148982b6ae3936bbf44fe0ccb97be80e9a2532f20c7234c924f500c4edc3bf82d4ca25b1f1dadc89bb29718c4a9e41bb8894 SHA512 4a8cfcffb7069e2bc4679a8da9acecf12514c512854bb9eef6f3f861e319b0098fd206d743ef7a0f25ef5b65892ad9dcc0adc1bc19525900c3edf5ea5489849e
-DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 55391a58d2ffd6c21b1ff6d77595e424cf269ad44d59f7c2a29d149306563028b402e7393e4d802a47818d7e831455768e86d4f9d882ad0ca70cf216ed72c9db SHA512 c1cf19959de1348ed34448a3f9999ef53324be81d1c99967e4091406463dc0dc28a384f8f04e07e4b54791d1d4a2b1c4aea570503abb0c91c83eafdb5e389243
-DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz 194848260 BLAKE2B 35a283e87bd0d338500ed71d539760cc19a1522875d20f7cdf8cce7ac79fdf993530082e0078a9f12c2df41d3366dec30f5326f9584ab9dd0bc37811bc931e1b SHA512 60a9e4a0ffec3763e6e5f4f9a7f3f52f423b6af86eeb4eddbd5fa00682ec3f6881a6d0be717079f508c1d0ef94f3d794b7da2884ed5b7c88219aabd49bf20662
-DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2cc8e9724e3d0f3af2d5c8e8c9f51f7f5e2d36a9e8cda23bf16fdcce0ecbd1a8965b0fc7b339dc27c779346cfe3f26fe8a2d3e1929431a2190452cbe4a949978 SHA512 587b6ab43a3c0258b0393e13f9f231f086527dd28f7f65fa6f00ac61c974e1d8c0305c2cc154a8a106d506b17f505ec8d8e6e5d39d4512072ab39da680fa1574
-DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz 218505248 BLAKE2B 6f8026b1779527f0dd781843e2f2deb423c2b541711d3e8efb981ea972cd5405568e6ca274e1b78cc6427e038d59e147652da26cedaa83b02f5daa79491db2f3 SHA512 10c99efe46acbe2bdbd27f28cae28d6db223c3cee2abc835d04f7ff1662c8b998d354ae22af9dcf00c078e96cdbb1f01df5f6c9e9c587d3459ea88f9acf37267
-DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7053c6f041695ad7b9c5ea304a0d71b9b17c5737b7d7082ef2de6e52dc52bc18c170c3fe7e7a658823abc5f80ab775b544dd2b2b3e27690bd8209357945b0f04 SHA512 8bc1d64180f55b0ed93fd506bc193a51e4519a66ed8d6f4e331395bcdb8584171d81397d594460952d7983129aa08e278ee15a584571d404f2f6a304d1d7241d
-DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz 153662720 BLAKE2B ff19ebb8a0607b5a3a29b2676dc12466e0c9969f6ac31a588a5dff2d3c10ade70e705873e2606ed84efeaeeb87b8afe6c88285edbdd2bf1a8433f24c48009c21 SHA512 b329dc015dc70ceae0a3b9b8d8e674fb443769bf82f88ed06ca306cedaa52e26756a2491c92315e51b63d4272c0a1f43b2150d5636101814f6e2b59772f1f048
-DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a1602b9cfbdf1b66c479f13b7171cb445068b5f18eae620435b25c3ab1e762e41977e31f02158d259acf16b0c8cdf895af16d6f68904939333b030f21b6c7a01 SHA512 2d79af9fca5a7e19448aeefd330fcc436c3ecb8e617662f144b12303ef2a214a3ae3ec4d9a42f68a4d0d6e343b81b495deddf3df23031aacfbead0c97b083174
-DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz 254266584 BLAKE2B f566cdc94726532c50726ccf081eb2b825e52a56c74eb9d9e846f9933dafedef0a8a1b7c485938f96ae9945706192218cc318750738596923329bc23ef770ce1 SHA512 9cd01f0539db8cd344e9dd39fc5ffcd5b65c9c8c95ed692b9f7c23bc19c970c9f0056f8c8bb61813f1402143177a5b1c20bf844e64af8cf0be110e17e30aa4af
-DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 46f38806b5a6b67953c607d4a3074a9177e14245e746771d876530c398ea98019e534a22a099c087ea2386124cc952f0a488e45f8175922b19b42441d6607938 SHA512 bc30af1e75cbfc8b488782af26d91ccee6e3b3220913af8d2ca3fc6beb5790bd81e3348f8da5c0c542bd13ab6c4cee77f50f4ba0d48e9600620034acc2dafe15
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz 230083616 BLAKE2B 2b66b809d53cc971c9cd44435c10c4bf0faa20dcc3782b47955d0fac252c370c670f0adb59f51b6842b46277d584c5fd44b94202e57aed078480f5cb6952d815 SHA512 c9f7b885008c58f7aac0edd5b6cd0295d768215e2b26cb1f590206248d468fa78409f42f48d505080ee14e2a59dd887cfc564db5a41e91ed36d738a90961f89e
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a323669f0587c9785c587ac0eac72915e421a61d2b5252c2dcc7f637176d5d425fc8cbcfa6ef848fd0d7acfa17cd430e4d42e8c03729c563dda59aa13e6d5c5b SHA512 be2e1eff9228576b66e0a0434e1edbb4525d0ef66743082afef1ef55565e312e63fed7274d01298128fda0c7ab63827d5aed90f50e184582781a4e10ee311de1
DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz 224541836 BLAKE2B b32b7886ddc5da3af0c6e394ecb167288897b2c44b0108e33aeabb3842ff563c769e635413b092a36246bbcf137d692e94c6ce66cccad34c7e728c4cf4af7bc2 SHA512 e462c8b94defc5ac5dfe923c3a6273c3d414cf576840d46a680a4f333bc34fea874c4ec4363c4e1891a6fe95087bf4a68bba7f316bfed9db6313be989afd7428
@@ -94,8 +62,6 @@ DIST rust-1.64.0-x86_64-unknown-linux-gnu.tar.xz 161922032 BLAKE2B e8a0d13deab59
DIST rust-1.64.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d13ab08a8ce4b9a92c60ab5b8c21087158b66d9a673b7a960103757a2b12216cab8e7713cda08753a5f5f921aa9c7d571da77a90166d6e7362549a49d6c1a501 SHA512 fda5b45652c0929fea19146dd2c5a895ae4c6db9a1bf448a7364899854ffa06a8eb52b35bfe28c8acdfb1633cd8afe6c5eabd622b7887ed267b1b72220ef4e6f
DIST rust-1.64.0-x86_64-unknown-linux-musl.tar.xz 265843112 BLAKE2B 2b267b5b9aae610734759a690e36600eeeedab7e0b679e651df269d7b71b147984c1d16cab4658076f05a8a854afc74d83e6e61dac3a8a6bf2b56660d3483285 SHA512 c722ddb6a7bfc5b8767e2a37e697f625b4e775582423720d1b01737ec3269c82e2212f7e5a672a062fa49c8c15c0d2d182ea14dd048cfd9e07704cbc04fd8ef0
DIST rust-1.64.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 783791aca41910e8074fd1c7f29e6fc1fdf51f80b1515bac99431305dbe6085574b2b2366c087675b6a9d98931a0cff1117cd864f634fdb4dd53792aab8ce5f9 SHA512 a6d0a72e9edbbc1e6caef7a9c0ec46518b95172afa4a33b2258286458d7b9afe72f9de8411a83567520a126b8377777e125cc639bac197a0495f17120fbcc1ad
-DIST rustc-1.63.0-src.tar.xz 136597192 BLAKE2B 52eb64ee11e7d9724a4c2654f7eea13521959ac5e04a4925eed5c89ec3661a7827146d6f9a9d05c98466bd4b74393af7bb18d9f418c785924f559833434dfe38 SHA512 0dd3cd1546bd9c1438afe0c4694e1ed80507f6b437674682c0474e13f83457e9ced4560ddeee58602e01837140f9e34a9e24c6828643dd6f613e07755af6997c
-DIST rustc-1.63.0-src.tar.xz.asc 801 BLAKE2B b6c133768e368a7aeb0a4612a4c824d13f91ccdca6660feb5774ed6d79537084020780532c882ae3c9e4b6be3d36ceb0652eb134a580293ba8d8be74c4ba3c6e SHA512 f8807d46b9a3ca2a15a60f8062d63b3ee6e3210657cc752c948b3c7aa1626ec63cbd57529d010ad33f07ac47cf70dbf2cb50f200587338f77c631fc9e6786b17
DIST rustc-1.64.0-src.tar.xz 137841332 BLAKE2B 8acd9e0a4632ba2114018a5cd3f2d544324c601c246658f60a9e0be513c40375434d0a416f0bfd4d24493eae3fec7c9f5bb52d008c88cde14de503a3b6873dd1 SHA512 919f40acd8c6eaaef399aa3248503bea19feb96697ab221aaede9ee789ce340b47cb899d1e0e41a31e5d7756653968a10d2faaa4aee83294c9f1243949b43516
DIST rustc-1.64.0-src.tar.xz.asc 801 BLAKE2B 69f7bd7600d99794859c6fad4b44f0e98868e4e16041d6fe81d9d09a8435c75abac67a735adb0b81a2d9f85651841d404bc1ef4cd64fccd75e8a25d6d95729d0 SHA512 a831e3941849add1082c5b47b619ea87405b875d6eeb90a35f42742a511d124c29503debd17dcc8c6aa9e03a754ab51c3a15e99192bdd0dd1b8a59af9b6eb0b8
DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec653acaa5eb4b833862d6f0fd4685a8cec097dadc1b8a934e1bf6055672c7a617f9a0ad4a7dbf2e78084297f10b7ada04 SHA512 3d0369ed3028209c4ecb9b9e7b5f5e3a20be8cc05199675df4f091d62a96c0734bc1dbd7630928fe162792392ec6d0daf9ceed10771531ce022200c7b631e3be
diff --git a/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch b/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
deleted file mode 100644
index 970148124365..000000000000
--- a/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From 331c3839ebb0099101e1d2f88205ea42f4e3b319 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Tue, 24 May 2022 12:03:20 -0700
-Subject: [PATCH] add gentoo musl target specs
-
----
- .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +
- .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +
- .../src/spec/i686_gentoo_linux_musl.rs | 11 +
- compiler/rustc_target/src/spec/mod.rs | 8 +
- compiler/rustc_target/src/spec/mod.rs.orig | 2465 +++++++++++++++++
- .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +
- .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +
- .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +
- .../src/spec/x86_64_gentoo_linux_musl.rs | 11 +
- 9 files changed, 2550 insertions(+)
- create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
- create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/mod.rs.orig
- create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-
-diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..ca5f28f
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::aarch64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "aarch64-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-new file mode 100644
-index 0000000..24b3b30
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target();
-+
-+ base.llvm_target = "armv7-gentoo-linux-musleabihf".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..cab0923
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::i686_unknown_linux_musl::target();
-+
-+ base.llvm_target = "i686-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712..34b923b 100644
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -808,6 +808,14 @@ macro_rules! supported_targets {
- }
-
- supported_targets! {
-+ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
-+ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf),
-+ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
-+ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
-+ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
-+ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl),
-+ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
-+
- ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
- ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
- ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
-diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..b188a7c
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..395f603
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64le_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64le-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..cb3121d
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..2fcdb66
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::x86_64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "x86_64-gentoo-linux-musl".into();
-+ base.options.vendor = "gentoo".into();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
---
-2.35.1
-
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
deleted file mode 100644
index a87687dce387..000000000000
--- a/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 97b80919e404b0768ea31ae329c3b4da54bed05a Mon Sep 17 00:00:00 2001
-From: Josh Triplett <josh@joshtriplett.org>
-Date: Thu, 18 Aug 2022 17:17:19 +0200
-Subject: [PATCH] CVE-2022-36113: avoid unpacking .cargo-ok from the crate
-
----
- src/cargo/sources/registry/mod.rs | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
-
-diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-index c17b822fd0..a2863bf78a 100644
---- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
-+++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-@@ -639,6 +639,13 @@ impl<'cfg> RegistrySource<'cfg> {
- prefix
- )
- }
-+ // Prevent unpacking the lockfile from the crate itself.
-+ if entry_path
-+ .file_name()
-+ .map_or(false, |p| p == PACKAGE_SOURCE_LOCK)
-+ {
-+ continue;
-+ }
- // Unpacking failed
- let mut result = entry.unpack_in(parent).map_err(anyhow::Error::from);
- if cfg!(windows) && restricted_names::is_windows_reserved_path(&entry_path) {
-@@ -654,16 +661,14 @@ impl<'cfg> RegistrySource<'cfg> {
- .with_context(|| format!("failed to unpack entry at `{}`", entry_path.display()))?;
- }
-
-- // The lock file is created after unpacking so we overwrite a lock file
-- // which may have been extracted from the package.
-+ // Now that we've finished unpacking, create and write to the lock file to indicate that
-+ // unpacking was successful.
- let mut ok = OpenOptions::new()
-- .create(true)
-+ .create_new(true)
- .read(true)
- .write(true)
- .open(&path)
- .with_context(|| format!("failed to open `{}`", path.display()))?;
--
-- // Write to the lock file to indicate that unpacking was successful.
- write!(ok, "ok")?;
-
- Ok(unpack_dir.to_path_buf())
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
deleted file mode 100644
index 1afbaa94138c..000000000000
--- a/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From d1f9553c825f6d7481453be8d58d0e7f117988a7 Mon Sep 17 00:00:00 2001
-From: Josh Triplett <josh@joshtriplett.org>
-Date: Thu, 18 Aug 2022 17:45:45 +0200
-Subject: [PATCH] CVE-2022-36114: limit the maximum unpacked size of a crate to
- 512MB
-
-This gives users of custom registries the same protections, using the
-same size limit that crates.io uses.
-
-`LimitErrorReader` code copied from crates.io.
----
- src/cargo/sources/registry/mod.rs | 6 +++++-
- src/cargo/util/io.rs | 27 +++++++++++++++++++++++++++
- src/cargo/util/mod.rs | 2 ++
- 3 files changed, 34 insertions(+), 1 deletion(-)
- create mode 100644 src/cargo/util/io.rs
-gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
-
-diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-index a2863bf78a..c9c414e500 100644
---- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
-+++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
-@@ -182,7 +182,9 @@ use crate::util::hex;
- use crate::util::interning::InternedString;
- use crate::util::into_url::IntoUrl;
- use crate::util::network::PollExt;
--use crate::util::{restricted_names, CargoResult, Config, Filesystem, OptVersionReq};
-+use crate::util::{
-+ restricted_names, CargoResult, Config, Filesystem, LimitErrorReader, OptVersionReq,
-+};
-
- const PACKAGE_SOURCE_LOCK: &str = ".cargo-ok";
- pub const CRATES_IO_INDEX: &str = "https://github.com/rust-lang/crates.io-index";
-@@ -194,6 +196,7 @@ const VERSION_TEMPLATE: &str = "{version}";
- const PREFIX_TEMPLATE: &str = "{prefix}";
- const LOWER_PREFIX_TEMPLATE: &str = "{lowerprefix}";
- const CHECKSUM_TEMPLATE: &str = "{sha256-checksum}";
-+const MAX_UNPACK_SIZE: u64 = 512 * 1024 * 1024;
-
- /// A "source" for a local (see `local::LocalRegistry`) or remote (see
- /// `remote::RemoteRegistry`) registry.
-@@ -615,6 +618,7 @@ impl<'cfg> RegistrySource<'cfg> {
- }
- }
- let gz = GzDecoder::new(tarball);
-+ let gz = LimitErrorReader::new(gz, MAX_UNPACK_SIZE);
- let mut tar = Archive::new(gz);
- let prefix = unpack_dir.file_name().unwrap();
- let parent = unpack_dir.parent().unwrap();
-diff --git a/src/tools/cargo/src/cargo/util/io.rs b/src/tools/cargo/src/cargo/util/io.rs
-new file mode 100644
-index 0000000000..f62672db03
---- /dev/null
-+++ b/src/tools/cargo/src/cargo/util/io.rs
-@@ -0,0 +1,27 @@
-+use std::io::{self, Read, Take};
-+
-+#[derive(Debug)]
-+pub struct LimitErrorReader<R> {
-+ inner: Take<R>,
-+}
-+
-+impl<R: Read> LimitErrorReader<R> {
-+ pub fn new(r: R, limit: u64) -> LimitErrorReader<R> {
-+ LimitErrorReader {
-+ inner: r.take(limit),
-+ }
-+ }
-+}
-+
-+impl<R: Read> Read for LimitErrorReader<R> {
-+ fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-+ match self.inner.read(buf) {
-+ Ok(0) if self.inner.limit() == 0 => Err(io::Error::new(
-+ io::ErrorKind::Other,
-+ "maximum limit reached when reading",
-+ )),
-+ e => e,
-+ }
-+ }
-+}
-+
-diff --git a/src/tools/cargo/src/cargo/util/mod.rs b/src/tools/cargo/src/cargo/util/mod.rs
-index 28f685c209..47bbf37aad 100644
---- a/src/tools/cargo/src/cargo/util/mod.rs
-+++ b/src/tools/cargo/src/cargo/util/mod.rs
-@@ -14,6 +14,7 @@ pub use self::hasher::StableHasher;
- pub use self::hex::{hash_u64, short_hash, to_hex};
- pub use self::into_url::IntoUrl;
- pub use self::into_url_with_base::IntoUrlWithBase;
-+pub(crate) use self::io::LimitErrorReader;
- pub use self::lev_distance::{closest, closest_msg, lev_distance};
- pub use self::lockserver::{LockServer, LockServerClient, LockServerStarted};
- pub use self::progress::{Progress, ProgressStyle};
-@@ -44,6 +45,7 @@ pub mod important_paths;
- pub mod interning;
- pub mod into_url;
- mod into_url_with_base;
-+mod io;
- pub mod job;
- pub mod lev_distance;
- mod lockserver;
diff --git a/dev-lang/rust/rust-1.63.0-r1.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
deleted file mode 100644
index 3b832d98e84e..000000000000
--- a/dev-lang/rust/rust-1.63.0-r1.ebuild
+++ /dev/null
@@ -1,774 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~riscv"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 14 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- system-llvm? (
- ${LLVM_DEPEND}
- llvm-libunwind? ( sys-libs/llvm-libunwind:= )
- )
- !system-llvm? (
- !llvm-libunwind? (
- elibc_musl? ( sys-libs/libunwind:= )
- )
- )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
- "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
- "${FILESDIR}"/1.63.0-CVE-2022-36113.patch
- "${FILESDIR}"/1.63.0-CVE-2022-36114.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- has_version sys-devel/gcc || esetup_unwind_hack
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use profiler; then
- tools="\"rust-demangler\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if is_libcxx_linked; then
- # https://bugs.gentoo.org/732632
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- [llvm.build-config]
- CMAKE_VERBOSE_MAKEFILE = "ON"
- CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
- CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
- CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
- _EOF_
- # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- # but we patch it and set to false here as well
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="\"${RUSTFLAGS}\""
- echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
- echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
- echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2022-10-20 18:19 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2022-10-20 18:19 UTC (permalink / raw
To: gentoo-commits
commit: ff2e00c46b3381e09b540905f8f1ccc76d8f4454
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 20 17:25:26 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Oct 20 18:15:20 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff2e00c4
dev-lang/rust: re-add 1.63.0-r1 for riscv only
This partially reverts commit 53f2e771432ee61187a0154f96250372f92d7712.
Issue: https://github.com/rust-lang/rust/issues/102155
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 68 ++
.../files/1.61.0-gentoo-musl-target-specs.patch | 166 +++++
dev-lang/rust/files/1.63.0-CVE-2022-36113.patch | 48 ++
dev-lang/rust/files/1.63.0-CVE-2022-36114.patch | 102 +++
dev-lang/rust/rust-1.63.0-r1.ebuild | 774 +++++++++++++++++++++
5 files changed, 1158 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 6e85f6547c59..a81fde9ae574 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,3 +1,67 @@
+DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz 226403096 BLAKE2B b9927e6d364fe791bef49cea5f0904629a2f01e6a71325c1769c67b845725ae6f54a1a8c0530fa5048591dd0ecfd50a40224243f935b38ad269e35ce2e1c59d9 SHA512 1c00830f67b75eaf23ab759e8218fca48e424cad0ede02e737e341d105f6f8b8113e4d4181cde1b43f9369af9c2f238fbdcac27ccad3dd02db878e2f4e6ba35b
+DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 697df0294d01a19eca2f9b7597df3826e79ea790766c5c5a7b73f5a04919cf64f1489f34c9d2c397523432243e7f3f29f42440ba9aee127753868529196810cf SHA512 78cbc7eeb552965a1b6c4cfc9c8404017fe195acefbda1aa203d1c2ba969b3ac28388930bb4f3ca5dda7ecac5e61163ae0a5d06967eab9f0a7cada87c6b2dc58
+DIST rust-1.61.0-aarch64-unknown-linux-musl.tar.xz 220966060 BLAKE2B e03c6418fed773d1028363979726648d1ffa0e04d6879688efefc15f95fbeff3ff9c0dc7c16a53fedb18c4e0b16e060cee9f3566b0f96027e5dc68820fda149f SHA512 e806f78ecc9edd12bb991533c6bfc95da30c8eaacbfc54f0f4dbf3a95a011da82fca13cf3ef23594a9d1d9d8c79c8186fe98b60658a2cd5c0ed2c6e3984468d0
+DIST rust-1.61.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 426c4c8dac07269d184f61bf2447957cdbdacafdf27fac5ab5a0eea958e15fb3eeed0753dadb1d1bb157322ca5e8c6b7c10d946c4bd3a089ccd8275d0a310014 SHA512 b231afc0c3604aba64277c4f018f1f4b30417bd2fd113919b8b584d5482523b961071a50394a4906d8ba8536685fcff4710b51fee7832a7a041dcb902f1c5ff1
+DIST rust-1.61.0-arm-unknown-linux-gnueabi.tar.xz 200226676 BLAKE2B c55c36524249eaf9ab1e040b6742e1ada46b32bf0511338d23536663050b46103b1765aeb2a145be9cdc0b602d83526fe902fc431e0793d1a307ab0d4b61a356 SHA512 3a9f52b9f4f2a972477a48b629b8345f151d32d491be0cbf3692b76f05ddbd3319de1da7b10959d37fffc08e12b3196a6f4462cc2476ad80d2f9750e0b189cad
+DIST rust-1.61.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 34f251ee19ace45c411f161b383dcda35b8dea62e135cdeceddd73ca029920b0f0ea0484fb79c9680d9b4403c5c01d76d4fd2fb47fd65a2fbcb0375e56a1586b SHA512 641ce73107609d55f98ae00a03a9efd58985539e46a834ceffe5af79822309a40a4eac59e5cec3b1654da733f463f3bca438f42ecbaf5fce5d276466317a7e54
+DIST rust-1.61.0-arm-unknown-linux-gnueabihf.tar.xz 200078864 BLAKE2B 02403c024bf02b9ec42fd0baf52856fbcce2a10477d19e68e4ad06110aaabb90496543fc3de5f385428396979fbb80cdb27f28b4cef8af9266c18fa87a995c30 SHA512 155b2f0c341280bfb7db066b639dc50580a07b21ad6f9f6255a8645d5d944d58fbaff505f1de0c3f51ed92ca0d4dc75d9b92e2aab7e8b64f8c42d3af0a714fe6
+DIST rust-1.61.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 6b4875ac242f11f47518f17a0a039539e56cf3cef78f1e3cb4bc2174e60d6d0f0d444b4c0cfa007643202b5ce92a4cb979e92b5f6f559eb90fd78fdd5f870e57 SHA512 f2618ba9f076c10d0ddd23129e6e8e7050fd1126d7767c8b74c53be209ca87f9bebbc09069f6aed55e14de64b1478fd93b370be7e60858b5226fcfc1e8ed87c0
+DIST rust-1.61.0-armv7-unknown-linux-gnueabihf.tar.xz 206757912 BLAKE2B c702e17e225becc681713a3e819cc38c727377d280a1963efd4e6b1d27e0dbbb71ad0bec4d7add8319417846cf54bb7b5901af0f633b180ca9a5f169c709e43a SHA512 88dbb7a35a8424e5b197566515c21122c1da71df146abb304d7dbb50380b4771a741910abefc9d79831146b28b657ffe53cae07f0392e83a7279a7795aadf0e6
+DIST rust-1.61.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f4b93feba557d81638ead6c3ad72f2e5c321c1103b473096e312d8a3191e98aac65aff0ebcb6f2c23701de17f2602ba18a6462c24a678c2bc2a13e1003189271 SHA512 72d8152d206c1ca9d69ed4704b8638c32b5f136ad985fd4790961935f1b44f08df0960e03066de2dd1cc9f7a140e8070f0a6e671f59c751506847d9e247c5ecd
+DIST rust-1.61.0-i686-unknown-linux-gnu.tar.xz 218220208 BLAKE2B da47b131676258747e27704e2a1abb844567e2ac9ccffdd1c87edaa677e04b1fe73227f7b6afa437d8fe2f2690352623343b8318906038206b5b684fa8eafcc7 SHA512 f19e1a5253c57d250d4de7f0f54b70a296d92bba2e22d8b842bcbb311e393e3bf24c28621f490584497c586c6fdbc41f5af55d86a074b93efaa62d313121cc4a
+DIST rust-1.61.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3b154ab9d414ec6d7dea13c6b2d2def9613544b3d8f6464385fa390bb6228d73826032ed6e536a9a2dd379499ec500788b149c838d5ad1a50f545a47b19a2cbd SHA512 f06ab7e865bf56c153586e146438079ff3ee3de86c610e463cd0ce67c090349b9dd4fa587d9eab0dea4b908770bca0dab955f797ebcc5aee2617a981ff23eb23
+DIST rust-1.61.0-mips-unknown-linux-gnu.tar.xz 157918296 BLAKE2B 0551ab0898491129828be9cd7d6fd22a56c329f85ae9767c8ca216cac16ae3f93d30913c50c8cea8daa2f98878147e2f15f587e38e9e0fca7c8c4b6d3ead6870 SHA512 02cf5d1ed8c28bd52b7c27ba696de30ee23322ddd1e2ef953cd95a6d0b31c63ea66071bfb22c4d11a780243e62e21407d7ada2592b08caac67d7d79e7d9ee0f2
+DIST rust-1.61.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2d050374431b8d48b6a0a3e171d4d2f62cfd8a2df70ddbf0d374bb9351e684d15d3ade7f6717e6abba1de47c4899f0f7575a4ca537d1a39a57e03ea4b0ae281e SHA512 6e2d01d3b8218cae46008328226286abe3f4323891ab41129f9af94b4526d5b21700fa84c880b4efe38d39c57b2a0946eb82e3ac58950761b20f4def1d8b82f2
+DIST rust-1.61.0-mips64-unknown-linux-gnuabi64.tar.xz 162321252 BLAKE2B d49ec8d3a5eec2085a26b4da22a31e5631e3665333a030e4683446cfe3f71e86e466b827942d6a62d32f469ff7fe9208aa51ba9d47822a54d40d89bef45636e5 SHA512 1e6003127963b836c343ae06586b152b1f227529d05b555aefa0bd7d4b92124215cfa1038aba1236c0c42ecd8e429253db4faa13ed388c16a8659e71b0008fe7
+DIST rust-1.61.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B b031019589b12cdf45f0a938c7479ad219c257643b88108d0c524088530df783338d64c1b356055e34a38df8908653c25fc286949826bb7e3539d63c78c36a66 SHA512 ee9178251f5a79803871fa76a22395e4b43958582930f92cf1f5e76970c1583f9b0403da7c05bd8a7cdd83839b319a6640adcaaa5475e9ab5bffb43146116b09
+DIST rust-1.61.0-mipsel-unknown-linux-gnu.tar.xz 162148648 BLAKE2B 492e0c811c9fae9d0052fcdfffe6d96d43674e1775edaf31d63024e56763d44c02763fd70e768ac0987d260665b86d78aa55a0652f5acbf097a3e9a472aa4d9f SHA512 637b081d8357d46030ca206c8feb54a38d9696a0bdbbad9a892ee4a472f29976c82b814f14cc987ad9e473e70d22347e7e01e81f0f59e82dbaad62153c1ec32f
+DIST rust-1.61.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9323f7488fdf603e81018c4b6afa11da952eb6051e9480fee027326ebccd15befed97c75c981f621d7eda3daf2d082c5fb12af426e48cb4c0c733ab55c46af6e SHA512 9d1e6062c4a7714aa754ea586f9bbe3a988e5e6d1e6309316bde89fa83ccddb837e96a8de13fbd4b932c8fc37be89de06802f12f689e17b1ae6cd97b5e2db561
+DIST rust-1.61.0-powerpc-unknown-linux-gnu.tar.xz 180802408 BLAKE2B 41ecab76e35d9ee2b9658730f46ece4191e706714b3b90b6021b4bd9ed2c4f0d563e0c0b39bdc7e633237d55c5375379565d7932e7ffb4896851831f64f61559 SHA512 ed19698f32c1af73ba8c402395b6ee30381d1fff6026d2c94e45ad89ef197cffc1529dc21402e2b463deb47aba0ed4d63d69c62908cdc099da463835757f3fe3
+DIST rust-1.61.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 438143b3474d0cb9e1a19b93de28544f02672e245bba7855da286fb15c58db93021e44d432fbe4a0949592b57cb23b373abd5c0a3f960f6975a0cf433352462e SHA512 7a570c64a79adf78c8c28342d9ab39e8ed953cd44b8038e03beb888b5611625bae95e88220c9c88236ff1672f20ad61976d116da7689cf29f53112deb9b75858
+DIST rust-1.61.0-powerpc64-unknown-linux-gnu.tar.xz 187335836 BLAKE2B 6feca68e47f7e19355ba623cda1d1cd15351017d388d94e2b9d6821493b8a77a09c95148a8fcf7124e3b0c9a9ee205c9f5c14af04172e2d02ea239355755b364 SHA512 b8afcb47653877dd47a808b4aecd95bca715a96311652e0616125e75bc5a457364b0caba2918e2e3e8df2d1fe0afb6fb384bbfa44fde25ebe0dd368414984acb
+DIST rust-1.61.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 20bc76dea5484d2a6bf60ffdacc1dacb8d3f7abdb428fee3b1d3e6e19d499f18afbe667a5de96a28005661bd0b4f5e4c8429df917a31b86d72b9aaa9ec56c7e0 SHA512 cf10c0f1ca50894deba5f02a4e3491fe61ea8def4b0f76fe790eb52ff66295d2570ae50acea66a51e710822d6109a2ab3c8f1e703388ae0ee19fcfc5657d4f38
+DIST rust-1.61.0-powerpc64le-unknown-linux-gnu.tar.xz 196945316 BLAKE2B 23ac372f7bbeac3eb757adcb6ca93187ad01492992327533452ab348ec899cb97f5ac9335b32039a62ccf4c34125de3c4b6c1d7829839c95f638b6531be59c57 SHA512 6cf969cef60d2b70db17902ceb71d2616de0df1ff4fda15578347372bf5a349fc8f4377eb1d003abb84a93a122ab0e54aac52c95568813148d3c0113d663a07f
+DIST rust-1.61.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b4bdcba7c5b681512b98b39f8035788f612ee1c8f44d98d58f8a29bc71e470d57ae587a6ea2e02a22263d40bb452054d03483a3922db6c131d3947e65da23bb SHA512 cd102d958ad3ca62f534033473664e867892dce0ca8a2f96271ecfabe34e0afbd63d8281086c5cd692fdb961894313e7430ce2e1d14c3a686b40d8a514c124e3
+DIST rust-1.61.0-riscv64gc-unknown-linux-gnu.tar.xz 190408604 BLAKE2B 1f37d88201f0e3517194d810f99ce3167fa132c72f8580704750b926b838956157b1ccd303ccf5de15615733383d1009cc135ede7dd8dc7c1e39b4246a8ed604 SHA512 8f6f469484ff9c10af2b1a822a8193f313ac244783921c68dc1feee4d6897e7083cfb90d19384a266d41b97aeb845ef073ed955fb7beaf7e1810d682185c2d42
+DIST rust-1.61.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c413b2f55e3d45dbfccf193f5cb9f6866abf895d23c850e3744a0bd897c2c812f57457211efaab7416c0d8fc079cc4feaa35de879ad76356a961e704e711be46 SHA512 0155b4e0ba86cc190b85f2f82e8ee75c14825e52e05ab3446283512f0b42f113d85ef89d72e0929382637dc0a44ef72f06552957285463c2edd7f83d9c8234ff
+DIST rust-1.61.0-s390x-unknown-linux-gnu.tar.xz 214196912 BLAKE2B 31eeaabdbca2fa837610179eafd0cb6cde2ce8d4feb57e86cd1fc8962e1f8b84bf067d7782414380616d5b56fef5db19c91c54c89f5dd935debf6ed2d3841466 SHA512 7de0ea08c4834e60d12098d92d4366689c0b959f58667bc68e35ad3c976011e8d9375566cebd9260933e13bd74105d297dabf40a0d09b34f83905d4cb9995f7f
+DIST rust-1.61.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 617bfd93b883cc36c8504ac326813511bee205a508489be168060863d967efe9a2e8276c3834d872f419317047ba83624c996be9d6f913be58f9feab66f292b2 SHA512 933689de3c1fabc31dd1910844479b3505e1a8b8474fdaeb4936df118a6da4f9597c45f0a0056d5c1efc33ae8ffb2910f5aa07b91afbd231ad7c20f0c79ceeb4
+DIST rust-1.61.0-x86_64-unknown-linux-gnu.tar.xz 157592468 BLAKE2B 0877c0794280a5ab7e74553c02cebad67e36148a3f34a709973310d89d7ea65dc8ecfa8b9c461e4f96939ed2ff09b7bacbef0b4fcf409758a0429bc431f87ebe SHA512 365191453f37775cf8bed66e12224294d4d99f3bacc635c3c13f05bf8585838a04b602c2fef7964f26a6cc35ab432a5c0a9745e9ffad0a83b0c761ec02de3484
+DIST rust-1.61.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5296a8df210a4cf2fd7dffcba1ae6bd8cda9e408ff4c55d997199c2890b9faab9e8d6d22a3c0961786bb80231836047929621edf9043d474b352fe28bd9192e8 SHA512 cb97e84cd793aa8676c41297d8da14125855c008815e65d8191868eb88241ccb408c6f9ae85b7ba8de1a02ea8923f5e042f4fea662fa593e5ec03505b41ee52d
+DIST rust-1.61.0-x86_64-unknown-linux-musl.tar.xz 259724324 BLAKE2B d005bd2794d196136c42842fbb7bc64d827898b5713f768cf0e88be5a40e3906139027ee58571cfccd8d2c864f672d1986da28c72f0d1c4a7f78d18efe14385e SHA512 96d09ac3a48bb2956dd6bf219e605c68327a94d09e72290ee74781c4886dce93b217163fb08dac0ce69bfaa2e3ab8cccd4a26d10b9df4c3162822a38e355bdb6
+DIST rust-1.61.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e1c8061c80cd5445f7df9c44044ccb47731704b93d4e86cf95bd3b1b08a3c3cdb61e21349088cd0127632c63a0f7c22f0fa209809450dd81607bf7353d61a7b4 SHA512 587f487a3c8159a4b102f15a484a0ffa4f32c2abd2fb4ca078c27d36f6ff365c95015a99494e852631e9f92bfc9f33a0266c5f62b7edfce823c34993ff6a836b
+DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz 228388556 BLAKE2B 2b2d8428c97bfeb64bd999670e4ef2b6c4732cdfd7cac0cf37c5adb8ee83fd467e1e94bcb6a9edf28838fd052d19a7cbc273175c8360696bbec4523e1ff069a6 SHA512 10964fe48ee59ef2e44e9d0a0daa750cd06cc52198664b544166a846667366e7f0000129612f4d68e1530dab28987f62ccacd82f6d5663d0091cf7a451469219
+DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6cf85d71d188bc931cbb21dac1387fa9fb8b45bcf0984bfd5af1a3f1ac581b74e37df337138b05b2d74ed1572d6e859418c33c2fe4bb72f5a3b15cb6302060d4 SHA512 452610627d8d01474ed38b7d3ff7c3c0174cc5b3468cbd0f274b6124ff6497dcae6f0abb6b9688f64be89c524c8fe18aaf5fd56dcd2530df6c247688cac1a230
+DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz 223168712 BLAKE2B 9007a612ed5ec279c346abaeb4213a71d3acae9e5b1934380c9959e74db8b196b59f1197d1714a076040ff68f2b4f0e4937feb226cfaa0bdd272838d67eb07cb SHA512 253ba647102cb5599cfbfbfaf5f77ab2389e4bc77bce6cfd8aba037f6bd349081965d505fc30e9538df9353e923e66fa451ab73076d7224703cab1e24a81cf1f
+DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 54d54528fed34d0325d50a44ea732c99268d0acd2d78fe778dee369e18e9d7f6a8164617715a8c73aae59d2e856ff437343087542d2eeba9e613cd0418e9cf43 SHA512 79a049aad9cf0d50455747bbd2809611ca9d8eb2890c4a0dda71b64842c75cc4503f9f308d6f418e0f207d5cea04d21b352d45c1774a24b9270071d232dfb1d6
+DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz 203832692 BLAKE2B 964278ec2d9375d864cd03f7ec4fae1ca89fceebad51ccc2a017fbdf5ed354bd599d8c3eaf9eb9e86870f3d4b7fae8bb9011ae630742b3cc9e6ed38e14e8eae4 SHA512 d388e752fe7fa67c91719858be9ffc872c2b8fa45f6d63ae18298a79bc242e640784722d82461629bd0f07ce56a7dd850376ca9882bf0a084a5a19b01e5d59f3
+DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 1f24c48e0648f80d7107db921917372bd51ff4b630bd36830d5bb76386b486776311c67854bd4d6366e820003b89ba1a4c8eecbe001f2221c1063661c71ab513 SHA512 f134e874d59bc7979e821f881098f9d91eb81a1c5c68db80d738def722273ecf4957d842c3f0ee9f9b415448477bcd0b022624cea95f99850bd2267dc545423f
+DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz 203946052 BLAKE2B b0e2a8a0068dc758d772f3dbc8003a57fdb43ead64e30bdf338c60b195bb2f78ef7e7a6df6dd2f02f13f47b9e913ab2fc010ce9fc6d39d5014709a71886e7eb6 SHA512 515d16b3ec5e8ec4af24c6baaf4e5443774c2140e5379019f29ce8a63eb1fd908408f42092e0fc0c3dd5e62ac7d43357af13fd74678cd2635451a2d775934386
+DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 661439263a89d2206fbb7c3e00ac42e5975403670953df6be12dbf10e624a3bce0a16a846084aa621284e1d2dbb997af19b0f45808a2ddf7bb65af306a1745ba SHA512 bade26ccb646cc16822ae3235c00d048373f6c38eea79af128e3f299e8a69086fd254b4cd7c602c653d6573232594a27c7f8eb915797b8f1afbf56db3efb5008
+DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz 209318492 BLAKE2B 959488e4a957e19e5fe44e9b2b83406e135d7598cf4fa9db3b132c80cc40a54a73dee3c0b3db6f2f9299adf1b2d80fe453d1f0dab73fe46cacd5fa2ebf45b3ac SHA512 2c447c39f22f1f11f1e58d6adfea440a7d0bb91ffbb60df555b4e3eb41379b586f531a31c3ef86bb5e7a5b46889071f509157dc031fa174d93942d21dd241180
+DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B a1e12a459d62fccd35bbc34d043f8a7512dfe3edb6563f02b84bfdd1e4cdf9c16570302644d71dc208dfe9782f48d4310a13b748d22571d1d43dcf7b61b2819a SHA512 82d2d1eb7ee0f8ba0bfaf93cd2ef0899973f535080af960a2b0f54049285df43e758a9bbe2f0e36e64e85bd530e4511e8ed828ce046c82b74a252b92e7dd42db
+DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz 223720860 BLAKE2B 117364630b38f4a97f9b7183ca7e9f30836ffd0f73c4e3ce2af97ad3c837edc7fa247afba70858009b5ba34bcb7adc87f29b8c87f03f79d060d9bab68b0625ba SHA512 99a87fef7870ee3478ac2faf1ebaec9fde28737ddc2423ec3da4173051f542e24b5666b0e276b3fdd2f02259f16bd119bf79515d057c63da2f6659c0e7ea2fd3
+DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b9b4289aa38ad09d7f5098665a490dfa934676c37385f966d10c978f5320e374976617fb31a5e835661a81edab1ff244c74d8f8f5748954817db8171ed251b0d SHA512 9c44413bf71c416ad08289b4fa0223cb2a5299609ea5c94aff4f0bf7e793a9794155ee0c12a9f19c1c6e20112eb642f22be357d287adcea4e53e0285214c9661
+DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz 161572400 BLAKE2B b1f4b797319574b4e7cfb0d591988444238f3a735466e336b4c13e3af6754d18962f6f282011147c35ea48df375651d4cad3c368042073ff4da35c9ea6ab4855 SHA512 8c3cbb699f1a821889b70c56653380ad2a6d42d2ed444610cad5971230f3cbe5b7e71f1775f21788f0f54dad2f9c2c7eaa81ecde1a319d98ffcdb3701d6ef144
+DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b68152d3a6221cb57d03826055477be0701c6520228ef2c67cf856a4d5bee5854ecc7dfe3e062121ba5d1e82be0eda0691e0d133ba5d644fed78fbf328021a9f SHA512 eedc2ba881ae0e2d709c8f2cb92ad360c091953b48bf77ce5eb1c93e296f0d532e29f9613d21327e8ca388cc5db7d26a8e612300bb3f94195db08d1d40f15909
+DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz 166210748 BLAKE2B d3a612e44132db49ab41eaf822a472f11b24b250ad1c5ca61a85b161d0a892d392d9a4789b42b4f35968887895e964ffbb5dfa69a8205b2ee94baf02cb2ef311 SHA512 f3ea74fad41c197c8af69d65ff6024832ddfeb3c7fd4913b35219b1954fc7b6d3ebc345686043ee3250c17624e133b6c8680272b5b73c38dce1d6c39b763b002
+DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 15806c5684651c2920692d36c733ad8b8a6b8d39e901889457988205e04dd425083bf119053040b73ddba65a44d9330db021a85094d2c84e60c7cd1724d95116 SHA512 46f83dc667361cf4bd10103b1aa990796c1a45ee1af02c142f068fee7aa235c9d982189757184378b2230940134b1462116c09a3c0c043810e077fcf33bac316
+DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz 165275936 BLAKE2B a875ff4675559f9a4b7ff87c271dc4f51112a68c06677b78bbd97f7b4af8f69c75407ef711a9d700ddbf9d85863e24c2f3e27956181bbe00e4afd83220290998 SHA512 9e489cb27b9b8f00e9fd2210b3bf5c1e60ddc83c5fe3d9a381fc4469badda89c02948554d70710d8438333d6629c24282a8a9855241e46ded9c6cf368dce1c2e
+DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 63b7d7487a7dd561a95a175584b798fea1b4157e59b660ec2063724e6ef4ceb7455a1912fb73a88c9315de0d80e6e622ef5c81258b670833e15c421cc3bbc562 SHA512 83420778147112aec58ad81f39f61a13fef97dbae6ff927c55a360588cab56cb58c48c31d19ed6b3b77d73277b044559db6184224d4e4d5bd5371e4cd3f701c2
+DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz 183062288 BLAKE2B c987b07862687203f716494cf5dde444d150628ae021f7a0ed990b47c892b7c247a6f8e790a2a88d49c3abcfe6236b18bbebaf76e0f2720a8c318b8f8e3e5a01 SHA512 d0db86e475fadf2535bc6955abb7b6e397553ad6843ddd369e15c9c35800866f27dcd0515a898a65f7ca868672cf458114320769cd14db258a279cfd3de3c57b
+DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7398231bfc5624f6e7ef8af55405b861fc06fbfbca9159b9c60a1ab27a5bee6551d228958e6f56abfb598c6f24f53d35f510e863176d03639c47703bd8064c7c SHA512 8713ef73a1a9f30f246dc61086993f2f4a8d6f04595401b312c43fc97f667b44126e4b7f176001b68622d452bb74ee460d60ae2e6d44938e02c4da4fcdfc7855
+DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz 191619800 BLAKE2B 276f427d0ceed4926f46081c57f6aba69e3c541d896dbbd0375da0d1f6461840e20ab8b7cbb9dec53b67dfff668e91fc8c68ea70aa3d9f333e2b21ec345a876f SHA512 039d321f90f960276ad06ccdcc2549d2c07335d61b21abcc534b33ff406e130d54dd3d79d471be9588546e30f5e1d4952e33c7890cb2d66eac80436471d3db89
+DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8ca8447d2c69ba58439ed36077882da80696427190761e5dcde99c8957fd476c73fbcc8111ebb3409c86e0a7c315dfbf7f1202204f7755a9ed87eb523bf34e38 SHA512 0f8efdf23aacf435e06854aed7f4366f5fe0f83a9a256d1026b02c2817badbd072a726bce052b0333e8cdc2907fd0e5b81a9cdef617a34e7d963d9d3c4742fb5
+DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz 201394312 BLAKE2B 60bc2fc5beee3f6d0ce695fed0c2148982b6ae3936bbf44fe0ccb97be80e9a2532f20c7234c924f500c4edc3bf82d4ca25b1f1dadc89bb29718c4a9e41bb8894 SHA512 4a8cfcffb7069e2bc4679a8da9acecf12514c512854bb9eef6f3f861e319b0098fd206d743ef7a0f25ef5b65892ad9dcc0adc1bc19525900c3edf5ea5489849e
+DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 55391a58d2ffd6c21b1ff6d77595e424cf269ad44d59f7c2a29d149306563028b402e7393e4d802a47818d7e831455768e86d4f9d882ad0ca70cf216ed72c9db SHA512 c1cf19959de1348ed34448a3f9999ef53324be81d1c99967e4091406463dc0dc28a384f8f04e07e4b54791d1d4a2b1c4aea570503abb0c91c83eafdb5e389243
+DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz 194848260 BLAKE2B 35a283e87bd0d338500ed71d539760cc19a1522875d20f7cdf8cce7ac79fdf993530082e0078a9f12c2df41d3366dec30f5326f9584ab9dd0bc37811bc931e1b SHA512 60a9e4a0ffec3763e6e5f4f9a7f3f52f423b6af86eeb4eddbd5fa00682ec3f6881a6d0be717079f508c1d0ef94f3d794b7da2884ed5b7c88219aabd49bf20662
+DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2cc8e9724e3d0f3af2d5c8e8c9f51f7f5e2d36a9e8cda23bf16fdcce0ecbd1a8965b0fc7b339dc27c779346cfe3f26fe8a2d3e1929431a2190452cbe4a949978 SHA512 587b6ab43a3c0258b0393e13f9f231f086527dd28f7f65fa6f00ac61c974e1d8c0305c2cc154a8a106d506b17f505ec8d8e6e5d39d4512072ab39da680fa1574
+DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz 218505248 BLAKE2B 6f8026b1779527f0dd781843e2f2deb423c2b541711d3e8efb981ea972cd5405568e6ca274e1b78cc6427e038d59e147652da26cedaa83b02f5daa79491db2f3 SHA512 10c99efe46acbe2bdbd27f28cae28d6db223c3cee2abc835d04f7ff1662c8b998d354ae22af9dcf00c078e96cdbb1f01df5f6c9e9c587d3459ea88f9acf37267
+DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7053c6f041695ad7b9c5ea304a0d71b9b17c5737b7d7082ef2de6e52dc52bc18c170c3fe7e7a658823abc5f80ab775b544dd2b2b3e27690bd8209357945b0f04 SHA512 8bc1d64180f55b0ed93fd506bc193a51e4519a66ed8d6f4e331395bcdb8584171d81397d594460952d7983129aa08e278ee15a584571d404f2f6a304d1d7241d
+DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz 153662720 BLAKE2B ff19ebb8a0607b5a3a29b2676dc12466e0c9969f6ac31a588a5dff2d3c10ade70e705873e2606ed84efeaeeb87b8afe6c88285edbdd2bf1a8433f24c48009c21 SHA512 b329dc015dc70ceae0a3b9b8d8e674fb443769bf82f88ed06ca306cedaa52e26756a2491c92315e51b63d4272c0a1f43b2150d5636101814f6e2b59772f1f048
+DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a1602b9cfbdf1b66c479f13b7171cb445068b5f18eae620435b25c3ab1e762e41977e31f02158d259acf16b0c8cdf895af16d6f68904939333b030f21b6c7a01 SHA512 2d79af9fca5a7e19448aeefd330fcc436c3ecb8e617662f144b12303ef2a214a3ae3ec4d9a42f68a4d0d6e343b81b495deddf3df23031aacfbead0c97b083174
+DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz 254266584 BLAKE2B f566cdc94726532c50726ccf081eb2b825e52a56c74eb9d9e846f9933dafedef0a8a1b7c485938f96ae9945706192218cc318750738596923329bc23ef770ce1 SHA512 9cd01f0539db8cd344e9dd39fc5ffcd5b65c9c8c95ed692b9f7c23bc19c970c9f0056f8c8bb61813f1402143177a5b1c20bf844e64af8cf0be110e17e30aa4af
+DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 46f38806b5a6b67953c607d4a3074a9177e14245e746771d876530c398ea98019e534a22a099c087ea2386124cc952f0a488e45f8175922b19b42441d6607938 SHA512 bc30af1e75cbfc8b488782af26d91ccee6e3b3220913af8d2ca3fc6beb5790bd81e3348f8da5c0c542bd13ab6c4cee77f50f4ba0d48e9600620034acc2dafe15
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz 230083616 BLAKE2B 2b66b809d53cc971c9cd44435c10c4bf0faa20dcc3782b47955d0fac252c370c670f0adb59f51b6842b46277d584c5fd44b94202e57aed078480f5cb6952d815 SHA512 c9f7b885008c58f7aac0edd5b6cd0295d768215e2b26cb1f590206248d468fa78409f42f48d505080ee14e2a59dd887cfc564db5a41e91ed36d738a90961f89e
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a323669f0587c9785c587ac0eac72915e421a61d2b5252c2dcc7f637176d5d425fc8cbcfa6ef848fd0d7acfa17cd430e4d42e8c03729c563dda59aa13e6d5c5b SHA512 be2e1eff9228576b66e0a0434e1edbb4525d0ef66743082afef1ef55565e312e63fed7274d01298128fda0c7ab63827d5aed90f50e184582781a4e10ee311de1
DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz 224541836 BLAKE2B b32b7886ddc5da3af0c6e394ecb167288897b2c44b0108e33aeabb3842ff563c769e635413b092a36246bbcf137d692e94c6ce66cccad34c7e728c4cf4af7bc2 SHA512 e462c8b94defc5ac5dfe923c3a6273c3d414cf576840d46a680a4f333bc34fea874c4ec4363c4e1891a6fe95087bf4a68bba7f316bfed9db6313be989afd7428
@@ -30,5 +94,9 @@ DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz 155435832 BLAKE2B d5427a7380a21
DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0b4465f1afbf2f5f9135cf722632ffd7df9ef4e92c65e9ef6d4aede5b1ff392973949a6737e88685033ee571dfefe9b099d477480d7aaec2a329926a87a6f5b2 SHA512 0c8d339204a23000cdebfaee7faaa576673bd8d98111ea187f5e19f03f7231f3bbec8158c5b04d8d903877f1addeebc9f4fdc6b1de0fc0ad2995742987eafb1c
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz 254705824 BLAKE2B 8d35bbc3ffa53b52d7d7aacc51b90283d9703a40d5623c184a79195799aa3768a34942e235e2002a0b72d76110c0d66fb5ea403f9d0c81021ead52cea2a51e40 SHA512 995530319a14bd6674d5be145e777b7fd482953e62ecf672a29e2c5b4bf567e010d7db4d5c6acef1603d79135e74f21955d9fc13ed7e1c33279d05aae39bdfec
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2681d77ffb4c40305ff532f975a9e31ea72a50fa2a25661ecd721a50f081a4ab3a659b2a06500540dbf21357af098add2a4a4dec63f50d5b3ed4c041fe4b49dd SHA512 012b2cb560e0d2514eb288960e6a3703f9be9a7e611b915f07f1150645b8527fe653d3fbb795ad62c5e431cb4ca175a915710913eb2b9f2912c188d17baa0d14
+DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b75944d47ec747d9c337cc7ba9f38dfd749415c9a00acf9d9d8743874ba1c51da7915315bd25e011eeb8a2aaa8812773850 SHA512 6f7fa855acdf20525e907a6fc8c7aa8b206603e3bcbd532d3bdce165380f0019f45dba2b2b06d20b541381accf67ca0d256fbddfcb1642a2e60e1237807d5410
+DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
+DIST rustc-1.63.0-src.tar.xz 136597192 BLAKE2B 52eb64ee11e7d9724a4c2654f7eea13521959ac5e04a4925eed5c89ec3661a7827146d6f9a9d05c98466bd4b74393af7bb18d9f418c785924f559833434dfe38 SHA512 0dd3cd1546bd9c1438afe0c4694e1ed80507f6b437674682c0474e13f83457e9ced4560ddeee58602e01837140f9e34a9e24c6828643dd6f613e07755af6997c
+DIST rustc-1.63.0-src.tar.xz.asc 801 BLAKE2B b6c133768e368a7aeb0a4612a4c824d13f91ccdca6660feb5774ed6d79537084020780532c882ae3c9e4b6be3d36ceb0652eb134a580293ba8d8be74c4ba3c6e SHA512 f8807d46b9a3ca2a15a60f8062d63b3ee6e3210657cc752c948b3c7aa1626ec63cbd57529d010ad33f07ac47cf70dbf2cb50f200587338f77c631fc9e6786b17
DIST rustc-1.64.0-src.tar.xz 137841332 BLAKE2B 8acd9e0a4632ba2114018a5cd3f2d544324c601c246658f60a9e0be513c40375434d0a416f0bfd4d24493eae3fec7c9f5bb52d008c88cde14de503a3b6873dd1 SHA512 919f40acd8c6eaaef399aa3248503bea19feb96697ab221aaede9ee789ce340b47cb899d1e0e41a31e5d7756653968a10d2faaa4aee83294c9f1243949b43516
DIST rustc-1.64.0-src.tar.xz.asc 801 BLAKE2B 69f7bd7600d99794859c6fad4b44f0e98868e4e16041d6fe81d9d09a8435c75abac67a735adb0b81a2d9f85651841d404bc1ef4cd64fccd75e8a25d6d95729d0 SHA512 a831e3941849add1082c5b47b619ea87405b875d6eeb90a35f42742a511d124c29503debd17dcc8c6aa9e03a754ab51c3a15e99192bdd0dd1b8a59af9b6eb0b8
diff --git a/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch b/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
new file mode 100644
index 000000000000..970148124365
--- /dev/null
+++ b/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
@@ -0,0 +1,166 @@
+From 331c3839ebb0099101e1d2f88205ea42f4e3b319 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Tue, 24 May 2022 12:03:20 -0700
+Subject: [PATCH] add gentoo musl target specs
+
+---
+ .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +
+ .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +
+ .../src/spec/i686_gentoo_linux_musl.rs | 11 +
+ compiler/rustc_target/src/spec/mod.rs | 8 +
+ compiler/rustc_target/src/spec/mod.rs.orig | 2465 +++++++++++++++++
+ .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +
+ .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +
+ .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +
+ .../src/spec/x86_64_gentoo_linux_musl.rs | 11 +
+ 9 files changed, 2550 insertions(+)
+ create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+ create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/mod.rs.orig
+ create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+
+diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..ca5f28f
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::aarch64_unknown_linux_musl::target();
++
++ base.llvm_target = "aarch64-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+new file mode 100644
+index 0000000..24b3b30
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::armv7_unknown_linux_musleabihf::target();
++
++ base.llvm_target = "armv7-gentoo-linux-musleabihf".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..cab0923
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::i686_unknown_linux_musl::target();
++
++ base.llvm_target = "i686-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
+index bd5b712..34b923b 100644
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -808,6 +808,14 @@ macro_rules! supported_targets {
+ }
+
+ supported_targets! {
++ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
++ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf),
++ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
++ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
++ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
++ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl),
++ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
++
+ ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
+ ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
+ ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
+diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..b188a7c
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..395f603
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64le_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64le-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..cb3121d
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..2fcdb66
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::x86_64_unknown_linux_musl::target();
++
++ base.llvm_target = "x86_64-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+--
+2.35.1
+
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
new file mode 100644
index 000000000000..a87687dce387
--- /dev/null
+++ b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
@@ -0,0 +1,48 @@
+From 97b80919e404b0768ea31ae329c3b4da54bed05a Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Thu, 18 Aug 2022 17:17:19 +0200
+Subject: [PATCH] CVE-2022-36113: avoid unpacking .cargo-ok from the crate
+
+---
+ src/cargo/sources/registry/mod.rs | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
+
+diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+index c17b822fd0..a2863bf78a 100644
+--- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
++++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+@@ -639,6 +639,13 @@ impl<'cfg> RegistrySource<'cfg> {
+ prefix
+ )
+ }
++ // Prevent unpacking the lockfile from the crate itself.
++ if entry_path
++ .file_name()
++ .map_or(false, |p| p == PACKAGE_SOURCE_LOCK)
++ {
++ continue;
++ }
+ // Unpacking failed
+ let mut result = entry.unpack_in(parent).map_err(anyhow::Error::from);
+ if cfg!(windows) && restricted_names::is_windows_reserved_path(&entry_path) {
+@@ -654,16 +661,14 @@ impl<'cfg> RegistrySource<'cfg> {
+ .with_context(|| format!("failed to unpack entry at `{}`", entry_path.display()))?;
+ }
+
+- // The lock file is created after unpacking so we overwrite a lock file
+- // which may have been extracted from the package.
++ // Now that we've finished unpacking, create and write to the lock file to indicate that
++ // unpacking was successful.
+ let mut ok = OpenOptions::new()
+- .create(true)
++ .create_new(true)
+ .read(true)
+ .write(true)
+ .open(&path)
+ .with_context(|| format!("failed to open `{}`", path.display()))?;
+-
+- // Write to the lock file to indicate that unpacking was successful.
+ write!(ok, "ok")?;
+
+ Ok(unpack_dir.to_path_buf())
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
new file mode 100644
index 000000000000..1afbaa94138c
--- /dev/null
+++ b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
@@ -0,0 +1,102 @@
+From d1f9553c825f6d7481453be8d58d0e7f117988a7 Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Thu, 18 Aug 2022 17:45:45 +0200
+Subject: [PATCH] CVE-2022-36114: limit the maximum unpacked size of a crate to
+ 512MB
+
+This gives users of custom registries the same protections, using the
+same size limit that crates.io uses.
+
+`LimitErrorReader` code copied from crates.io.
+---
+ src/cargo/sources/registry/mod.rs | 6 +++++-
+ src/cargo/util/io.rs | 27 +++++++++++++++++++++++++++
+ src/cargo/util/mod.rs | 2 ++
+ 3 files changed, 34 insertions(+), 1 deletion(-)
+ create mode 100644 src/cargo/util/io.rs
+gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
+
+diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+index a2863bf78a..c9c414e500 100644
+--- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
++++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+@@ -182,7 +182,9 @@ use crate::util::hex;
+ use crate::util::interning::InternedString;
+ use crate::util::into_url::IntoUrl;
+ use crate::util::network::PollExt;
+-use crate::util::{restricted_names, CargoResult, Config, Filesystem, OptVersionReq};
++use crate::util::{
++ restricted_names, CargoResult, Config, Filesystem, LimitErrorReader, OptVersionReq,
++};
+
+ const PACKAGE_SOURCE_LOCK: &str = ".cargo-ok";
+ pub const CRATES_IO_INDEX: &str = "https://github.com/rust-lang/crates.io-index";
+@@ -194,6 +196,7 @@ const VERSION_TEMPLATE: &str = "{version}";
+ const PREFIX_TEMPLATE: &str = "{prefix}";
+ const LOWER_PREFIX_TEMPLATE: &str = "{lowerprefix}";
+ const CHECKSUM_TEMPLATE: &str = "{sha256-checksum}";
++const MAX_UNPACK_SIZE: u64 = 512 * 1024 * 1024;
+
+ /// A "source" for a local (see `local::LocalRegistry`) or remote (see
+ /// `remote::RemoteRegistry`) registry.
+@@ -615,6 +618,7 @@ impl<'cfg> RegistrySource<'cfg> {
+ }
+ }
+ let gz = GzDecoder::new(tarball);
++ let gz = LimitErrorReader::new(gz, MAX_UNPACK_SIZE);
+ let mut tar = Archive::new(gz);
+ let prefix = unpack_dir.file_name().unwrap();
+ let parent = unpack_dir.parent().unwrap();
+diff --git a/src/tools/cargo/src/cargo/util/io.rs b/src/tools/cargo/src/cargo/util/io.rs
+new file mode 100644
+index 0000000000..f62672db03
+--- /dev/null
++++ b/src/tools/cargo/src/cargo/util/io.rs
+@@ -0,0 +1,27 @@
++use std::io::{self, Read, Take};
++
++#[derive(Debug)]
++pub struct LimitErrorReader<R> {
++ inner: Take<R>,
++}
++
++impl<R: Read> LimitErrorReader<R> {
++ pub fn new(r: R, limit: u64) -> LimitErrorReader<R> {
++ LimitErrorReader {
++ inner: r.take(limit),
++ }
++ }
++}
++
++impl<R: Read> Read for LimitErrorReader<R> {
++ fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
++ match self.inner.read(buf) {
++ Ok(0) if self.inner.limit() == 0 => Err(io::Error::new(
++ io::ErrorKind::Other,
++ "maximum limit reached when reading",
++ )),
++ e => e,
++ }
++ }
++}
++
+diff --git a/src/tools/cargo/src/cargo/util/mod.rs b/src/tools/cargo/src/cargo/util/mod.rs
+index 28f685c209..47bbf37aad 100644
+--- a/src/tools/cargo/src/cargo/util/mod.rs
++++ b/src/tools/cargo/src/cargo/util/mod.rs
+@@ -14,6 +14,7 @@ pub use self::hasher::StableHasher;
+ pub use self::hex::{hash_u64, short_hash, to_hex};
+ pub use self::into_url::IntoUrl;
+ pub use self::into_url_with_base::IntoUrlWithBase;
++pub(crate) use self::io::LimitErrorReader;
+ pub use self::lev_distance::{closest, closest_msg, lev_distance};
+ pub use self::lockserver::{LockServer, LockServerClient, LockServerStarted};
+ pub use self::progress::{Progress, ProgressStyle};
+@@ -44,6 +45,7 @@ pub mod important_paths;
+ pub mod interning;
+ pub mod into_url;
+ mod into_url_with_base;
++mod io;
+ pub mod job;
+ pub mod lev_distance;
+ mod lockserver;
diff --git a/dev-lang/rust/rust-1.63.0-r1.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
new file mode 100644
index 000000000000..3b832d98e84e
--- /dev/null
+++ b/dev-lang/rust/rust-1.63.0-r1.ebuild
@@ -0,0 +1,774 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~riscv"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 14 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+ wasm? ( sys-devel/lld )
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rls? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.63.0-CVE-2022-36113.patch
+ "${FILESDIR}"/1.63.0-CVE-2022-36114.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+bootstrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=8192
+ # multiply requirements by 1.3 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+# Is LLVM being linked against libc++?
+is_libcxx_linked() {
+ local code='#include <ciso646>
+#if defined(_LIBCPP_VERSION)
+ HAVE_LIBCXX
+#endif
+'
+ local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
+ [[ ${out} == *HAVE_LIBCXX* ]]
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+esetup_unwind_hack() {
+ # https://bugs.gentoo.org/870280
+ # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
+ # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
+ # the whole idea is for stage0 to bootstrap with fake libgcc_s.
+ # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
+ local fakelib="${T}/fakelib"
+ mkdir -p "${fakelib}" || die
+ # we need both symlinks, one for cargo runtime, other for linker.
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
+ export LD_LIBRARY_PATH="${fakelib}"
+ export RUSTFLAGS+=" -L${fakelib}"
+ # this is a literally magic variable that gets through cargo cache, without it some
+ # crates ignore RUSTFLAGS.
+ # this variable can not contain leading space.
+ export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ has_version sys-devel/gcc || esetup_unwind_hack
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-flags '-flto*' # https://bugs.gentoo.org/862109
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use miri; then
+ tools="\"miri\",$tools"
+ fi
+ if use profiler; then
+ tools="\"rust-demangler\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+ if use rust-src; then
+ tools="\"src\",$tools"
+ fi
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ doc-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- _EOF_ >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ _EOF_
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ cat "${S}"/config.env || die
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ # we need \n IFS to have config.env with spaces loaded properly. #734018
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ )
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2022-09-23 20:06 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2022-09-23 20:06 UTC (permalink / raw
To: gentoo-commits
commit: 4c25a3d2937bd55112f65c9bb0899116306d16e0
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 23 20:04:37 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Sep 23 20:05:46 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c25a3d2
dev-lang/rust: drop 1.59.0, 1.60.0, 1.61.0-r2, 1.62.0
Bug: https://bugs.gentoo.org/870166
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 104 ---
.../files/1.49.0-gentoo-musl-target-specs.patch | 164 -----
.../rust/files/1.61.0-llvm_addrspacecast.patch | 52 --
.../files/1.61.0-llvm_selectInterleaveCount.patch | 66 --
dev-lang/rust/files/1.61.0-miri-cow.patch | 98 ---
dev-lang/rust/rust-1.59.0.ebuild | 707 --------------------
dev-lang/rust/rust-1.60.0.ebuild | 714 --------------------
dev-lang/rust/rust-1.61.0-r2.ebuild | 733 --------------------
dev-lang/rust/rust-1.62.0.ebuild | 737 ---------------------
9 files changed, 3375 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 2dab7c6a803c..a81fde9ae574 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,99 +1,3 @@
-DIST rust-1.58.1-aarch64-unknown-linux-gnu.tar.xz 229585460 BLAKE2B 301b201cb40249005a1a8adf34ffdb0bacd22e1d919a24dec9bb8331c2243de1b7cc312c91a87fc9e11091cd9ad517347ff09143000d9de051b3c9a6e0780f9d SHA512 04e2cf2116e16fa293c7f2d29816012520b41df44b54657e289e7affbb91af5a5001d140a49aab1286451b93e93b0171edea77f61f01085136d1be1a3baac4a2
-DIST rust-1.58.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6da55597fddd643350c73f28a15dcfa935529c0878a199819b9bad6f3ea2542f9021e24bc1a6c8724ff14d36007c00f8906dd1aeaff33b0a99ef6982e8f711b3 SHA512 57debe0afe52c3af3eb53e4efe70ba194ddad449d9952174f8a775531b83f8ab0d66462e7bdd06712547e8f675d330a151d20d183daefe1dda2f0e3805695714
-DIST rust-1.58.1-aarch64-unknown-linux-musl.tar.xz 226068748 BLAKE2B 7f9680b0ad3f9a8349f3032f63d23b6d96ab43245d3025d0e4307a29b4353fd2408e7de572a10a77b261634b8fd4e9e6054ba9955b2440b608fdad2c88c12bfa SHA512 6400221a8ae04aea91f9df0f8d82585bcd380f22e80fe813eaa1cadbf592c5207665ad008d938b399e34fc2cb0485b16f993f94d431c290a69a696a4faf89e05
-DIST rust-1.58.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B fd22d8a3157a11df45e166b8c961a435bedb079254c1d7f0a738adc1065169a03c897a32bf8781802ca48bcb983c761e6985e532c0d76e90c3684752d8cff9d1 SHA512 54fffa8120fc6b86c57faffdc7857adb89e5fd217b0e753e76e6fadc54aa086243cb7ba3c2c49ec4f44ea8538223312469908d24add2d28203f41c16e9224204
-DIST rust-1.58.1-arm-unknown-linux-gnueabi.tar.xz 206480968 BLAKE2B 32ab78a1567d31bb1b5ca36fcb14fd1b002675baab0f688f931cef6524ffcee4257e00fa25a848f73f25656ae0b58beb0e862f1a36d4d5fad016316af3d1ab2a SHA512 94e7cf238235e845761e53fb5802ef0ce3a02c4675001cf67d05bc565403ec1d54293557d73dce7396147381c331ebfb0313e473289c05b65541f836dd8b4e6b
-DIST rust-1.58.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B db3275db531d78d728b33678be3869738009b65985aa3ad4f38aaa853cc1b84a1d2a89f98e203f697c457425547b80ad5826e7c820d49c767b5cd1df2db93bdd SHA512 fcca26b6b0dd2e7529efc93d1c4fdfcdf55c85f40bc247b3af9741403a085bc6808cd304ba535786dd2debbf4952c9d9fab62eaa61f1d3d8e59ce78bda992eb0
-DIST rust-1.58.1-arm-unknown-linux-gnueabihf.tar.xz 206545444 BLAKE2B 203a562ac448e7efc4fd519d98937f2deeb70c931611a6f0efc87947f5c48cf0c0cb85358fb9ce1dce49bdcde015fd2d5fd5f3b149d7370c05649579522d228c SHA512 5c0404d878300c1a47597bdadff7fe93c3b0a115320dbf5299dfb4fd06ad322217f4b630429a9db3a5ef54c56706c1ebdf512fcd663f379f1c2df0cf3612459e
-DIST rust-1.58.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B bf26f6540d96d124bb503b6e38acd87dc16ad16c5214559edd26f4f4f94f1f06a7059a09a7ee504721130576d6ddc5c7b2550f7bc0edffcef37bae3c0abb618c SHA512 1fa1e533adb1e355411cfb706b7c47712454547966bdf07687d9b563cf5dba9b4419d646227719a9362eb923c597f8461c194e56efcbed699610faa209985df2
-DIST rust-1.58.1-armv7-unknown-linux-gnueabihf.tar.xz 212381428 BLAKE2B 0cbc4ace0b7693de1898f160d5e76c7ff993aa8e8135a094b23dff736326ff7616471068f02a064d2b88c816fbf6f943fdaf82629dcda0e0e07b6a4a3941fcef SHA512 c1dabf7281c754d3c89044b1277618b0e928efbecde47ed98133d3f8664722d5b3dfb5fbf485cfb4c98c53d3101b192070c5c41e4395cd8563b0e8415abdf2a1
-DIST rust-1.58.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 85f3892a41dd381250219cb0c0c8e70b3902e5356ad34066a6db319193dd580e609975e38356097b7ca0907d62d188459c5a72783c95e77f1d08a50ae8673458 SHA512 70a2269b8326ed8b5e53dbd6698237c4d843086a139c4f4ddd6e04625f0defbcaff46149981e5a1502d56da1393b01bc0c6f74fa8e6ff407f6eb45cc5638ed41
-DIST rust-1.58.1-i686-unknown-linux-gnu.tar.xz 224773372 BLAKE2B d90db8b20611f6430759399bbccd0359f2b64ba9b9aa50312ce51dd4a43728897ab5c31d3c6bbee892db8e6e500a19184eb325a312231458cf99bad7c6f04b58 SHA512 0cfccc77cf62002ad99751744ae5a910d48c142d596eb88e187fc061c4b3a8cc1d99634802bc06b0302c41bb3462a17453af1beab6ca694a1535a1b20e10fa47
-DIST rust-1.58.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1fc809defcfeb240f756b3e7158d3e747b2e21ea81f3029618c58c4070070a2068603a4e93f7928a9ec3d120d7b2c7cd944d1ae03ebff1b9d5baea823dba54b7 SHA512 aba1f533227794755ca81c2bd8a3bd35fd9ad4affe5bd39430e0329310fe6c6f813fa7d95790958c61c6b22a4e4fea3488e406f05fa30c27eb6871f71e2e6e5d
-DIST rust-1.58.1-mips-unknown-linux-gnu.tar.xz 164572088 BLAKE2B 117dcc6483652c3f18436e185b44d605e64b9b31634484ead2d86c1caf6ec47a53eeded5dd766e2410ce59dfcd3f7e71ccf924afab0f34988e00e4c9324a5f13 SHA512 08df5ca03f786aae814b7a22a7d05e18107a1f185338880ea1b58df23d6b1d5c9f2359650ad38c30058a2d2d6f8ae32dffc3926ff47fd3342049c2251eb48463
-DIST rust-1.58.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 275a43c158a444c3ab27f1e45a9de294a059c21edf7280482303b83f6b0eb65d309021a82c49410b5b24828b88f65888529e95b01886ad20f2f4c187f595b788 SHA512 c70800d0629f92e4640a64a276575b5d6c1e92c2f1b6c7ca025c98a93a2665cbd7192d2fb697c421adc34fe397297c4cb78e21b38f27fa4261483cbf423f933d
-DIST rust-1.58.1-mips64-unknown-linux-gnuabi64.tar.xz 170025876 BLAKE2B 05cac890ccb9e37faeb3d995555b6f7f52281619101f033038ef056e7ee75b0c5eb2bd14357c1f8b0f5e96b9e2877514ee870bd75be1b28dce4906be95e6e3b9 SHA512 7d2fc1f0787f828fed72b1681f2668bce7cf25a87a01a818dfec18eda0fb63fb4a5e4aad8115e93dc4c8398641db4a476dfcaea07e6826fdcea727118c64e286
-DIST rust-1.58.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B fc25396963178a21a5b0a999e8dd3c9520b3056483ddde1f8a284747a078db0dfb0e808f2292704680e37c5cb2db990ad8311efdc0b32e2a65fd93d389c2a09c SHA512 32ab00c666c33ab53a975e9abffb7645d2101e8f508ea67d2e63b1ec01b4785e384bfe2966ca237b5494e34c2abd15e509835fa161709ddbe1c69845f26a6f43
-DIST rust-1.58.1-mipsel-unknown-linux-gnu.tar.xz 169136184 BLAKE2B ae698d08e2592b32b5a0927536e1c2a506c2782f9449fe20242d2ebbc5cbccb2d3a53874b973d88898157b233a88ed80987e2e83a316c05c0d478b1021c49c41 SHA512 ccb13dbb41c92956a437d0879fe9d3ad0a2aac88fa1b761e3b68a6536e389ed4997d1682730b2078fe01e68df0ef64bbe43dd2d64595dbb4ed388fe59e1d6dec
-DIST rust-1.58.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b14cb176bb33207aed7a01de755390df0f71163940fa8121b51dccefb018cb4dd1cfe9efc359f6bb941104b8b08db0cb5a94c3af880058e59904884c5dff3e4 SHA512 1e30495303f9c6289223a2970d419a70885a866468717254b3efa5124e21cb06830692cfadca33ced94a383d1b9af43b70c08235e935ee491a1de50eafba96b1
-DIST rust-1.58.1-powerpc-unknown-linux-gnu.tar.xz 183853716 BLAKE2B a2b98d2c55b5bda8647301536bc8e95b72f98f41018f9b7574f85756d2cd2980fc3a3e995bdd0ed5226b7f18357c5aa3c2f8a05b1679d3dceeae6dfac7484f15 SHA512 5b9010bc3685889411fab6a06727a320123029c037a01cbd5b69f037a87ed595362b698264954b2d3dc2adbaf422fd54d7b56d81512b62147c1922aae77afa22
-DIST rust-1.58.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c428bb51fdc740ea9499a1a853f4be93a53c23e59d5142d33bf103ac46e32716505eea3e45174ac3b88ffa12caa4dc010dc2d02093f397ce45b4af27f5c4191a SHA512 b3ac66cc88c75f77f7f9632c2104f45a6a730a83b75bd7b531dab833e8e5b512ef06bfea433111302f64321b688f0817b95c5eac9fddd8ff44bb49934a616eea
-DIST rust-1.58.1-powerpc64-unknown-linux-gnu.tar.xz 194177236 BLAKE2B bb0c23288014207123345deb06e40a45221d0149e8563c374810892b68cc2b5838b5c3f8c630522723daa633c5fbf72aed16e977313a6d1ce27697c22552681e SHA512 8a089c44d2f50d4677a6aa82e6308d47451ca588243e0df3fbbfd13768002f0caaabeca0d6a7f113b8f63477565296e5cb89f27760621a327cf9cb5b4999eeb5
-DIST rust-1.58.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b94fe36ab1896bfee3d7e7f2b17dad05d33c672407955fe45758d167bb1fb4df4d33040e6d18dfa966d33133e181ef9a0e7dd04784ed80e30b38175a901859e5 SHA512 6edd981ded134e0c2e6198014ff37868d7e71d0d2185284c28a35450ab226ffd460faeb29e8aea6d5e75a2fa94874e01c9987f1f1470efe061859d06f3d3e605
-DIST rust-1.58.1-powerpc64le-unknown-linux-gnu.tar.xz 203175404 BLAKE2B 53ebdad5859fa7a5e2cd79ea31595aef65a8cc54e11d887f04385500aeac6dd886273f7736271aeb71c70e0d512fd986f09b54ed1a9c744432688eb71c74edb0 SHA512 abaa2b749987b4a1dbc20cc3dfdccc694bce0d1e126d8e9c03dfdcaf85c5be2a2d28f9877ccdaec847c499d7044f955a70f454dafb24dc59ecb5854807eb2289
-DIST rust-1.58.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d5cdf7cfca4d881931a08bf67ca1c08fafda621746b01b8e12e41cd88f5ba8107c1bc86b70f84eed4e6137f6d92ae712740b57505705c7bfd3454d8ca1131eb7 SHA512 39a9649ac0645ea6df93cef59baa6d197b9cfdf88f0c1b3846e52369c8e3e293ecf9327cfa6b5457be65896380c13445ad05c3a0cc213da0ed9bba3c12ae9b8a
-DIST rust-1.58.1-riscv64gc-unknown-linux-gnu.tar.xz 196828436 BLAKE2B 9b38c585146f0832d9bc1bebbdab086f351bc88c27817e44ff251c1566b80ee5e573b59764a22802d246023ade332f861096f2e68504c7b64400754ed2676695 SHA512 d268e5a45542f7684d52b694baf5c9b504837fa43d2f5a298e3fb4e335bc6789cdb868651614fbcc1d55c13ded1b2134d57103f46b098d0a8d4a7fd58fb10b03
-DIST rust-1.58.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7b234a9fe76cf39177ebc6ad54799bce80fef97151c257b58ae08321c5fe427dd5b5a70627b5a4011e32560f63f6f7b6fddb42e58728004406aec6a9e7597eed SHA512 ee4a1c52cc623dd1858ce8d363f0aaccd58b8bed27a0838f399f1b5cc51f0c123d98056147a266f45724b6a25b09b11c7224c4bc01f208ff7d77e906c850aebf
-DIST rust-1.58.1-s390x-unknown-linux-gnu.tar.xz 198204996 BLAKE2B f6f325a10aa9c16510b77b7729410d08d09b83dadff3b8ef7e06642d8c6a50a153eb17cef338fe3e3b7efa3a48ae0e318414aea794f2f488d6f59852310bbbf0 SHA512 31ce8b53c50063c9409191beab28f67ab804549b5eb4d6bfaf42a3342ccb2f4dc039e3afffe22d87664917481e943018c0d1239e7dd0a62af34c44a975f69303
-DIST rust-1.58.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 995a6ce146b758bcad983fc8d7a8613b0da172c7e62a0b73d206cfd461e1046d024a8431ac287b5c267b215128542bf20d796b072ab1aed348787f50013a1118 SHA512 d7af25ef9bb92952949e7f91a13d5e910f32134b962e6432bd10ed885be451eb99c518213d9dd4c425c40ea43fa2722d6ea7c357ab0ec63b8ca4f7d020412979
-DIST rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz 150229600 BLAKE2B 056e5a646d6758ac88e2b2b9309dbe0e9d23a285be31ba009eed936c82923ad9615874b8689ef926b14335d6c5255df41b5879794e6f0982b90553273487853d SHA512 7a61ecc8ff49769847ed4021c57279c16f261aa21469da426023fadab3820d0d962edc0fb04861ae23c8dcf821fc3ab99c2d469ba827dad30c1acc995732605c
-DIST rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b86d3d2cbf27594dfe55fe2ff52523a9dff08d08ddd30526172f9e07760c2f854698eb8153cb9894588d75759a3d0bb7887756d005a2c69aa9cfeec8e7dee678 SHA512 82dcb22efb94bb19f2338e9cb46e3f6da3d189fe6bff12bf1ec870197d395c2ad58bd15705aa7f3cde38e5ec0266e20eb2e45761e0f55b13261d3e6b14dce60f
-DIST rust-1.58.1-x86_64-unknown-linux-musl.tar.xz 262511608 BLAKE2B f2ca664fe1ab0614f13ce9d7764eed935b107b393830ad14b64d8b05e032feeec57dd04cdc963ad3eea2cb23558beeb1975722be93412d4ff8fd3a75d2bbb896 SHA512 d064464333a64f91b8a30f267ecfe2b4dc5be6d639bc9f064efa86a54478c8de7156166236b7ff8d96bf8fc8cbbeebf7ac17d8b5dabf24d72e189dbbd8ae0819
-DIST rust-1.58.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9c58a08b4e5d609230b5aae52fe7eec2dd6a0cc0eb8c257068ac2585918aba6cbe3263a6480860d34a117d3e2ee835fc8d8b1702296369c3a4e0f660f46bd62e SHA512 6c294cbbbf22940e36278e92d5095dbfee0df741694188ef1e6df7740bbe770ffb5b2467bab12825045ebf7d6fb12eebb1ce7edbb32d0afcb114c57e814fe5d7
-DIST rust-1.59.0-aarch64-unknown-linux-gnu.tar.xz 217126920 BLAKE2B 87fd1910d76a133624ff860fd3932527b3ce3775db9e03c6d2ab9ad06534e9e63ff7d1eed0c81e3574d676c192495e0f175b2ae0fa706b722ead9a852296b3f4 SHA512 6f5b6fb325ac226bf5f308463a54f59570d9ba5efe4329d6116d79cda1f8572b2e4584d005586759ac60e1e7a10782d8ef8ebf30c980220b4780a9846895fcb0
-DIST rust-1.59.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2b75d91a060376bd0711c18b1b04f7d0c7ded0a64b0b086e7799898db7fe24ff49dc09c76695a151e54bd205aa040775c6a36d10fb21ecb2d89d23398b02dc34 SHA512 a04cb7b03e3b963002357d48ecf92d0aef20464f9da38081411832c07df0a7c9ce3755a7b89c86394933446fc18e83a55a7cc01f3739ddddb19dafcbb7b43960
-DIST rust-1.59.0-aarch64-unknown-linux-musl.tar.xz 212064268 BLAKE2B 4636001103fc058c2c14a34449846c0378c26ac4dc29588615c5216bb4759b0e92ec97be25e106a5aaaa07059f404c615272e359b0f3b1e9164437e63d863bd0 SHA512 2ec97a48cdac3fb1f7411fdf3a34aac6f64a09991d25174dff97efab0ee724d4dce2bbe29046d243a72b06d406990adf5d1f3f24286fdfb0e658326e28cf5363
-DIST rust-1.59.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 4403c9e26f21504494db6e7368cf6a1dd36fcd283dcaa2aac4efaacba107971f44aaffe032ae1cb2530bb1d29bba3e1953d80d378ca9fabf13364da27d809bbc SHA512 5c789ce4591ba8b0f09a254780e1040f5c959c3a952b89d56bf77f0a0f53be2e5f0e712878d21a060937bcda72e440e591ca206c8540635fcc180a50efef6095
-DIST rust-1.59.0-arm-unknown-linux-gnueabi.tar.xz 192892448 BLAKE2B b7d194589b9bd07c34ae681985ecc60ad03d450be9c445dff16730d8019a02e6cb1ec6b8c231f9eb42500eeb8dd6d529ff821b1b9eb64f87f11266411133e5bb SHA512 0be42a92fbbe516c0437afdf279e5bb3d43e073ec5ca3ad297f33ef5ec5e5bd150cb728c7dea5dfdcb7b1d1cf3f4122d529e8cf8abe674651a05272837769887
-DIST rust-1.59.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 844f7f3655a974821689aa326d072512a12433daa5805a842e54005b88516013b32e46c21b7813e7f5b919716e73f518195b9247c3b9e1e51e85e4f8b102b9ff SHA512 bf7b9491ff88c6d6e6f91d6b77fa50aec48cda99181aab584b37dd81a2a55564a8d769be8ce1868c02ce4dbc36e98cf7c4d651e9e7d799f907e7f9fadc27b08f
-DIST rust-1.59.0-arm-unknown-linux-gnueabihf.tar.xz 192816760 BLAKE2B 565d3ed97da64299d6c5525f3b3068ca8ced1d8d6fddbd90506a41062d66c4223928de031320aad1cb12568ccc7e952243c728e13a8a7d6a60ec8c908829e0dc SHA512 5a3693f7edf0f51ba45d8d1471c4ce75926e9cf9c4eb399c9767da116d2250121ced6f08a5c7ed136cbd144e88f3c9fccbc48f805edc82aedbdca37248c0d092
-DIST rust-1.59.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 739967abaddc05a466e4ad88316a89fafeabb3c8b50844b09a4946635f4e19b223a76675026389cdef89f0fbe369e3f5c72a0ab64f63104d2a2d5b0d12efa617 SHA512 336f8d7885dc7cc9e44a9e5df381ce1fe516fddea90666478d65aacbba2ffd2d7312b53a895b809fe0135aef8b5604b3eae7b63d7f0d37776c8c1cf6f88395f4
-DIST rust-1.59.0-armv7-unknown-linux-gnueabihf.tar.xz 199147596 BLAKE2B 767aa2429a1d1e5633e17fcdafa1a763fb6c86ce392264445be91f79f924b5f1251aae5ee01d66cc902fe991b7ed42a23345d0460862508948d37af48d49b69f SHA512 590b8252b096331b404ecf02dcc11eb12ad1a751d03791a6eb316a7b7bc546c4e933b0acf66e771d394343b636db4dfba00f467715284fa1537399e161bd2d88
-DIST rust-1.59.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 77659e1ac997fee4eb50a969e581158ea622968b6de7d02f493096b1b108bd1f32a8c89b7bf1bdfcc7f346eeb14dde31d9b791624a72966f98937398bb833e58 SHA512 a404ddb78aa0d1dc5a8724b4e5b9d46b3c25ef820d50f9039928ce39169c1f8559ed3910a127f1805d6c07671b127a2adcc111bf8af5c1ae41a6f312492ae873
-DIST rust-1.59.0-i686-unknown-linux-gnu.tar.xz 212206848 BLAKE2B 949897daa1ec6e6da986ec030fa25db019ece6a16bc2d3442dcd8255d75a97212c6c214af6755a3231370e138a72dd22155719580631e403df987e992b6de308 SHA512 b6db8bdf25e59bfb64b13abb4a1b95e186aa16e1e165a575197e37c410e64c13c2a2d098b5af3935e2b6319566447c4a05b8e8b08b30476dba9d2c7f30000508
-DIST rust-1.59.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bb0e0cc0aebab03512cb261345319a94e3c2108125a90efd169160bad0a94bb71f717d66ee6c9222d5274f82c437baf435880f38652947b1ac79ec9bd53e586f SHA512 774d622d1b7cfc28a561fc8822865727e0fca698ddca2fca006b52d2b922057619ae65d4bbb03bdb0745458a242ab8724305c5cb4fdc8886f70edfded2b4543f
-DIST rust-1.59.0-mips-unknown-linux-gnu.tar.xz 151449792 BLAKE2B 0273b6dcf35af0d85c9adb4018b8ac76bef9895f42268e9ebe086f74c95570614b1cb5927c969e6b4a8366aa7a285a19929b819bbf8977343af899a3969eba7c SHA512 9f2c9ca60cbf38ef3ac23d1df7deb86864017addb7761b94a408c096e0a67bf3666ea05f19a57f902c8cc2f3912a96c5b9b91d1c2cd5ae86596c76d30fcce08b
-DIST rust-1.59.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4a7736612612244ca535fb2056089fd9e0426410dff5c98aa44092af918d528527cc0c12a3249fa3b9a278700c7e5395c6155d28129c3c7bced7056203942fc7 SHA512 18dfd434dc628c7f11de5c5f159afea0dc37a8123f490797bc9869941676fa85920a8bc592d4cd4b505b9fb1d67e35220253d67c878b2d938211c556ae60db4e
-DIST rust-1.59.0-mips64-unknown-linux-gnuabi64.tar.xz 156962060 BLAKE2B 64c12ac24a55eaac63d9a5173ebcb1b97709280bc770f02c1ba434e57f77e56847a691f17059e421517e7d5ad60e9e3965173aff29c90abfb1b85179631301c8 SHA512 aaf0b8b2f2ee7a3584fcd9bc690f54ce32c0f6a36f2c37ca9d4a10123ddb6d4e95c9343c88dd0830aa586a5a543dbac440a6644434f8035f1c95b3f046a843fe
-DIST rust-1.59.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 2b3a3f268b6a591e6541d3cb19ca733f393cff178932d06cad8d38d4a74c9e43e9a4aaf75c78d4c8084634e7ce3c5d1cb27a6540cc5f034e940efc276c1a3d11 SHA512 020ac1f172ecf41501218c6268ca2dee37842faa7adefc4d3410531f966aef4aaf66b94cd71237467322feb90cca198fdcc8f20f29a3de8c932e747e454a5852
-DIST rust-1.59.0-mipsel-unknown-linux-gnu.tar.xz 154605640 BLAKE2B 7b3410db3f0c534012b47cd564f9c14d7a878c0c1b1079bfc2d4ea13826e097b12e5dbef2a83641a339cbcf8538a1eb8c28005c3d46e8338074ab5c15fffdaa9 SHA512 1c096bed6dcd6499ee796c64b8771696ba0cba2db1793ac681b7c65b96ccde188c84306ff90a339bf49bee10955aeb179f0915ae0613c9deeaf766956661521c
-DIST rust-1.59.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 59fb0bd7e88119d9cb71a7af46afe2e3a4f37fb687b98409e7a83e0b57840c5db3eaec8baabac6ed26989b7b1ddcda13a9d221cda75f291a814b40c722b46573 SHA512 7c6c970ff971143338a11d774d0bc2ade2fa0dff185483800a54f07161bb181648e1b700c36cc6aced25bab9a383f7259b474b83379845926cde265e705208e0
-DIST rust-1.59.0-powerpc-unknown-linux-gnu.tar.xz 170384720 BLAKE2B adc37005f83854707bfa657e5ce5a247de807bd06bde63e6f65745f376502dd36318ccaced1b6d75c3dd3558dd0bbbd7c291854337180fbb18a1647bfa521749 SHA512 046e75c9540fb493fea1cbe9b37ff10f60abe7e31134de85f0e9503b2ddaeb60a03aabf8dd7bd9f55f3d93b01b40aac7cff4f26fe01ef3e3bf5cb052b42287be
-DIST rust-1.59.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f55215329f865d3a6505fd4203170782459ab81c48b8d6bcf2c3d96ba5d4d7a9c89dfa25eb2a4897f74a168a36b7abc2363007549f7f376205a37635ffe1052e SHA512 0a886d64565227f136b3568f6ff51996a8dddc0f3121174ac1e1d53f9a58d56fc76faffe86b24e274078779521f0be03657d76790951c86efe8640510757048f
-DIST rust-1.59.0-powerpc64-unknown-linux-gnu.tar.xz 179493740 BLAKE2B 2ff97ec145bbaead0946efca8097de2a294dad0b4b9293cd768b07d37bb5f2709bbdba3a3d949f4294041b747493f931bae3adcdafb1d2ebd0a88a982e77a7ed SHA512 83f204a2d32025fa88bc627f7f2f548a19941dc8f2575dd5c912f75f556853f63cad3c3145106e264943a915d842139cf34305cfb73c6f20646a022f949e1e3a
-DIST rust-1.59.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c9bddaa104146bbc04553f2000c06ee4655583251cddd222d6b9e629d74cfd9762d3ee6de732ec1c243ba28ccbfa2ee7fbad499a46a12b5edb6a755c23d7fe02 SHA512 586b9785e8cbb6eef9a7266ac9e0cd295aac93219cde7a7c42270baab417d4d43acffedf300a43d454be3487b0f0402617e78451d2da4bdc3b2a45bae6bece0e
-DIST rust-1.59.0-powerpc64le-unknown-linux-gnu.tar.xz 189083640 BLAKE2B 209b02e4ead2cbbfe87e59d8367526b9ecdcb324898e6b8398ddd8f21f0fb89a5d68bd3bcba84bafb435a2092c2c19b81171d4631f1eadc438ff9f29f3f72af0 SHA512 443e0c509df5337ffbef7407aee5fb1260583b0a85bede2a12995bbd4b1719e2865a73d0b79e47ac96d5f53f5c79e9903a22868683a9c0251bbb7ffb09f59fb5
-DIST rust-1.59.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 68abc7aa27c59ce7f59f7a4de400ad431c568262263f17af32d8999a5b68d4ed5df067aa8f41a226277f3bccc4908fe1326eecb6142401707f90a6f73b185614 SHA512 731dd8b0f3c33cc37dc783ee07f97727e227ce1a7856f73e87a4b937f6a8ecd1d778e65f1f484faa399795d94b10623fce56d056082bcec460e15fcdea9dbfea
-DIST rust-1.59.0-riscv64gc-unknown-linux-gnu.tar.xz 182319648 BLAKE2B 4e2a86431cd0c737ef86cd2bd308c6cf42f6f908a96456de4e2ab3d42f574c56dfd73933ee0177c8d797f17c8566e66d239406360d923797fa5eb49760e698d1 SHA512 4fecc8048270026f3bf5ca63ca32a657c62282e50132cff7af168168063beb65797626ce1ffe90a929e528d8b010193b1d67cbe87782d0b30c7b4e170eba081d
-DIST rust-1.59.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 37ec085b78b9b8cb076f676168b7f26d73b593ca4d2231ded00fa3d9f74b16b1e5d99a389df594b7ac75a8f9342ea25a5efb901931662d7a9362c3c14def5e13 SHA512 29b4c934c2a773968f8acdf469b081438780a4f2d1dc460fc851587719373b2151718f4ef3af81043d4ebb39ff2dfe8f4e4612276cfa1fc1946fada57adf133f
-DIST rust-1.59.0-s390x-unknown-linux-gnu.tar.xz 186264196 BLAKE2B f1c28c8cbff8dbd476daf7a3dee443aa4d90ea3432813d247853c159f20ee2347159f734ecce4ee85e36dfa886770c841355073c2220c016feb809225f4bd50f SHA512 3e9d86c84867d1f96f4cec4e2312ae604896b4fa61b9ab5b563fafe50b4e63a1bad9ccb90770a672c7730d14dc0235b50f2ca3cbe292220eb4e48a66a8f9d924
-DIST rust-1.59.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e97d2b8e50c69311c3d7c2a4fda1f3ae6803e5f53f9a0d2787e816297ffded53ac47e8033e0d5da2d078327133b528328edc9f610483cd1c0ef384317c947f4b SHA512 9e2cc63cd784134fdee91f8603629cdb7227cf56df2a5095cc06ce38df81b6bd3ace24f319c518bbb7619c6f17fc32e9c79bf0b0f57b1db8cd81302d66435a0a
-DIST rust-1.59.0-x86_64-unknown-linux-gnu.tar.xz 151858140 BLAKE2B 80eda8c19361b286aaa6ed6178df7f93a131414f6307c87849fa902d373d072643c65642c69ef7302488e0b4ad7883ced1c589606f91edeac83843ed0f6fe124 SHA512 df080a6225275945b0c028099e19aeb0ae34ffcec952b9ce19a6116feddbb29f4f4d27ed30f2c69c108652af637329c20a0d2875d0ff98dd9f7f4902039b6740
-DIST rust-1.59.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cd4387ad25b7f000395e336cdc92916ee7260cbf98a397ce02514444c8d2b35c653012ae6a9f1d5598155c06db573e1fe1a3f0bde1693863855dc17c18b478f5 SHA512 0b6790f0aa531a8251e1a19e0adfdb16bfd39fcec40b83094c26b7169f833114cc8679e2955fcc5359b05cd67564827aa231c521f81d4c41d561e9ef44eea713
-DIST rust-1.59.0-x86_64-unknown-linux-musl.tar.xz 246630236 BLAKE2B c9fe24e92055b2e765a8d96181c7c14a0db329f98e006ea2ade285078cad64fa2ef3419d26f30339685cfbcee672bb5e263dd183c960aa0067a27a0b36fe6fbd SHA512 40a711c015fa8eb07aaa11b0698f20886928230a8441cc7523572c7c2768a52557daf5c02bdf61430dcb9a912b8eeda499794af28f269b319ca7fef848ae4cdd
-DIST rust-1.59.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 1a96c49754b8670d243d1ad43478d4df8b4f4997490fa9691e3947260d469c7dc9bab192a20fd2ee0592e15785fb059644404d77d716d86b54038d0a76feaf6e SHA512 0c67f2be31fae00a318b5a6184c60f10f80ca5275a5d9dad4459d94aef2fe65624dd7789987d506b691666ac8f7357143fa6bb8207cd5b13b28692aa909a1636
-DIST rust-1.60.0-aarch64-unknown-linux-gnu.tar.xz 225778104 BLAKE2B fafd690b1d6b161ba12f2e885e8dacd672999e34523634a2dc198363b6d46c9a5df9628052d4c76fe9c179f0d2d21eed6c9986cbf1cad0d95f42ec89edd6bcb3 SHA512 0357abc2f0e3512cbb0b113a7e80e5475ecaaa18f4713d08c1923567ba7ee35cb286e0b62ef564f56b88b183d31462743d041bc733b86c91eccaea29c9bdd61f
-DIST rust-1.60.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7ee4ca6c179fa41841b8da143582f3454073c62286043cc395611495149a097a48fd885f56ae3dd62220788cc4e235e0a2af9400797090e0e027f4133af275a4 SHA512 9059bf5cae423d0dcfaaed56f03a30c998962af3c0f84377bc3af9fed25afedb91f4dc2f40c51fa8d1360330c1a8fccba88b94f069500894fcd7b8ce7fc9b736
-DIST rust-1.60.0-aarch64-unknown-linux-musl.tar.xz 218828768 BLAKE2B b6cef5702c0bdc53cad81eb06b09213e90c1ecb89e2734b5bdbbf93969f809d5eec03f802cbaa15ddcd6b0a4a8f02b6027e232a13111a0002efac455ca42e8e7 SHA512 39de2073c1c393f4675c374b0bd7a75daa7c84e5635b9c50606da0ad7478e828120319a9fc79b534b88570a0408eb1745dbc0f7f4d15825e5f995e16752c5d10
-DIST rust-1.60.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 655bb6cccc79034f83557b1336d6052523dd25420f9b54ca746946c259026a1e9dce8b5e84d6800dfbbc423dce3413d566de45c9f3424f24330d732f3702d2b5 SHA512 ce3131c15a31eb41b6905c3197bd3989a436ea503f9285146dc1c87c1e1f5bc6a606fb3a7ee52fe564bf8196d5eb71fd8325f63a36956d1a2b29d285ff84874f
-DIST rust-1.60.0-arm-unknown-linux-gnueabi.tar.xz 199199568 BLAKE2B 9fbae45558e5b5ee6c0f025430e355ccf2c9bcf8584eb3ca763e5eccd19a9a89b5b466fbcfa0182810b2bdf764a8ece9277a7bf9b9ae1792e442b6930d769c76 SHA512 b14e1e6e3ca58840f2b44473ea7e20afe61f813c6bce7a380d97cf32d9e915a0e369ca1709b2d7207f38ccc4d19db8268412e4dc991cb23612989111677d9fac
-DIST rust-1.60.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B c79602c7ebfd8789d5c4a8800462b62104f20bfbb9cd07a62ea02faa4721c291de0cd2e877ccaa586c83efd60daaeeb9bf1b6aa0d50c9e8cbbf1e1c76beb8f8b SHA512 58ac1ceec97354aeb020bb8380c0950237052c84188259740335cac235556e7db620ac17861adb065adf4eb90f5dd67af64c7f5247fc5d965633a949eac41de2
-DIST rust-1.60.0-arm-unknown-linux-gnueabihf.tar.xz 199155728 BLAKE2B d7bb8b89acc6ae96e9dc88753e03d213456204f1e42e9142c3cf307e68c3fe9039271a87b95f2dd37255249e91239d28571b0eacfaee533c8be2f1f33ee0ed09 SHA512 8b4e8fc0824001973bb508341d10b81b5c9ca785e07be2bd9a9cd14a4337983a75dd0e224518adea717a6645a94a7af9c3a51f226acada05d98dc2ee925753c1
-DIST rust-1.60.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 3976db6e470d120b17b782eb47e8b13d019891a9ae77d0c160ab00dad266a285e72426f4918e0918817243e77f5243a1d840190611d906a259de0592e85b1eae SHA512 e363c8e0dfde0b044a3f7a3a7d9b0f589684019f4a7a81ad5d39ca40662c8b9350dffe26cd8e7f7df5b39b04cb543777e066b71b0b5da393bb2310c51720e3c9
-DIST rust-1.60.0-armv7-unknown-linux-gnueabihf.tar.xz 204846992 BLAKE2B 1781fcc2f7e079c68230154523e69d4211aac4248a09e10ff05237f67c6d82db91aa3e933d057f68a9c2adbf71be0dd91a053442e0777862f597a7202909c62c SHA512 6cc28ac4430acef8929ec9f9acfef8fa3f0c79758fdd612eb3d0e762986ae7722c3b92dd687be754453a86ecc253341efe2e517e41510bed53e539e79ad21ecf
-DIST rust-1.60.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e7adda090a966ad9a2a68b2f7ad3f1a22cee06a5ac02b5f949593e50eecc044dc13552a6299a9c0fb8383e839bb04a6ac16aecc4cc6735c2ffb91e3d244fd71d SHA512 b1a471eaba9f9a4eeb066680b78f4b02cf9d0620b2bcf4e9f07112fb6100acad7f519e149a105fced5cb0e2a91b845d3d682af53ea135af9901dac973c4c5c7b
-DIST rust-1.60.0-i686-unknown-linux-gnu.tar.xz 217159392 BLAKE2B 18321f1eeff6607eea9bc1f7de571062c3fac1a68bdfc694db8c504331119a86cf8c08f1e1ae32c855d37367bf92de70c9465404e51485d335c530dbadc90c66 SHA512 5a1e9f0d7f623af1c46884a23eb5c38927ab9a9b87c9b4f511aa727ee4bd77987358f6211f2a3c6743b01a9695f0823d443069d3020772a87c834141d73e3b05
-DIST rust-1.60.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 09068dbc9cec3164beb94d667bb359295f98578e2eb31e5fde1fafefa58831c2858dc45736aea3daaf6cf3f3620bfc40c0af3a246655618cbca2b733f73ee171 SHA512 d237bda70a0b297505d6dcf968330ac8622af77a53241de707d57f265d4762fcbf34fae329c02d2f7f18b97df843f78938f4413425d0d57183cd5bf59aae3e3d
-DIST rust-1.60.0-mips-unknown-linux-gnu.tar.xz 155895536 BLAKE2B 87fcc3fb92762e3e1e4e29eeff0c556a07b9fb36cc275cd1e74e4411e89a82d1aaf1cda7859b32696b239091758cc54f0d763b14ee1d42898cc4aa3fb37dc6ee SHA512 28e28f4cf077f93a21282756bf69c3ccae2f9e975145cb35b36bf28a3a0ffdafd1dd9c775816f20a2aec557551efc3b4a9c644cff06473fab440e65357aec1b4
-DIST rust-1.60.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 98d5e30917b86aa9bbdb2e0aaa98b19a946320f09331aa4194f1f1536148dc098aefb34646dfed7216d024db8d408901db24663e52414c1d618afc55bd12b97c SHA512 b6e98fbda5d865b8766e62ab9d21bd8d0f1a0796748b12f59988fe66db26d0df3afbc8dbd5ef312224dc81778a799dca57cd05caf4e5f1560a8ff1eb4b3243b4
-DIST rust-1.60.0-mips64-unknown-linux-gnuabi64.tar.xz 161602984 BLAKE2B dd2cd07e800b8c53fc6f0fd1d932c58c1d23776a35ac7c10df7b79d8e3c3f401bfcfd87d2740053fcf6b30e314d248ad39f1084ec35008d58676c0c1ecffd323 SHA512 2074e4823d1c4f8e2730eca07f8f5d120a1212c67c374c9aa2a167e517779709ebe6b6c33113ac6048bd2ff28c63f6086a0c458830c6cce2e27a1e1ea0e7c9fb
-DIST rust-1.60.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 75d23db39da3fda6ac1cabbab84904d9f9a7c0b3c58081f8cfd6952a6df012aba1788a5008fba6156a410b28fd9aec8eb946e24a6217d35023579b8ceb362b63 SHA512 eeca039bc3a7610d7ef8a786fc280c18314aa5c5f83b2647fd5130d89b62eeef5e3bc73d140999c0e8b4b2af2efaed27c4dcb20b21a43ccec49c79c76573a73c
-DIST rust-1.60.0-mipsel-unknown-linux-gnu.tar.xz 160546356 BLAKE2B 1e56b520727f7b6f1e2158db55638b4b8c3ce646ecfcc13a9c511defcfe3aca056ac002ea7e2d5c673594cc9b1611667b1d243766c8b53beefbee7e7f093cba4 SHA512 2c48d13fdaa1071f65796edc8193d1fb9be1a5bfb3e349a9bf5f518e02b9d8a0042c0c39ae159e914368f7150ac67b7be9fd115ef5e878bf06651a3f6760e4f5
-DIST rust-1.60.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2297dd2504735c78fcd6c7e69b1884215db06ae1fbcd31fc8b07586eba10a7f861ba16209be608e3302b3e48f9eaa748d2990fbc4cc21720b705ff67e4dad533 SHA512 2972c5ea07d7336c554a232fa7adef474fcdf1b5da8f584e200c303210d248d5acc963646e4fd7c3085fe74b96c6ed4d75607d6fe134247b7932a615b1bb15c9
-DIST rust-1.60.0-powerpc-unknown-linux-gnu.tar.xz 179198588 BLAKE2B ffb68761fce839412eb7147c44732f275e27c0e67894b41128936f1ef05e19c9120b3decab6fdb16924688799f035d0c261500651b6eacc415bf65759f246e53 SHA512 0233c9381ff27642fe76ad856af9f51257b25c6a428255dc9c1c9c9993fcc943f551244f07838541d63a99c0481d95fad3749921dbc6766378d313f49e7e1dc8
-DIST rust-1.60.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c35cb2d813e578464af34f5a3597d7a88009041c04ca32c57f0daf5953b27ee5c7ffde98da6d6ae85dda07559391c0bcbdb5c1c92d41159f8fa79d7a8d3c2345 SHA512 9fba91f8f84bd677ce44dbb3206e87308ac7337115b312904cb199caa3ebbf4d1efc53eb27da38829f5b41b6b6078309386be7f6dd8ee33f6f67e7aecd077c1f
-DIST rust-1.60.0-powerpc64-unknown-linux-gnu.tar.xz 185903604 BLAKE2B bea00626f9278c2f67ddd44dca6a7fd4931f1c3a5b76eb70a2b98717425a7f8439efc3de19d555ceba5b83e0262de77e043771e3c31cbc2a0e09264a5b607c7c SHA512 002f8ea3d25ca9c57c66fd027a903cafdec199ab8d7f63c68b1d7b8bb9607b2eb69ce98d322ebcb8476bcb8e28d292f285925b7a2f2ffe23fc45b9a626420675
-DIST rust-1.60.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 419738f90082f4ff68f6b01c0d6ef467fb856dea7320cc70b07ce569adb712673e09d632156927603e9577d6c88d0b2409c9b9e5edce0a2ad60f17b7489d346c SHA512 b060a7909ae72d7f92e0a99362c38be20ea4d2e2a68c3e502d1fcf1f667a8bf80d117e67c8ae3922dda35214b0cd091b53085603f89952c4647fced34c9d52fa
-DIST rust-1.60.0-powerpc64le-unknown-linux-gnu.tar.xz 195616532 BLAKE2B 4f69ee1719874789b309f4ff098e96848e496acc1a5c126296ecaa3b021b5fca6c7b2995ea121482d7a282c86a988c0f28275f7474f7a63e5877819e3c8a57b2 SHA512 6259fa02a62008c63874405be80f3ab7b3d8564b71d18297857cf80db417792a3215fd85e53b297823bc9dc8968d5e035a1b959671a039391616ed62bd48cbd9
-DIST rust-1.60.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 27461458d3fc0c65d25ed310269e52acb1d332411af32922a418dc32c9998653411e68daae8dee81f595b52a0176f517cb2d57ca7c438cd1cce91ad44c376b3e SHA512 6edc6ced24d85faf12000cad3d21b8da93635f88c1e6c8ab0614313f04ca466489f84e6acc3f0d35e42f9430499123cddbd48c474554fc408d50df17714a65fa
-DIST rust-1.60.0-riscv64gc-unknown-linux-gnu.tar.xz 188464956 BLAKE2B ea9fb3e59ad558b0a704a84d54f555717d4f158b1d15e3577e6411becdebb86144cd78500521fdeacf38e4301ec86db088822c19a608a8808b9a7c2172befc41 SHA512 41c12e2a0a2a4f63d8ef321e30ded7cd9fedf732699e73e7ada32590c13ead6805cee7b089858eb7ce340ad6e55d364eb700c35efbd640b126b811f27ab6e395
-DIST rust-1.60.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9dca4b3ba2949e04c94ad57e14f576bb34e1c9966c9954ebee7549a5fa6a6fba57000138128bf12f93a0cec59715cd32dde7242c363c3de265e7f95ad8fd44b9 SHA512 2601feb20c211ae55fd051225d1b1c209e40c4d23c4dc79b5d85ca0b21de833fb8432fcd45fefc1484ca5987660e6625d1a6c69cdd4d05b2f84212bca1f82611
-DIST rust-1.60.0-s390x-unknown-linux-gnu.tar.xz 187797152 BLAKE2B 5a86b4bce61d65d29769b652d030f936adf669986aba91f1cf09edcc346942acc2bfa26bd568635889e89a1059eea988eef9ad300469b416eaf87e8d97b2cd15 SHA512 6be266c6191f35c1525618e986e1725b0e8b306990deeef5cda7aff4f5999680e84597a00d4c2c38099131604f436529420ebf4515501df1328dbe3118637ae4
-DIST rust-1.60.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5460b62ec3b461ce4d92b57debfc82329ec19ce5c38ce2a72e9700e9d4da767134738148d12fbeb0d6ef74f2dbfbba132571c9a8925b007d19432eecbf57b381 SHA512 1c285460c49be405361ef5ed2dbf9f720e7a9fce4d34b16aa5b2f29afa4fcc399f252b48cb4cf05e95a57869455a31ab5237deefe4e900c03ad3dd5887e70ea9
-DIST rust-1.60.0-x86_64-unknown-linux-gnu.tar.xz 154271340 BLAKE2B 7ee48c165e6ec7a6cbc49c46bc4a7eee735988808866024de87eec2312427d939158e03e443cc537034110e640c19fc920458f8259ee022f3aa9eaa617207d55 SHA512 d27f1d78b2535f9acbd8af079b853f0590725c9f5db31ac074685f2722f0270a9f8d417abc6af8be413598315c568333e3011ea07eef9c47a5c4e328a39aee47
-DIST rust-1.60.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7454407a16e2b6c89226252c7e706086c9bb8016183df1180c54e88ec0d6622a0829d4acda959a093702bb1d95d4f2678976ced69fcc219afb42ab631e459d40 SHA512 eb3550e27e361860075a22d9b4821c6d078d7e4c82ad688a64e813adbce9922b9ab2dc64d1fd4d74d20be9af122ff05819d521677a43ad1c1092bd498d325a8a
-DIST rust-1.60.0-x86_64-unknown-linux-musl.tar.xz 258420992 BLAKE2B 6b446c06fd8d511910110eccfd55c1116f3468ffe87274d6b90c7a2a1ccd298471f62d1bfb807ddab2f66fbac58995e903414455c76fe2b14c9659f00e8413a0 SHA512 6f5a53968f44bf7be563d32eaddea439d8f388858db3d3b58a89b22cc2252e195b56b0e8895f4254c40274035e221657504958c8f1e331befca012d480118f3b
-DIST rust-1.60.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 680e7267a188a5286938d9c3284968121a7783cba196bf863affd6b927344e1a88cf7b97016d53c74560179439fc7fe9dd700a295c7c00b139472320323861cb SHA512 071efcfad0074a03de454835c512e98b466662b27bef2fb31def0bb82531b4048eba59a529621fda515800e19c4f3c62a33a364ecca8cecbaa09fae842b894b6
DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz 226403096 BLAKE2B b9927e6d364fe791bef49cea5f0904629a2f01e6a71325c1769c67b845725ae6f54a1a8c0530fa5048591dd0ecfd50a40224243f935b38ad269e35ce2e1c59d9 SHA512 1c00830f67b75eaf23ab759e8218fca48e424cad0ede02e737e341d105f6f8b8113e4d4181cde1b43f9369af9c2f238fbdcac27ccad3dd02db878e2f4e6ba35b
DIST rust-1.61.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 697df0294d01a19eca2f9b7597df3826e79ea790766c5c5a7b73f5a04919cf64f1489f34c9d2c397523432243e7f3f29f42440ba9aee127753868529196810cf SHA512 78cbc7eeb552965a1b6c4cfc9c8404017fe195acefbda1aa203d1c2ba969b3ac28388930bb4f3ca5dda7ecac5e61163ae0a5d06967eab9f0a7cada87c6b2dc58
DIST rust-1.61.0-aarch64-unknown-linux-musl.tar.xz 220966060 BLAKE2B e03c6418fed773d1028363979726648d1ffa0e04d6879688efefc15f95fbeff3ff9c0dc7c16a53fedb18c4e0b16e060cee9f3566b0f96027e5dc68820fda149f SHA512 e806f78ecc9edd12bb991533c6bfc95da30c8eaacbfc54f0f4dbf3a95a011da82fca13cf3ef23594a9d1d9d8c79c8186fe98b60658a2cd5c0ed2c6e3984468d0
@@ -190,14 +94,6 @@ DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz 155435832 BLAKE2B d5427a7380a21
DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0b4465f1afbf2f5f9135cf722632ffd7df9ef4e92c65e9ef6d4aede5b1ff392973949a6737e88685033ee571dfefe9b099d477480d7aaec2a329926a87a6f5b2 SHA512 0c8d339204a23000cdebfaee7faaa576673bd8d98111ea187f5e19f03f7231f3bbec8158c5b04d8d903877f1addeebc9f4fdc6b1de0fc0ad2995742987eafb1c
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz 254705824 BLAKE2B 8d35bbc3ffa53b52d7d7aacc51b90283d9703a40d5623c184a79195799aa3768a34942e235e2002a0b72d76110c0d66fb5ea403f9d0c81021ead52cea2a51e40 SHA512 995530319a14bd6674d5be145e777b7fd482953e62ecf672a29e2c5b4bf567e010d7db4d5c6acef1603d79135e74f21955d9fc13ed7e1c33279d05aae39bdfec
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2681d77ffb4c40305ff532f975a9e31ea72a50fa2a25661ecd721a50f081a4ab3a659b2a06500540dbf21357af098add2a4a4dec63f50d5b3ed4c041fe4b49dd SHA512 012b2cb560e0d2514eb288960e6a3703f9be9a7e611b915f07f1150645b8527fe653d3fbb795ad62c5e431cb4ca175a915710913eb2b9f2912c188d17baa0d14
-DIST rustc-1.59.0-src.tar.xz 128942756 BLAKE2B b28114f14c9a0fec7db56fde79a985360fd8438c3b14eede49ed12e540c2636be960d0fd800c569af193886ac76fe8bf604d5dae59214ae08cb0cc6cc0ca404e SHA512 acace866871d13a55d365f65d7e15c192c3cd33096862571df6317e066b7474d668b95ae281e0244967778c05f1e33966c3c55616218bd25d3770a2b2d4f0365
-DIST rustc-1.59.0-src.tar.xz.asc 801 BLAKE2B 061701c4fdbde930798f9f938ca3642204ae4a2ad9396937ca7d604268813d6d68f4979f20d35abdbbfeec0bb389acd86c9d3d84256db85861f6b11e3dbef80e SHA512 1b90bc01f9d68ba1f70591c4ae707295d7727b790d170a0b757d654684e59d3c26c45b66a21f9ac762debb6867494660c73daaf10be9bd567a38be44c0009f72
-DIST rustc-1.60.0-src.tar.xz 136183048 BLAKE2B 8030f32c21f81af6abc7a282aab1189cb7d680c6bce58c119a1beaad71a3eeb36a696eef46a22d366e2c41a2f9182a9a5aa527426f2c8db05278184c37297dd0 SHA512 d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3
-DIST rustc-1.60.0-src.tar.xz.asc 801 BLAKE2B 02a2c140e091ea6913a760daa93aa57ba6a7631d0b99867669ce68641d562d436f13ed1f1578713184f06c9307d46e19dfd7c8d74a516b04293bc65c02b90707 SHA512 8136d19d4f3f4c45249b59b689f01d4edf108535ffe1f813771bd244cde1c66184a0bde5a0acfed4fb01015812458204244bbb54e6f5fa86e9b1ef5e92e805e3
-DIST rustc-1.61.0-src.tar.xz 136696780 BLAKE2B 604299aa5c8dd7dff9802236898ca5d4fda8c54028d0aa557a6fe34c15941eb6e8c1dc5d2e172cd3680152ed1ff3fa9e58eb9b6a3b6f8f4ccccd949d810d31a7 SHA512 9bbdcc1c37f7b889be0c8d195963b4c3b65267a63ea309315eda12bd3b2cd36e0060301805dfc7da440c0a8702d085ccb0bf763155b27035a078769333637fb3
-DIST rustc-1.61.0-src.tar.xz.asc 801 BLAKE2B 46384fd77c72ecf5cd7c783655f9345e4d52718c737470548a9f3498af9cbb93c3bf618464507cd10185c39a5207fd6669c6c82841c8c82fa325001cbe659cb0 SHA512 5ea807254f0d7c207f10f1fb224101d9ae3a3c81aff16d2ba2ea4af1fe92345d1a25336b5cff0964aba9ed249e38ab9d3df41eb1217e048988093cdb46da8962
-DIST rustc-1.62.0-src.tar.xz 135644992 BLAKE2B f9133310dc951361588bdc0b631c7fc9e2187dbb6a71b4631786d68c0f9d221d12cc78f509df0a08a23beb6e647f18712db176ac62623c5b621e22281adf62c2 SHA512 02872a8409b0490fa9fa7a70756cbf103643694df6b2e2aea32ad8b70032a3162c7751cd92d78291587ee0120daeb9bc1ae5ec6136c7eb6eb584d8be3032dd3d
-DIST rustc-1.62.0-src.tar.xz.asc 801 BLAKE2B 1d9a6fcafdfc2f46b098403e36e401cc6b3834d4f7fffaa82f20a332f8843a0af10c814c3f585c6e062fd5e9fab3d231ab03cc0caa449acd1c8a9eea077c1932 SHA512 646a895d19847ab0cc1d2f85ce1643625a1785acda31d37ed9776257f8e4625b65e16e4b9f3210e816d4516633d963a0d7b520e35582366ee75059dcb2f1313f
DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b75944d47ec747d9c337cc7ba9f38dfd749415c9a00acf9d9d8743874ba1c51da7915315bd25e011eeb8a2aaa8812773850 SHA512 6f7fa855acdf20525e907a6fc8c7aa8b206603e3bcbd532d3bdce165380f0019f45dba2b2b06d20b541381accf67ca0d256fbddfcb1642a2e60e1237807d5410
DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
DIST rustc-1.63.0-src.tar.xz 136597192 BLAKE2B 52eb64ee11e7d9724a4c2654f7eea13521959ac5e04a4925eed5c89ec3661a7827146d6f9a9d05c98466bd4b74393af7bb18d9f418c785924f559833434dfe38 SHA512 0dd3cd1546bd9c1438afe0c4694e1ed80507f6b437674682c0474e13f83457e9ced4560ddeee58602e01837140f9e34a9e24c6828643dd6f613e07755af6997c
diff --git a/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch b/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch
deleted file mode 100644
index 25f1f27fcce6..000000000000
--- a/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-From 671ef2d1c228aed031b4232b8bea96f17b825263 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Mon, 23 Nov 2020 14:52:04 -0800
-Subject: [PATCH] add gentoo musl target specs
-
----
- .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++
- .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +++++++++++
- .../rustc_target/src/spec/i686_gentoo_linux_musl.rs | 11 +++++++++++
- compiler/rustc_target/src/spec/mod.rs | 8 ++++++++
- .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++
- .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +++++++++++
- .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +++++++++++
- .../rustc_target/src/spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++
- 8 files changed, 85 insertions(+)
- create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
- create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-
-diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..420fe7c
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::aarch64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "aarch64-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-new file mode 100644
-index 0000000..067e2d6
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target();
-+
-+ base.llvm_target = "armv7-gentoo-linux-musleabihf".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..1cd39cd
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::i686_unknown_linux_musl::target();
-+
-+ base.llvm_target = "i686-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index f1e8330..d8c0ba0 100644
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -490,6 +490,14 @@ macro_rules! supported_targets {
- }
-
- supported_targets! {
-+ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
-+ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf),
-+ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
-+ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
-+ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
-+ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl),
-+ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
-+
- ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
- ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
- ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
-diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..e840bb2
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..1037d82
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64le_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64le-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..a623ffe
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-new file mode 100644
-index 0000000..f330473
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::x86_64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "x86_64-gentoo-linux-musl".to_string();
-+ base.options.vendor = "gentoo".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
---
-2.29.2
-
diff --git a/dev-lang/rust/files/1.61.0-llvm_addrspacecast.patch b/dev-lang/rust/files/1.61.0-llvm_addrspacecast.patch
deleted file mode 100644
index 9f2ca6ff667b..000000000000
--- a/dev-lang/rust/files/1.61.0-llvm_addrspacecast.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 67a290460c374d5e0d18a06c798896cac0b19e59 Mon Sep 17 00:00:00 2001
-From: Fraser Cormack <fraser@codeplay.com>
-Date: Wed, 16 Mar 2022 10:14:07 +0000
-Subject: [PATCH] [VectorCombine] Insert addrspacecast when crossing address
- space boundaries
-
-We can not bitcast pointers across different address spaces. This was
-previously fixed in D89577 but then in D93229 an enhancement was added
-which peeks further through the ponter operand, opening up the
-possibility that address-space violations could be introduced.
-
-Instead of bailing as the previous fix did, simply insert an
-addrspacecast cast instruction.
-
-Reviewed By: lebedev.ri
-
-Differential Revision: https://reviews.llvm.org/D121787
-
-(cherry picked from commit 2e44b7872bc638ed884ae4aa86e38b3b47e0b65a)
----
- llvm/lib/Transforms/Vectorize/VectorCombine.cpp | 8 ++------
- .../AMDGPU/as-transition-inseltpoison.ll | 4 +---
- .../VectorCombine/AMDGPU/as-transition.ll | 4 +---
- .../VectorCombine/X86/load-inseltpoison.ll | 17 +++++++++++++++++
- 4 files changed, 21 insertions(+), 12 deletions(-)
-
-diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
-index 620d388199e0..258f6c67e54d 100644
---- a/src/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
-+++ b/src/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
-@@ -152,12 +152,7 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I) {
- Value *SrcPtr = Load->getPointerOperand()->stripPointerCasts();
- assert(isa<PointerType>(SrcPtr->getType()) && "Expected a pointer type");
-
-- // If original AS != Load's AS, we can't bitcast the original pointer and have
-- // to use Load's operand instead. Ideally we would want to strip pointer casts
-- // without changing AS, but there's no API to do that ATM.
- unsigned AS = Load->getPointerAddressSpace();
-- if (AS != SrcPtr->getType()->getPointerAddressSpace())
-- SrcPtr = Load->getPointerOperand();
-
- // We are potentially transforming byte-sized (8-bit) memory accesses, so make
- // sure we have all of our type-based constraints in place for this target.
-@@ -245,7 +240,8 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I) {
- // It is safe and potentially profitable to load a vector directly:
- // inselt undef, load Scalar, 0 --> load VecPtr
- IRBuilder<> Builder(Load);
-- Value *CastedPtr = Builder.CreateBitCast(SrcPtr, MinVecTy->getPointerTo(AS));
-+ Value *CastedPtr = Builder.CreatePointerBitCastOrAddrSpaceCast(
-+ SrcPtr, MinVecTy->getPointerTo(AS));
- Value *VecLd = Builder.CreateAlignedLoad(MinVecTy, CastedPtr, Alignment);
- VecLd = Builder.CreateShuffleVector(VecLd, Mask);
diff --git a/dev-lang/rust/files/1.61.0-llvm_selectInterleaveCount.patch b/dev-lang/rust/files/1.61.0-llvm_selectInterleaveCount.patch
deleted file mode 100644
index 71a4e8df75d8..000000000000
--- a/dev-lang/rust/files/1.61.0-llvm_selectInterleaveCount.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From fe8a27acd716a42667f5a572f52f2b04636010ff Mon Sep 17 00:00:00 2001
-From: Florian Hahn <flo@fhahn.com>
-Date: Tue, 29 Mar 2022 22:52:42 +0100
-Subject: [PATCH] [LV] Handle zero cost loops in selectInterleaveCount.
-
-In some case, like in the added test case, we can reach
-selectInterleaveCount with loops that actually have a cost of 0.
-
-Unfortunately a loop cost of 0 is also used to communicate that the cost
-has not been computed yet. To resolve the crash, bail out if the cost
-remains zero after computing it.
-
-This seems like the best option, as there are multiple code paths that
-return a cost of 0 to force a computation in selectInterleaveCount.
-Computing the cost at multiple places up front there would unnecessarily
-complicate the logic.
-
-Fixes #54413.
-
-(cherry picked from commit ecb4171dcbf1b433c9963fd605a74898303e850d)
----
- .../Transforms/Vectorize/LoopVectorize.cpp | 22 ++++----
- ...ct-interleave-count-loop-with-cost-zero.ll | 50 +++++++++++++++++++
- 2 files changed, 62 insertions(+), 10 deletions(-)
- create mode 100644 llvm/test/Transforms/LoopVectorize/X86/pr54413-select-interleave-count-loop-with-cost-zero.ll
-
-diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
-index 21c16f07e237..e1cc7946073e 100644
---- a/src/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
-+++ b/src/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
-@@ -6035,6 +6035,18 @@ unsigned LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
- !(InterleaveSmallLoopScalarReduction && HasReductions && VF.isScalar()))
- return 1;
-
-+ // If we did not calculate the cost for VF (because the user selected the VF)
-+ // then we calculate the cost of VF here.
-+ if (LoopCost == 0) {
-+ InstructionCost C = expectedCost(VF).first;
-+ assert(C.isValid() && "Expected to have chosen a VF with valid cost");
-+ LoopCost = *C.getValue();
-+
-+ // Loop body is free and there is no need for interleaving.
-+ if (LoopCost == 0)
-+ return 1;
-+ }
-+
- RegisterUsage R = calculateRegisterUsage({VF})[0];
- // We divide by these constants so assume that we have at least one
- // instruction that uses at least one register.
-@@ -6126,16 +6138,6 @@ unsigned LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
-
- assert(IC > 0 && "Interleave count must be greater than 0.");
-
-- // If we did not calculate the cost for VF (because the user selected the VF)
-- // then we calculate the cost of VF here.
-- if (LoopCost == 0) {
-- InstructionCost C = expectedCost(VF).first;
-- assert(C.isValid() && "Expected to have chosen a VF with valid cost");
-- LoopCost = *C.getValue();
-- }
--
-- assert(LoopCost && "Non-zero loop cost expected");
--
- // Interleave if we vectorized this loop and there is a reduction that could
- // benefit from interleaving.
- if (VF.isVector() && HasReductions) {
diff --git a/dev-lang/rust/files/1.61.0-miri-cow.patch b/dev-lang/rust/files/1.61.0-miri-cow.patch
deleted file mode 100644
index fc469731e4f7..000000000000
--- a/dev-lang/rust/files/1.61.0-miri-cow.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 830cc58f8a10598f4caa337ca97be51741945499 Mon Sep 17 00:00:00 2001
-From: Ralf Jung <post@ralfj.de>
-Date: Sun, 3 Apr 2022 20:00:03 -0400
-Subject: [PATCH] rustup
-
-gyakovlev: changed paths and removed irrelevant bits
----
- rust-version | 2 +-
- src/helpers.rs | 4 ++--
- src/machine.rs | 2 +-
- src/shims/env.rs | 2 +-
- src/shims/foreign_items.rs | 4 ++--
- src/shims/posix/foreign_items.rs | 2 +-
- 6 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/src/helpers.rs b/src/helpers.rs
-index 3ffb983aa..7a63bb03d 100644
---- a/src/tools/miri/src/helpers.rs
-+++ b/src/tools/miri/src/helpers.rs
-@@ -510,7 +510,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
- let this = self.eval_context_mut();
- let target = &this.tcx.sess.target;
- let target_os = &target.os;
-- let last_error = if target.families.contains(&"unix".to_owned()) {
-+ let last_error = if target.families.iter().any(|f| f == "unix") {
- this.eval_libc(match err_kind {
- ConnectionRefused => "ECONNREFUSED",
- ConnectionReset => "ECONNRESET",
-@@ -534,7 +534,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
- )
- }
- })?
-- } else if target.families.contains(&"windows".to_owned()) {
-+ } else if target.families.iter().any(|f| f == "windows") {
- // FIXME: we have to finish implementing the Windows equivalent of this.
- this.eval_windows(
- "c",
-diff --git a/src/machine.rs b/src/machine.rs
-index e9ed50724..b4b07a61a 100644
---- a/src/tools/miri/src/machine.rs
-+++ b/src/tools/miri/src/machine.rs
-@@ -227,7 +227,7 @@ impl MemoryExtra {
- pub fn init_extern_statics<'tcx, 'mir>(
- this: &mut MiriEvalContext<'mir, 'tcx>,
- ) -> InterpResult<'tcx> {
-- match this.tcx.sess.target.os.as_str() {
-+ match this.tcx.sess.target.os.as_ref() {
- "linux" => {
- // "environ"
- Self::add_extern_static(
-diff --git a/src/shims/env.rs b/src/shims/env.rs
-index c2050647a..822bef56c 100644
---- a/src/tools/miri/src/shims/env.rs
-+++ b/src/src/tools/miri/shims/env.rs
-@@ -41,7 +41,7 @@ impl<'tcx> EnvVars<'tcx> {
- mut excluded_env_vars: Vec<String>,
- forwarded_env_vars: Vec<String>,
- ) -> InterpResult<'tcx> {
-- let target_os = ecx.tcx.sess.target.os.as_str();
-+ let target_os = ecx.tcx.sess.target.os.as_ref();
- // HACK: Exclude `TERM` var to avoid terminfo trying to open the termcap file.
- // This is (a) very slow and (b) does not work on Windows.
- excluded_env_vars.push("TERM".to_owned());
-diff --git a/src/shims/foreign_items.rs b/src/shims/foreign_items.rs
-index ecffd310d..d9e4d9382 100644
---- a/src/tools/miri/src/shims/foreign_items.rs
-+++ b/src/tools/miri/src/shims/foreign_items.rs
-@@ -46,7 +46,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
- fn min_align(&self, size: u64, kind: MiriMemoryKind) -> Align {
- let this = self.eval_context_ref();
- // List taken from `libstd/sys_common/alloc.rs`.
-- let min_align = match this.tcx.sess.target.arch.as_str() {
-+ let min_align = match this.tcx.sess.target.arch.as_ref() {
- "x86" | "arm" | "mips" | "powerpc" | "powerpc64" | "asmjs" | "wasm32" => 8,
- "x86_64" | "aarch64" | "mips64" | "s390x" | "sparc64" => 16,
- arch => bug!("Unsupported target architecture: {}", arch),
-@@ -695,7 +695,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
- }
-
- // Platform-specific shims
-- _ => match this.tcx.sess.target.os.as_str() {
-+ _ => match this.tcx.sess.target.os.as_ref() {
- "linux" | "macos" => return shims::posix::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest, ret),
- "windows" => return shims::windows::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest, ret),
- target => throw_unsup_format!("the target `{}` is not supported", target),
-diff --git a/src/shims/posix/foreign_items.rs b/src/shims/posix/foreign_items.rs
-index 02fb7089c..36bf53059 100644
---- a/src/tools/miri/src/shims/posix/foreign_items.rs
-+++ b/src/tools/miri/src/shims/posix/foreign_items.rs
-@@ -462,7 +462,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
-
- // Platform-specific shims
- _ => {
-- match this.tcx.sess.target.os.as_str() {
-+ match this.tcx.sess.target.os.as_ref() {
- "linux" => return shims::posix::linux::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest, ret),
- "macos" => return shims::posix::macos::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest, ret),
- _ => unreachable!(),
diff --git a/dev-lang/rust/rust-1.59.0.ebuild b/dev-lang/rust/rust-1.59.0.ebuild
deleted file mode 100644
index c3dfac4c574d..000000000000
--- a/dev-lang/rust/rust-1.59.0.ebuild
+++ /dev/null
@@ -1,707 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 13 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-# we need to block older versions due to layout changes.
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- !<dev-lang/rust-1.47.0-r1
- !<dev-lang/rust-bin-1.47.0-r1
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- esac)
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = false
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="${RUSTFLAGS:-}"
- echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
- echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild
deleted file mode 100644
index 1dda442d1071..000000000000
--- a/dev-lang/rust/rust-1.60.0.ebuild
+++ /dev/null
@@ -1,714 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 14 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use profiler; then
- tools="\"rust-demangler\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- esac)
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- linker = "$(usex system-llvm lld rust-lld)"
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="${RUSTFLAGS:-}"
- echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
- echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
diff --git a/dev-lang/rust/rust-1.61.0-r2.ebuild b/dev-lang/rust/rust-1.61.0-r2.ebuild
deleted file mode 100644
index 263edc8ca004..000000000000
--- a/dev-lang/rust/rust-1.61.0-r2.ebuild
+++ /dev/null
@@ -1,733 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 14 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
- "${FILESDIR}"/1.61.0-llvm_selectInterleaveCount.patch
- "${FILESDIR}"/1.61.0-llvm_addrspacecast.patch
- "${FILESDIR}"/1.61.0-miri-cow.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
-
- local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use profiler; then
- tools="\"rust-demangler\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- # https://bugs.gentoo.org/732632
- if tc-is-clang; then
- local clang_slot="$(clang-major-version)"
- if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
- use_libcxx="true"
- fi
- fi
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if [[ ${use_libcxx} == true ]]; then
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- build-config = { CMAKE_VERBOSE_MAKEFILE = "ON", CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}", CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}", CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}", CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}", CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}", CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}" }
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="${RUSTFLAGS:-}"
- echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
- echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
diff --git a/dev-lang/rust/rust-1.62.0.ebuild b/dev-lang/rust/rust-1.62.0.ebuild
deleted file mode 100644
index 8da92fd3854b..000000000000
--- a/dev-lang/rust/rust-1.62.0.ebuild
+++ /dev/null
@@ -1,737 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 14 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- rls? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-bootstrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.3 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 2 1) * ${M} ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && bootstrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
-
- local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use profiler; then
- tools="\"rust-demangler\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
- if use rust-src; then
- tools="\"src\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- # https://bugs.gentoo.org/732632
- if tc-is-clang; then
- local clang_slot="$(clang-major-version)"
- if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
- use_libcxx="true"
- fi
- fi
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if [[ ${use_libcxx} == true ]]; then
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- [llvm.build-config]
- CMAKE_VERBOSE_MAKEFILE = "ON"
- CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
- CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
- CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
- [build]
- build-stage = 2
- test-stage = 2
- doc-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="${RUSTFLAGS:-}"
- echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
- echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- cat "${S}"/config.env || die
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2022-09-16 1:46 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2022-09-16 1:46 UTC (permalink / raw
To: gentoo-commits
commit: 2c761489f50460971cae332168c3d3a82bf5be8f
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 16 01:45:21 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Sep 16 01:46:01 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c761489
dev-lang/rust: fix minor qa issues
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch | 2 +-
dev-lang/rust/rust-1.63.0-r1.ebuild | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch b/dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch
index 6d53487a0bfc..fd56396d127e 100644
--- a/dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch
+++ b/dev-lang/rust/files/1.62.1-musl-dynamic-linking.patch
@@ -22,4 +22,4 @@ index 207a87ab0..8a5a43363 100644
base
}
--
-2.35.1
\ No newline at end of file
+2.35.1
diff --git a/dev-lang/rust/rust-1.63.0-r1.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
index 71c1aca5798a..b5696d6d71ab 100644
--- a/dev-lang/rust/rust-1.63.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.63.0-r1.ebuild
@@ -253,7 +253,6 @@ pkg_setup() {
fi
}
-
esetup_unwind_hack() {
# https://bugs.gentoo.org/870280
# this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2022-09-15 3:15 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2022-09-15 3:15 UTC (permalink / raw
To: gentoo-commits
commit: f36a42fed54e19b300f243f14523fc4267907426
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 03:03:41 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 03:03:41 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f36a42fe
dev-lang/rust: revbump 1.63.0, add cargo security fixes
Bug: https://bugs.gentoo.org/870166
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.63.0-CVE-2022-36113.patch | 48 ++++++++++
dev-lang/rust/files/1.63.0-CVE-2022-36114.patch | 102 +++++++++++++++++++++
.../{rust-1.63.0.ebuild => rust-1.63.0-r1.ebuild} | 2 +
3 files changed, 152 insertions(+)
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
new file mode 100644
index 000000000000..a87687dce387
--- /dev/null
+++ b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
@@ -0,0 +1,48 @@
+From 97b80919e404b0768ea31ae329c3b4da54bed05a Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Thu, 18 Aug 2022 17:17:19 +0200
+Subject: [PATCH] CVE-2022-36113: avoid unpacking .cargo-ok from the crate
+
+---
+ src/cargo/sources/registry/mod.rs | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
+
+diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+index c17b822fd0..a2863bf78a 100644
+--- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
++++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+@@ -639,6 +639,13 @@ impl<'cfg> RegistrySource<'cfg> {
+ prefix
+ )
+ }
++ // Prevent unpacking the lockfile from the crate itself.
++ if entry_path
++ .file_name()
++ .map_or(false, |p| p == PACKAGE_SOURCE_LOCK)
++ {
++ continue;
++ }
+ // Unpacking failed
+ let mut result = entry.unpack_in(parent).map_err(anyhow::Error::from);
+ if cfg!(windows) && restricted_names::is_windows_reserved_path(&entry_path) {
+@@ -654,16 +661,14 @@ impl<'cfg> RegistrySource<'cfg> {
+ .with_context(|| format!("failed to unpack entry at `{}`", entry_path.display()))?;
+ }
+
+- // The lock file is created after unpacking so we overwrite a lock file
+- // which may have been extracted from the package.
++ // Now that we've finished unpacking, create and write to the lock file to indicate that
++ // unpacking was successful.
+ let mut ok = OpenOptions::new()
+- .create(true)
++ .create_new(true)
+ .read(true)
+ .write(true)
+ .open(&path)
+ .with_context(|| format!("failed to open `{}`", path.display()))?;
+-
+- // Write to the lock file to indicate that unpacking was successful.
+ write!(ok, "ok")?;
+
+ Ok(unpack_dir.to_path_buf())
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
new file mode 100644
index 000000000000..1afbaa94138c
--- /dev/null
+++ b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
@@ -0,0 +1,102 @@
+From d1f9553c825f6d7481453be8d58d0e7f117988a7 Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Thu, 18 Aug 2022 17:45:45 +0200
+Subject: [PATCH] CVE-2022-36114: limit the maximum unpacked size of a crate to
+ 512MB
+
+This gives users of custom registries the same protections, using the
+same size limit that crates.io uses.
+
+`LimitErrorReader` code copied from crates.io.
+---
+ src/cargo/sources/registry/mod.rs | 6 +++++-
+ src/cargo/util/io.rs | 27 +++++++++++++++++++++++++++
+ src/cargo/util/mod.rs | 2 ++
+ 3 files changed, 34 insertions(+), 1 deletion(-)
+ create mode 100644 src/cargo/util/io.rs
+gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
+
+diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+index a2863bf78a..c9c414e500 100644
+--- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
++++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+@@ -182,7 +182,9 @@ use crate::util::hex;
+ use crate::util::interning::InternedString;
+ use crate::util::into_url::IntoUrl;
+ use crate::util::network::PollExt;
+-use crate::util::{restricted_names, CargoResult, Config, Filesystem, OptVersionReq};
++use crate::util::{
++ restricted_names, CargoResult, Config, Filesystem, LimitErrorReader, OptVersionReq,
++};
+
+ const PACKAGE_SOURCE_LOCK: &str = ".cargo-ok";
+ pub const CRATES_IO_INDEX: &str = "https://github.com/rust-lang/crates.io-index";
+@@ -194,6 +196,7 @@ const VERSION_TEMPLATE: &str = "{version}";
+ const PREFIX_TEMPLATE: &str = "{prefix}";
+ const LOWER_PREFIX_TEMPLATE: &str = "{lowerprefix}";
+ const CHECKSUM_TEMPLATE: &str = "{sha256-checksum}";
++const MAX_UNPACK_SIZE: u64 = 512 * 1024 * 1024;
+
+ /// A "source" for a local (see `local::LocalRegistry`) or remote (see
+ /// `remote::RemoteRegistry`) registry.
+@@ -615,6 +618,7 @@ impl<'cfg> RegistrySource<'cfg> {
+ }
+ }
+ let gz = GzDecoder::new(tarball);
++ let gz = LimitErrorReader::new(gz, MAX_UNPACK_SIZE);
+ let mut tar = Archive::new(gz);
+ let prefix = unpack_dir.file_name().unwrap();
+ let parent = unpack_dir.parent().unwrap();
+diff --git a/src/tools/cargo/src/cargo/util/io.rs b/src/tools/cargo/src/cargo/util/io.rs
+new file mode 100644
+index 0000000000..f62672db03
+--- /dev/null
++++ b/src/tools/cargo/src/cargo/util/io.rs
+@@ -0,0 +1,27 @@
++use std::io::{self, Read, Take};
++
++#[derive(Debug)]
++pub struct LimitErrorReader<R> {
++ inner: Take<R>,
++}
++
++impl<R: Read> LimitErrorReader<R> {
++ pub fn new(r: R, limit: u64) -> LimitErrorReader<R> {
++ LimitErrorReader {
++ inner: r.take(limit),
++ }
++ }
++}
++
++impl<R: Read> Read for LimitErrorReader<R> {
++ fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
++ match self.inner.read(buf) {
++ Ok(0) if self.inner.limit() == 0 => Err(io::Error::new(
++ io::ErrorKind::Other,
++ "maximum limit reached when reading",
++ )),
++ e => e,
++ }
++ }
++}
++
+diff --git a/src/tools/cargo/src/cargo/util/mod.rs b/src/tools/cargo/src/cargo/util/mod.rs
+index 28f685c209..47bbf37aad 100644
+--- a/src/tools/cargo/src/cargo/util/mod.rs
++++ b/src/tools/cargo/src/cargo/util/mod.rs
+@@ -14,6 +14,7 @@ pub use self::hasher::StableHasher;
+ pub use self::hex::{hash_u64, short_hash, to_hex};
+ pub use self::into_url::IntoUrl;
+ pub use self::into_url_with_base::IntoUrlWithBase;
++pub(crate) use self::io::LimitErrorReader;
+ pub use self::lev_distance::{closest, closest_msg, lev_distance};
+ pub use self::lockserver::{LockServer, LockServerClient, LockServerStarted};
+ pub use self::progress::{Progress, ProgressStyle};
+@@ -44,6 +45,7 @@ pub mod important_paths;
+ pub mod interning;
+ pub mod into_url;
+ mod into_url_with_base;
++mod io;
+ pub mod job;
+ pub mod lev_distance;
+ mod lockserver;
diff --git a/dev-lang/rust/rust-1.63.0.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
similarity index 99%
rename from dev-lang/rust/rust-1.63.0.ebuild
rename to dev-lang/rust/rust-1.63.0-r1.ebuild
index 900816d560ac..6031ffd57528 100644
--- a/dev-lang/rust/rust-1.63.0.ebuild
+++ b/dev-lang/rust/rust-1.63.0-r1.ebuild
@@ -164,6 +164,8 @@ PATCHES=(
"${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
"${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.63.0-CVE-2022-36113.patch
+ "${FILESDIR}"/1.63.0-CVE-2022-36114.patch
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2021-12-06 22:42 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2021-12-06 22:42 UTC (permalink / raw
To: gentoo-commits
commit: 08f542e4b9841263737647f59cecf85b4ef2bbd2
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 6 22:40:51 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Dec 6 22:41:46 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08f542e4
dev-lang/rust: add 1.57.0, unkeyworded for testing
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 34 ++
dev-lang/rust/files/1.57.0-selfbootstrap.patch | 56 ++
dev-lang/rust/rust-1.57.0.ebuild | 687 +++++++++++++++++++++++++
3 files changed, 777 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index b029d642ad79..ffac107479d8 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -158,6 +158,38 @@ DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz 139040728 BLAKE2B 1d7905411b556
DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d454086c93147737c7c144af288394512528e4ce759dc221d7371b62724857fe16e391949b5b4dac436bdcaef8bf817f577e8d951e1f4bae098d687b4a7bdbb5 SHA512 b175e3ddefd036fce29c80c65a86565583167f7859f0941dee6718fd71baa8596f1788a6bed5d992096959e1deda98dc9c10e8cbc896114b7938a05951c29f02
DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz 267291288 BLAKE2B b96e8fa1c8d2e55c07781db37ddd33ec7180cde29c84f5020f2ba0fbf6aa83f9db32723e191c15df765f965d1314a57d12d80e73d20deaab1333afca65bdfac7 SHA512 6fb700d5d17c084fa520b29f3012ac565eaf891705a27c7738a61bb9899bc952f679987ef3790875b5a7adae836c602b394c7e19103f30bbdf5ec82cf3e86567
DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 5ccf03518eae6406ff66bff108b26988a6a859e5cf88ca44327f9826d880ea26d6e115fb3e63f6a40d1cb15adc25d6f1c056438466095b7223269fb0d74540fe SHA512 8d84a976d9922d28a5ddac0f47258759a4c7542df02fb9ffede4a3e98ceecc6415229f3eb676a22536ffff842c6e7ee35d50d1507f2d818301493ee3a7db9bb5
+DIST rust-1.56.0-aarch64-unknown-linux-gnu.tar.xz 223490136 BLAKE2B 29085e44fbc7337a11d396e452e53c43c0ea2ef53d2bfd6e294c837f890ce4400e9274705764ab40680226010ab502798131b1d717d7a4a1cc590313ec65f8d2 SHA512 858a28c6d74848bed5e731cd785995b095b78375d6b10834b2cca97778d571a9bed2bc2104a924d099297eebe91f9e829d7558acba0a46b31d7cfffad520bc44
+DIST rust-1.56.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7b6bd9c532801b1759524007ea1aa7037303a94cc0571cc3265f4be867d4f69d5a3c732598db01c43716ceaa19717c418ca7d5df6ca030ef014618b849cf72e4 SHA512 d8d05fc573f93a7063bbe54a6785305171b096b8348a44b0e72753a5500d97cd1b903394c0e8fea601e33892592cda6dc667285bb095e4d4fe0c4fff8cf12b46
+DIST rust-1.56.0-aarch64-unknown-linux-musl.tar.xz 219878296 BLAKE2B 5f7b0670820f2ecf8499c47d5731ec371234be923dad2abd261cbb4cb6da39d27a813d7ceaef22aa75f9ffce3067500e6f02c157a517951a0377073847919a6b SHA512 9a1445794558352005921c92d64a454b3270a1052dbd6dc1ff5e407057403b232dea5183920459fd2c9a6f22423c28af60b427c2edcd3f19565e036f918570fa
+DIST rust-1.56.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B fbab4bc200ec56df82cceb8511d5e11c94a64cf2202eac7fd9eb32857ef4f7acd441482ebaea24fa04d4df6709f14852d937b6b62e500609f678044507f3ce68 SHA512 796365d5bbff1f39b46df8353a0ce282c368e649569a202c50e13e1bdf8e280630d38630a752f18dc8da545561675fd5112cefac207cd98adfaf556029514d5d
+DIST rust-1.56.0-arm-unknown-linux-gnueabi.tar.xz 202166060 BLAKE2B 1e73ce9ad86bc9f4f7a920a822829ce12c991e763f09cfdf16d1118ca16ba8f8ef217232eae303fdcfa0eccf5b913b80f771d8236a2fc0bcefa9c9e30f5cb92e SHA512 31ba5c7a8aca7f42789b606775145ef776d03a5b06c46e4336aabdd38f92633e2bc206ad74c28676c52387dd979acf742f56ea49c3de8bab868c98f18242e8b9
+DIST rust-1.56.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B ee433953b9fc732f1e8606b4070d379dfe373b94b702316f10ae5d0802baa7bd6ed19d01c6a4eeb206066a6cfbab7329f76c175c7b76023adacef030ad666f80 SHA512 d64bc0635f9d87323cbce77dfa779a3d360df76ca161cd4b175e5aa63e2a4cfe1c8609b38d678d7ef8bccc011326bc4851dd81b55836223ff84fb85e29cc6364
+DIST rust-1.56.0-arm-unknown-linux-gnueabihf.tar.xz 198940944 BLAKE2B 651932afcf232292611b20ca43a034e2b54060a15b6c4bf0c37c40b2864e59d9ef3ad865cc6a0729b02de34abe23a09e758029860d3d196080fef43268fd2546 SHA512 6e5edb3df13fcd0b4501e78ae55d2b62bca2c696e938f3e913cd15dd1e3fa802bbc813fbe5696cf5bfecf1e9fed99e6c83b23be423a467b084f6f66cf08646cb
+DIST rust-1.56.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 94363ce80bc31d867583484eab662c3a3012019c9e90205959b71df6a8893a92524673246e1c1831b3a228fc75233184bdcea13cb28ed1dafb3b8a0764fc8161 SHA512 2eff4a8d702c88a1e283139a9a435d845a1ba30fd2f2857f8c19c0d19fc94698ad6b6ac87be0b1d3ca4a78a6ad658bc57357c9c84e8983505dc29d080a4041f1
+DIST rust-1.56.0-armv7-unknown-linux-gnueabihf.tar.xz 204645860 BLAKE2B 4d1bcbb704954aa09fe89d0e2d15e886dc5e25c91c24a2239caeae228ebeb94fa40ccd7bacdf67a3b9ecb5aa0cb5b1d54306642d879591675380496142699acc SHA512 952edc69bd1747bcb711ea81c58c580b8b2128722edf851cb0a20e6b85674e9bba0e234e6eacd5e3052480a72d896f2792f1a281ed8e99b23dfe1c51b467e3dd
+DIST rust-1.56.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B be71c4cc8ee6e64e8850cf4c95b6f34c115fc1bfb62890c7f1794a229656fc3be1b54321db1174e7804540ca307360c49d07e45e418bd0ce7e1b1db20bb83da8 SHA512 2e9b2d38beb4199062f87c40875622ea2d914023d0fae2cd631db5f04b423c868089084e8731c3260a180d2d5aed531714ddd3c383f06703cae720942c90ef6f
+DIST rust-1.56.0-i686-unknown-linux-gnu.tar.xz 215611688 BLAKE2B 759781d0e5771cf058eb47ef6f5aa2cf5bc2c692d71ddad6bccf37af62a587cb38f70d23c7ba2ba0bdc07635b6516d2ed63a99497bdd03433bdab16a611e46aa SHA512 6e19d19ec3aa00262c90e66a7be46805b36601f8e13ff3b026479c589965c6006d045c92bc56a063fb284e830220af1124a80df1a2e7850bdfe1cc0fdd149f3b
+DIST rust-1.56.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c416bfa472174a38631022988de8b6294585a797b764766a9547564e5099f9fe24d46f27d734eb81c82156ccd135fd60c97aa9e13f69dc2a84b9a8554407ebaa SHA512 04a040802634f42fd2d9ea62a26b89d10c44426eb7f00ea4532859903fa89c7dec6dbe37fc572b6986653fb862236ca0d48be87c6febc7983a670c452c145ac5
+DIST rust-1.56.0-mips-unknown-linux-gnu.tar.xz 160762656 BLAKE2B 74a98ca534020c1beea16ed0aae5d55087e52e80743ecb5d4e23861cfa3e39c9f3eb216c948095f76be25a5fe89c47f2e1c7354b5b4f56acdd3532ae3874ee49 SHA512 a6e33f557faa842f3c5fd49223216516c012d4af9b3c5efb3f53778a38f02138e1b522b98ec91bfe523f507ebc932f6966d329f23b36fad6a3d105d4020bce3b
+DIST rust-1.56.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fd9cf1b07e64c4196e25c023dbd7b5dd9ecc346c3590f8dd4e5d3ed3b03b6b04da90a8549178eed0db0cee2acd5efa4be300da6907cdfa5424acc52ed047696b SHA512 a7278ed6ffa56025257c70e77f5dff3aabed699282e05b01f7f3eba8ca1a813f43f0ee07357518dde78df11fd3600cfd6dbc45757a20850694a0bdd2c079cd20
+DIST rust-1.56.0-mips64-unknown-linux-gnuabi64.tar.xz 165953860 BLAKE2B f02278555bbc3c8169bb4dff02383b8736fea8ca8dbf395aae5d62a10c0a9e25088d1d56b7d6b0fba6d4384f988f55d1d82153ec0038bbef0044fc8316cb7786 SHA512 fec707ddb8ee51700716ec6283f3ecdb910f7ddbd8ad4fef7882595afe5b55b1c8f862240172ed20cc8e07bc8db9682184fcc10ad58d2ef7e4eddb3e54a14dc3
+DIST rust-1.56.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B a1509f1799555bc84ba43eafff55c4e6e62821c3eef27280682210823cfafb627ec28d0b3faf1cf624f88c9bd2e83af1438b8659acdf3d33413d7e95a2271a53 SHA512 6a39541d53229f432090a1304797c1f2c2d203c72ee266a07e408907ed56a1dba15f644a074235dd56058f77bafeb27bde32087546db2a86b64a65bc7bbbd41d
+DIST rust-1.56.0-mipsel-unknown-linux-gnu.tar.xz 164590680 BLAKE2B a5c7c7e1ecb0a6cb079677b1a72c17fb0b141588a6003ec5ad01c54ecfc2d5e1f928246f978e7606b166e8a60c2defa375287931e04fb28da341037cd226040c SHA512 3b05f8f0e624e75608f94cb51be5c032b7ad56c9ee99220cac73a7f8f6c40cc35c3b5f846c2c930398eabdff2622c1d447720063b831006615c1ec4d2c25e01a
+DIST rust-1.56.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5ef21a9b209ec1b88df8cde1444bb5704656d3b435b1a4749ab65a13d0352392030c4ab4b59d71c2c03e554136c55fe44614b65d09fea644b7de572d357ccfdf SHA512 fd9efde43ae9d3427a56cab3128481733e0ee51d14365b8b5e65dbb5173bb11a564a4fdf68ad23ec443ab3371267399aba3ba704f3da41ded038a2d2ee898b46
+DIST rust-1.56.0-powerpc-unknown-linux-gnu.tar.xz 172592208 BLAKE2B 54016cd5f94e2fdba36329e5af7eb161de0485adc4f0e7b7933694bceffde8b101fc778880eb66156851f38cee66303b24095a6928f668d08bcba4277e2f6e92 SHA512 dd5e5a0f073c3de04a605cdfadb19538884ce1a715946e60fdc85408fa09a45d230eb3141ad999c5edb469a789151d5e6c7565743e162f7ce9add99021cb32ec
+DIST rust-1.56.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 56f2c613dcf42d969da0734f7c5d6d544d1a2883b4435e941c0779f9406c9b02a9eb8eeb4d8393cf7abc389ba2df78f05b78dad56848c24df1023971101a9a92 SHA512 a5a933921e9670b3b55a9ffb01d8eb5b7520a7e73bec987a161a7f37d07f9024266566a7059b47592e66f6c1926934ef2306b1e7283e88329e68a124255f07d5
+DIST rust-1.56.0-powerpc64-unknown-linux-gnu.tar.xz 186235644 BLAKE2B 13754e77299dd432adba0773586910a215a8916399ea827a6b5ab5d8866b731ec0af2a0772a8ef83ad897c491add7c513c4f3f06c41c61bd600f2ff742610b3e SHA512 1ad3c1b7da0cb4a697c8bbe8a0580a3a8f01e1a8e415b75ab4798f5425098855ca9c95ec636a36e796d919464f3ed3ca651e8d3811f3adb9b040976422fecaab
+DIST rust-1.56.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 62277bf7ee93ff6ad847cd9c69e89a2bd58f31efd235eafc7c4814c2e465ec24390c4a9fd99fc2c4c53fd994be159720b03ee169486f0c7af31da50b91cec2b0 SHA512 fab2896c285dd6641b5a7e6c8d1a9e96c084b65fe05cb519cc20abef7d5d42dfc0aaa2c61c137c89db26d0701fd4b32dee6453e98651f98b2d63ee34c8627dcd
+DIST rust-1.56.0-powerpc64le-unknown-linux-gnu.tar.xz 195350800 BLAKE2B 2ceeb04ae5a5482ee3908f07dc50e306426fac09aaab154c6235392ca9e403ed36f492dbf23b3f6172e964d2ce7360fc0d19f345ea39cc28874d812e21e22b8f SHA512 bcddee74d0c7c52e7ec17b4b808b0caca764bd6f4ce6235cceed5c93983673c768981cd8403b2a7cb993eb5055625af2679c8635955d4765acd871643eabb6b4
+DIST rust-1.56.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e4085f8f853cfd50e44b0bb8ca70a73fe2cb14827261aef40c98fe399ed2aaee9d29acaabe2d85d51d77ec1ccf6eeb263aba1042c4e06c2b0ff7539ace11368c SHA512 6d21afed2e7eebc11d1713774feb662abaf84d1ad524edd506efb0910654b84828017db6c07248156514a37c176dde48088cf387aebccf6476ecdbdfc961c0dd
+DIST rust-1.56.0-riscv64gc-unknown-linux-gnu.tar.xz 192792856 BLAKE2B 85af51b16ef1f749b1903cf98d4cb5d92d26bb17d5b5c2d493862feb8d21316a2d4aad73f3f9c8e2ef1436544a592d8a8378f3671c4c099b39e6e24f597bd4ba SHA512 ff9959be93e6d4049030d9e07fe6dc8be67fc635698ac37630b0cd8e1e446e6909879a4aaac4b0b08b93dcc2ce7650986d961ae1001fb683b235efc101b7e470
+DIST rust-1.56.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B da4e11a82df51283edc6066d5a54b1f2c5937e1f8a9e45ecc10d1509a7377c630a63c141b413123b01d6df67c0be6c63b0017bfae20b13c654d3a5de98981410 SHA512 2fa854448aa07f2c23bfc6145bab5973e73f0c444dbde8f0f823b6a843f2125773115fd91660906e7dbede25d44bee2ae3873d299ebf75a8123c618afd07fb4d
+DIST rust-1.56.0-s390x-unknown-linux-gnu.tar.xz 194222748 BLAKE2B 4cc8ac554f85ccf0963da9935da46d51640f37346fec2486fea50afabdd881c331c54af6ea15ef76a53d850dc9cbd8cfab8f4125b4749045d985393ead77b1b9 SHA512 8b00ed11f12604c377cafe7c206f8db10980a4c73bfe4b4d1d628ca6fcbb3df0553decd89a9ef775c06e62f446b817d4d51ed7b55bba5f1826e9d384fca7a26d
+DIST rust-1.56.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 443228e6dc0fcf1da9a33a89938710efef0881f835daa2af1b7593e32f90403992b752bcaa321d5241f233faee3773f205a9afa44f12b59978cc84c261b85ba6 SHA512 608a7062e93e7ada52fe9688f2efe1e3caa4d768f0e7be31cf47b8665a8dc550e9287d339da6712366cb68a14868e07e5b68c4a25b86c2bac1fe738f77815b3f
+DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz 147894784 BLAKE2B 6cbdb8a82aba4715d07c41497443a90cbe2bbed32ca95b3a8ca4bfd048334f1158b30f221bdec10bbef2d07344e8a35d4320ba8b991006263a6b764932cdc7e4 SHA512 bfc3a7493c208b35b42f40867286a6b3d97bda1c45983379d4223df31291e046a1214df1f88df2cb6558cafd8912cb8f0bab99a45899321b128e729ad03b9493
+DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e0ed39db46b40631f69fa379a04ec37ba314587a4f081aa1f3251e01b7221ee8732b668cfcc4c24c1a3950f3f8dcfd542a1a73c603cea545b812d5d3a9527055 SHA512 3e9d0b159684a496e29c9e40af11f16f5ef5cadd8bc4852018a953310e77a4e29db6c14ffcc86198908aa4998550c83cfd3f2cc42e007122d56167d664776c44
+DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz 255010720 BLAKE2B 286e91cbf001de6f888bd82139e6711b32f03d45c599f26b01f60222d98c3521a1933b3b9b7f8c46fa79d481780dc8dc47e5e24985b721a6998d620b446c38b4 SHA512 fb5a914a25ef3cb39393207a75c40f1313740167062feb4cda4084e738f4e93a51624a8a9591acc18553cfd6e2e232984c8c84acc3dfd77fbe38b17085850881
+DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B bb7cfc775c1c44569276e687028e9a7ffac31577310052d9c354179a541ee13b0ca00a025e994e03ab17086d0abe6dda6845ed1cb10879425439c7651bdc9269 SHA512 cb23d98cfb1b59fcccaec575145b6f38846f3f49b16a3be199b06d6198b1db13720157ca65a01f6ef76abf742507bba39776d130f0fd03aa228acf5917457f7d
DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c
DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3
DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24
@@ -170,3 +202,5 @@ DIST rustc-1.56.0-src.tar.xz 121802340 BLAKE2B aa471fd0785d6ceb75d4b661d466a450c
DIST rustc-1.56.0-src.tar.xz.asc 801 BLAKE2B 75bd829e457b6cefb2fcdfd04ef835487c295420d9d9c8fd7af800b405fe1113c14be01ad3540fea7ed7c743397e337ce1d3b0e757c73292d7f342f352e89791 SHA512 e81cf3d8b1c97803138d4487c32c1463526d53513112b4fa170a81ba947280613fb3260b43d0629a45c859519ea094e467ce0cc0def722577febc3cc34ce5ed8
DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929dbf64276f7eb57195d8c33e6c80f13c903432ff77d8834093ab551677618fb1d385f2300e2b1b4c064f9c245c696be32 SHA512 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f
DIST rustc-1.56.1-src.tar.xz.asc 801 BLAKE2B 70ed1c26971e864aa6cc9b05eb52c4a140d0d0cccb3ff66d4a13e1b1dbac958c5369f76524c4702311566ed26aff635f5e3d35d9da71d96e070f5f0e978dc2ba SHA512 f997e7962ef8b283c19c97d8b898f3642f1a58c89a9cc5470cf88682263a42e2054d670c12bf93c41e81edf8324a5b51453f402a74bccb7744c7f463cf689aa8
+DIST rustc-1.57.0-src.tar.xz 122681768 BLAKE2B 739fe2c34b01bb0c6beeb7717badeb2ba12f00b91831977bf0d8782d806071f8ed696e94bf51d53509ae6e5c5773544b2dcf4187e81682c2f765d0975c64ca7d SHA512 7903bcfc7c1db208da5d5991bd5b7f55dbe5917d4814274a8badf0d3b767211e81f8626c355ea93142f236abf116d5921c0b542ef309fbe84ece1ce84e5af30f
+DIST rustc-1.57.0-src.tar.xz.asc 801 BLAKE2B e5c2e91999d8d2bcb5be36ddc8559a59fc53445f639bd179239489f9fd2a2f00f2191cdbb2000b73866fbb332b51be090e95e348a3573676dc24e00cdbb071fa SHA512 fcf1393a1be3c585447e08078b804e7ffcddcb47d87877c13526592e317b889b15ad1786baef5d6adf020631a6773a9dd31c04779f475a528b28871920a4641f
diff --git a/dev-lang/rust/files/1.57.0-selfbootstrap.patch b/dev-lang/rust/files/1.57.0-selfbootstrap.patch
new file mode 100644
index 000000000000..e30d0ee0e482
--- /dev/null
+++ b/dev-lang/rust/files/1.57.0-selfbootstrap.patch
@@ -0,0 +1,56 @@
+From aca8bcb48feca8c87b9af4e440835992d3f6d470 Mon Sep 17 00:00:00 2001
+From: Pietro Albini <pietro.albini@ferrous-systems.com>
+Date: Tue, 19 Oct 2021 09:29:19 +0200
+Subject: [PATCH] remove "field is never read" warning
+
+---
+ src/bootstrap/lib.rs | 1 -
+ src/bootstrap/metadata.rs | 3 +--
+ src/tools/bump-stage0/src/main.rs | 1 -
+ 3 files changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 2d4e152789724..3b3c8a9227d95 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -277,7 +277,6 @@ pub struct Build {
+ struct Crate {
+ name: Interned<String>,
+ deps: HashSet<Interned<String>>,
+- id: String,
+ path: PathBuf,
+ }
+
+diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
+index a38391c7b88f2..65e229697dc87 100644
+--- a/src/bootstrap/metadata.rs
++++ b/src/bootstrap/metadata.rs
+@@ -14,7 +14,6 @@ struct Output {
+
+ #[derive(Deserialize)]
+ struct Package {
+- id: String,
+ name: String,
+ source: Option<String>,
+ manifest_path: String,
+@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
+ .filter(|dep| dep.source.is_none())
+ .map(|dep| INTERNER.intern_string(dep.name))
+ .collect();
+- build.crates.insert(name, Crate { name, id: package.id, deps, path });
++ build.crates.insert(name, Crate { name, deps, path });
+ }
+ }
+ }
+diff --git a/src/tools/bump-stage0/src/main.rs b/src/tools/bump-stage0/src/main.rs
+index 96d3c87384331..d6364e28fef97 100644
+--- a/src/tools/bump-stage0/src/main.rs
++++ b/src/tools/bump-stage0/src/main.rs
+@@ -196,7 +196,6 @@ struct ManifestPackage {
+
+ #[derive(Debug, serde::Deserialize)]
+ struct ManifestTargetPackage {
+- available: bool,
+ url: Option<String>,
+ hash: Option<String>,
+ xz_url: Option<String>,
diff --git a/dev-lang/rust/rust-1.57.0.ebuild b/dev-lang/rust/rust-1.57.0.ebuild
new file mode 100644
index 000000000000..26f160d3fd92
--- /dev/null
+++ b/dev-lang/rust/rust-1.57.0.ebuild
@@ -0,0 +1,687 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 13 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+ wasm? ( sys-devel/lld )
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( app-crypt/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+# we need to block older versions due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rls? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warnings
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.57.0-selfbootstrap.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+bootstrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=4096
+ # multiply requirements by 1.5 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use miri; then
+ tools="\"miri\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+ if use rust-src; then
+ tools="\"src\",$tools"
+ fi
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ doc-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = false
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ compression-formats = ["gz"]
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- _EOF_ >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ _EOF_
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ar = "${cross_toolchain}-ar"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="${RUSTFLAGS:-}"
+ echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}"
+ echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}"
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ cat "${S}"/config.env || die
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ # we need \n IFS to have config.env with spaces loaded properly. #734018
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ )
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2021-08-09 19:03 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2021-08-09 19:03 UTC (permalink / raw
To: gentoo-commits
commit: f4f70ee1505995aa065f5355ca65db203e32d894
Author: Miezhiko <Miezhiko <AT> gmail <DOT> com>
AuthorDate: Mon Aug 9 06:21:20 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Aug 9 19:03:22 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4f70ee1
dev-lang/rust: port fix for compile fault with +parallel +miri
https://github.com/rust-lang/rust/issues/87623
Closes: https://github.com/gentoo/gentoo/pull/21923
Signed-off-by: Miezhiko <Miezhiko <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.54.0-parallel-miri.patch | 43 ++++++++++++++++++++++++++
dev-lang/rust/rust-1.54.0.ebuild | 1 +
2 files changed, 44 insertions(+)
diff --git a/dev-lang/rust/files/1.54.0-parallel-miri.patch b/dev-lang/rust/files/1.54.0-parallel-miri.patch
new file mode 100644
index 00000000000..68239d98d37
--- /dev/null
+++ b/dev-lang/rust/files/1.54.0-parallel-miri.patch
@@ -0,0 +1,43 @@
+From a789b49e4c0e7d742cc39713484596293d844537 Mon Sep 17 00:00:00 2001
+From: hyd-dev <yd-huang@outlook.com>
+Date: Fri, 30 Jul 2021 21:28:34 +0800
+Subject: [PATCH] Use `Lrc` instead of `Rc` in `MiriCompilerCalls::config()`
+
+---
+ src/bin/miri.rs | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs
+index 5a8f07263..18c393815 100644
+--- a/src/tools/miri/src/bin/miri.rs
++++ b/src/tools/miri/src/bin/miri.rs
+@@ -1,5 +1,6 @@
+ #![feature(rustc_private, bool_to_option, stmt_expr_attributes)]
+
++extern crate rustc_data_structures;
+ extern crate rustc_driver;
+ extern crate rustc_errors;
+ extern crate rustc_hir;
+@@ -12,12 +13,12 @@ use std::convert::TryFrom;
+ use std::env;
+ use std::num::NonZeroU64;
+ use std::path::PathBuf;
+-use std::rc::Rc;
+ use std::str::FromStr;
+
+ use hex::FromHexError;
+ use log::debug;
+
++use rustc_data_structures::sync::Lrc;
+ use rustc_driver::Compilation;
+ use rustc_errors::emitter::{ColorConfig, HumanReadableErrorType};
+ use rustc_hir::{self as hir, def_id::LOCAL_CRATE, Node};
+@@ -42,7 +43,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
+ // HACK: rustc will emit "crate ... required to be available in rlib format, but
+ // was not found in this form" errors once we use `tcx.dependency_formats()` if
+ // there's no rlib provided, so setting a dummy path here to workaround those errors.
+- Rc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
++ Lrc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
+ crate_source
+ };
+ });
diff --git a/dev-lang/rust/rust-1.54.0.ebuild b/dev-lang/rust/rust-1.54.0.ebuild
index 8a51162e0f9..40f81de58ea 100644
--- a/dev-lang/rust/rust-1.54.0.ebuild
+++ b/dev-lang/rust/rust-1.54.0.ebuild
@@ -149,6 +149,7 @@ PATCHES=(
"${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
"${FILESDIR}"/1.53.0-rustversion-1.0.5.patch # https://github.com/rust-lang/rust/pull/86425
+ "${FILESDIR}"/1.54.0-parallel-miri.patch # https://github.com/rust-lang/miri/pull/1863
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2021-06-18 9:16 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2021-06-18 9:16 UTC (permalink / raw
To: gentoo-commits
commit: 895e90ff6caf38ed0625ca12feb4f7230794947e
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 18 08:34:35 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Jun 18 09:14:03 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=895e90ff
dev-lang/rust: add miri patch to 1.53.0
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.53.0-miri-vergen.patch | 53 ++++++++++++++++++++++++++++
dev-lang/rust/rust-1.53.0.ebuild | 1 +
2 files changed, 54 insertions(+)
diff --git a/dev-lang/rust/files/1.53.0-miri-vergen.patch b/dev-lang/rust/files/1.53.0-miri-vergen.patch
new file mode 100644
index 00000000000..347f147c994
--- /dev/null
+++ b/dev-lang/rust/files/1.53.0-miri-vergen.patch
@@ -0,0 +1,53 @@
+From 64f128c45687d18d64fc6856a30fde585b007e00 Mon Sep 17 00:00:00 2001
+From: Ralf Jung <post@ralfj.de>
+Date: Sat, 15 May 2021 14:17:30 +0200
+Subject: [PATCH] support building Miri outside a git repo
+
+---
+ cargo-miri/bin.rs | 14 ++++++++------
+ cargo-miri/build.rs | 2 +-
+ 2 files changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/cargo-miri/bin.rs b/cargo-miri/bin.rs
+index e29bdc771..84447b3a1 100644
+--- a/src/tools/miri/cargo-miri/bin.rs
++++ b/src/tools/miri/cargo-miri/bin.rs
+@@ -6,6 +6,7 @@ use std::io::{self, BufRead, BufReader, BufWriter, Read, Write};
+ use std::ops::Not;
+ use std::path::{Path, PathBuf};
+ use std::process::Command;
++use std::fmt::{Write as _};
+
+ use serde::{Deserialize, Serialize};
+
+@@ -90,12 +91,13 @@ fn show_help() {
+ }
+
+ fn show_version() {
+- println!(
+- "miri {} ({} {})",
+- env!("CARGO_PKG_VERSION"),
+- env!("VERGEN_GIT_SHA_SHORT"),
+- env!("VERGEN_GIT_COMMIT_DATE")
+- );
++ let mut version = format!("miri {}", env!("CARGO_PKG_VERSION"));
++ // Only use `option_env` on vergen variables to ensure the build succeeds
++ // when vergen failed to find the git info.
++ if let Some(sha) = option_env!("VERGEN_GIT_SHA_SHORT") {
++ write!(&mut version, " ({} {})", sha, option_env!("VERGEN_GIT_COMMIT_DATE").unwrap()).unwrap();
++ }
++ println!("{}", version);
+ }
+
+ fn show_error(msg: String) -> ! {
+diff --git a/cargo-miri/build.rs b/cargo-miri/build.rs
+index cff135fe4..ebd8e7003 100644
+--- a/src/tools/miri/cargo-miri/build.rs
++++ b/src/tools/miri/cargo-miri/build.rs
+@@ -7,5 +7,5 @@ fn main() {
+ let mut gen_config = vergen::Config::default();
+ *gen_config.git_mut().sha_kind_mut() = vergen::ShaKind::Short;
+ *gen_config.git_mut().commit_timestamp_kind_mut() = vergen::TimestampKind::DateOnly;
+- vergen(gen_config).expect("Unable to generate vergen keys!");
++ vergen(gen_config).ok(); // Ignore failure (in case we are built outside a git repo)
+ }
diff --git a/dev-lang/rust/rust-1.53.0.ebuild b/dev-lang/rust/rust-1.53.0.ebuild
index e8b0c98a8c1..c48d00bb2a6 100644
--- a/dev-lang/rust/rust-1.53.0.ebuild
+++ b/dev-lang/rust/rust-1.53.0.ebuild
@@ -149,6 +149,7 @@ PATCHES=(
"${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
"${FILESDIR}"/1.53.0-rustversion-1.0.5.patch # https://github.com/rust-lang/rust/pull/86425
+ "${FILESDIR}"/1.53.0-miri-vergen.patch # https://github.com/rust-lang/rust/issues/84182
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2021-06-18 7:46 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2021-06-18 7:46 UTC (permalink / raw
To: gentoo-commits
commit: 304df4be2f11738dcd1c9075dabf5d58002dd8e2
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 18 06:59:50 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Jun 18 07:46:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=304df4be
dev-lang/rust: refresh rustversion patch
fully bump to 1.0.5
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
...ersion.patch => 1.53.0-rustversion-1.0.5.patch} | 229 +++++++++++++++++----
dev-lang/rust/rust-1.53.0.ebuild | 2 +-
2 files changed, 187 insertions(+), 44 deletions(-)
diff --git a/dev-lang/rust/files/1.53.0-rustversion.patch b/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch
similarity index 52%
rename from dev-lang/rust/files/1.53.0-rustversion.patch
rename to dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch
index 761254ce138..bc6ae8be00b 100644
--- a/dev-lang/rust/files/1.53.0-rustversion.patch
+++ b/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch
@@ -1,43 +1,75 @@
-From b0b666350a91529caeb36e957e465eba3b6d7589 Mon Sep 17 00:00:00 2001
+From 12efa21eb88cb43d3b927952da0c5635373ac92b Mon Sep 17 00:00:00 2001
From: David Tolnay <dtolnay@gmail.com>
-Date: Fri, 14 May 2021 13:49:17 -0700
-Subject: [PATCH 1/2] Add regression test for issue 28
+Date: Thu, 17 Jun 2021 22:34:55 -0700
+Subject: [PATCH] Update rustversion to 1.0.5
---
- tests/test_parse.rs | 8 ++++++++
- 1 file changed, 8 insertions(+)
+ Cargo.lock | 4 +--
+ vendor/rustversion/.cargo-checksum.json | 2 +-
+ vendor/rustversion/Cargo.toml | 2 +-
+ vendor/rustversion/build/build.rs | 6 ++++
+ vendor/rustversion/build/rustc.rs | 30 +++++++++-----------
+ vendor/rustversion/src/lib.rs | 15 ++++++++++
+ vendor/rustversion/src/time.rs | 13 +++++++--
+ vendor/rustversion/tests/test_parse.rs | 10 +++++++
+ vendor/rustversion/tests/ui/bad-bound.stderr | 4 +--
+ vendor/rustversion/tests/ui/bad-date.stderr | 4 +--
+ 10 files changed, 63 insertions(+), 27 deletions(-)
-diff --git a/tests/test_parse.rs b/tests/test_parse.rs
-index a5de1aa..cb39b31 100644
---- a/vendor/rustversion/tests/test_parse.rs
-+++ b/vendor/rustversion/tests/test_parse.rs
-@@ -76,6 +76,14 @@ fn test_parse() {
- }),
- },
- ),
-+ (
-+ "rustc 1.52.1-nightly (gentoo)",
-+ Version {
-+ minor: 52,
-+ patch: 1,
-+ channel: Dev,
-+ },
-+ ),
- ];
+diff --git a/Cargo.lock b/Cargo.lock
+index 0939f19cdfe..26a89caf050 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -4582,9 +4582,9 @@ dependencies = [
- for (string, expected) in cases {
-
-From 2ee81bd2701915684137ae40415afa4b552af79e Mon Sep 17 00:00:00 2001
-From: David Tolnay <dtolnay@gmail.com>
-Date: Fri, 14 May 2021 13:59:44 -0700
-Subject: [PATCH 2/2] Parse distro nightly without a date
-
----
- build/rustc.rs | 30 ++++++++++++++----------------
- 1 file changed, 14 insertions(+), 16 deletions(-)
-
-diff --git a/build/rustc.rs b/build/rustc.rs
-index 723e6bd..dfc6a05 100644
+ [[package]]
+ name = "rustversion"
+-version = "1.0.4"
++version = "1.0.5"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"
++checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"
+
+ [[package]]
+ name = "ryu"
+diff --git a/vendor/rustversion/.cargo-checksum.json b/vendor/rustversion/.cargo-checksum.json
+index e1277df7b59..0a134695aaf 100644
+--- a/vendor/rustversion/.cargo-checksum.json
++++ b/vendor/rustversion/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"1a91782510461d54726e816ae776042b95c79c9949d49c11b8782caefc22ead2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"481daf363b7004c90ffc3e012863a4102e9f26b9aaa2a4a295c2dd78f690be28","build/rustc.rs":"4dc8f1764672137bd15758cc19242740b0d6ab99e4a69171ad0999f9112a15a6","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","sr
c/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"f8347832d8072058dbb4af6b8d67a834a02fe9c5460bbaa26defec4b66317f1b","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"45fb48ff0a0046a5a1b108b9ce53b14885637ad868ede1d66970379c2b7f16ef","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"fbf9695f4208263743715e6c8b6294dfffee21462a65dfeb9339a70c0e18dbc6","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"bc9297f758c2541fb0a8b48d5785f4bb
cd0d2a07d876ba0baf2fc9de9275e7e6","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"1ac3cab13ee900fc8344e8fab21ff4d9cad476aca44925a4c1b2293a6b59b742","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"a09ee758f816eddff8a8c7fb5be54dd95e74caad18a207251faedd251ecfaf1c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"bae427f344972e6e0e348ec48dce0947274b3ec6cac0938497a8d3da5c9834e5","build/rustc.rs":"3e4acf7ea679f9331dd4e8dbe42a08a312f58379ea1eee5898793a9848d06d8c","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","sr
c/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"5652f6f84fc80136bd29b2125f7676e80e0df7d40aac274b0658c99cecbd871d","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"bdd05a743b07a6bbfa0dbc9d4e415e051aba4a51a430c3be1e23447eae298c8b","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"cdfe376020b9391330292968046117b0935c828d73385e8faeb2e333ec897088","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"a03dc78b380191c10d3b3406b1fd3208
bb2609d4c26b9c33ccd335721e3cd072","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"3a607fb950a69f7dc1b503295bce53541f9dee9f4674edc5d13ee3a69ff0e8cd","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"}
+\ No newline at end of file
+diff --git a/vendor/rustversion/Cargo.toml b/vendor/rustversion/Cargo.toml
+index 56995ff0792..c72b1b2b343 100644
+--- a/vendor/rustversion/Cargo.toml
++++ b/vendor/rustversion/Cargo.toml
+@@ -13,7 +13,7 @@
+ [package]
+ edition = "2018"
+ name = "rustversion"
+-version = "1.0.4"
++version = "1.0.5"
+ authors = ["David Tolnay <dtolnay@gmail.com>"]
+ build = "build/build.rs"
+ description = "Conditional compilation according to rustc compiler version"
+diff --git a/vendor/rustversion/build/build.rs b/vendor/rustversion/build/build.rs
+index 2a8bc4af39f..15312510d68 100644
+--- a/vendor/rustversion/build/build.rs
++++ b/vendor/rustversion/build/build.rs
+@@ -1,3 +1,9 @@
++#![allow(
++ clippy::enum_glob_use,
++ clippy::must_use_candidate,
++ clippy::single_match_else
++)]
++
+ mod rustc;
+
+ use std::env;
+diff --git a/vendor/rustversion/build/rustc.rs b/vendor/rustversion/build/rustc.rs
+index 723e6bdd0e2..dfc6a05166f 100644
--- a/vendor/rustversion/build/rustc.rs
+++ b/vendor/rustversion/build/rustc.rs
@@ -48,23 +48,21 @@ pub fn parse(string: &str) -> Option<Version> {
@@ -78,14 +110,125 @@ index 723e6bd..dfc6a05 100644
None => Dev,
},
Some(_) => return None,
-diff --git a/vendor/rustversion/.cargo-checksum.json b/vendor/rustversion/.cargo-checksum.json
-index e1277df..2d8806a 100644
---- a/vendor/rustversion/.cargo-checksum.json
-+++ b/vendor/rustversion/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"1a91782510461d54726e816ae776042b95c79c9949d49c11b8782caefc22ead2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"481daf363b7004c90ffc3e012863a4102e9f26b9aaa2a4a295c2dd78f690be28","build/rustc.rs":"4dc8f1764672137bd15758cc19242740b0d6ab99e4a69171ad0999f9112a15a6","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","sr
c/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"f8347832d8072058dbb4af6b8d67a834a02fe9c5460bbaa26defec4b66317f1b","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"45fb48ff0a0046a5a1b108b9ce53b14885637ad868ede1d66970379c2b7f16ef","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"fbf9695f4208263743715e6c8b6294dfffee21462a65dfeb9339a70c0e18dbc6","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"bc9297f758c2541fb0a8b48d5785f4bb
cd0d2a07d876ba0baf2fc9de9275e7e6","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"1ac3cab13ee900fc8344e8fab21ff4d9cad476aca44925a4c1b2293a6b59b742","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"1a91782510461d54726e816ae776042b95c79c9949d49c11b8782caefc22ead2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"481daf363b7004c90ffc3e012863a4102e9f26b9aaa2a4a295c2dd78f690be28","build/rustc.rs":"3e4acf7ea679f9331dd4e8dbe42a08a312f58379ea1eee5898793a9848d06d8c","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","sr
c/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"f8347832d8072058dbb4af6b8d67a834a02fe9c5460bbaa26defec4b66317f1b","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"45fb48ff0a0046a5a1b108b9ce53b14885637ad868ede1d66970379c2b7f16ef","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"4e62b190795163370765f57e864458f2cde155a5388777bb5ccf82d282a50116","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"bc9297f758c2541fb0a8b48d5785f4bb
cd0d2a07d876ba0baf2fc9de9275e7e6","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"1ac3cab13ee900fc8344e8fab21ff4d9cad476aca44925a4c1b2293a6b59b742","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"}
+diff --git a/vendor/rustversion/src/lib.rs b/vendor/rustversion/src/lib.rs
+index 2614105dd1a..172eb89382f 100644
+--- a/vendor/rustversion/src/lib.rs
++++ b/vendor/rustversion/src/lib.rs
+@@ -145,6 +145,21 @@
+ //!
+ //! <br>
+
++#![allow(
++ clippy::cast_lossless,
++ clippy::cast_possible_truncation,
++ clippy::doc_markdown,
++ clippy::enum_glob_use,
++ clippy::from_iter_instead_of_collect,
++ clippy::module_name_repetitions,
++ clippy::must_use_candidate,
++ clippy::needless_doctest_main,
++ clippy::needless_pass_by_value,
++ clippy::redundant_else,
++ clippy::toplevel_ref_arg,
++ clippy::unreadable_literal
++)]
++
+ extern crate proc_macro;
+
+ mod attr;
+diff --git a/vendor/rustversion/src/time.rs b/vendor/rustversion/src/time.rs
+index 1e6dd9066b4..3c21463dd80 100644
+--- a/vendor/rustversion/src/time.rs
++++ b/vendor/rustversion/src/time.rs
+@@ -1,4 +1,5 @@
+ use crate::date::Date;
++use std::env;
+ use std::time::{SystemTime, UNIX_EPOCH};
+
+ // Timestamp of 2016-03-01 00:00:00 in UTC.
+@@ -13,14 +14,20 @@
+
+ pub fn today() -> Date {
+ let default = Date {
+- year: 2019,
+- month: 1,
+- day: 1,
++ year: 2020,
++ month: 2,
++ day: 25,
+ };
+ try_today().unwrap_or(default)
+ }
+
+ fn try_today() -> Option<Date> {
++ if let Some(pkg_name) = env::var_os("CARGO_PKG_NAME") {
++ if pkg_name.to_str() == Some("rustversion-tests") {
++ return None; // Stable date for ui testing.
++ }
++ }
++
+ let now = SystemTime::now();
+ let since_epoch = now.duration_since(UNIX_EPOCH).ok()?;
+ let secs = since_epoch.as_secs();
+diff --git a/vendor/rustversion/tests/test_parse.rs b/vendor/rustversion/tests/test_parse.rs
+index 843bd73d3e5..cb39b3179f5 100644
+--- a/vendor/rustversion/tests/test_parse.rs
++++ b/vendor/rustversion/tests/test_parse.rs
+@@ -1,3 +1,5 @@
++#![allow(clippy::enum_glob_use, clippy::must_use_candidate)]
++
+ include!("../build/rustc.rs");
+
+ #[test]
+@@ -76,6 +78,14 @@ fn test_parse() {
+ }),
+ },
+ ),
++ (
++ "rustc 1.52.1-nightly (gentoo)",
++ Version {
++ minor: 52,
++ patch: 1,
++ channel: Dev,
++ },
++ ),
+ ];
+
+ for (string, expected) in cases {
+diff --git a/vendor/rustversion/tests/ui/bad-bound.stderr b/vendor/rustversion/tests/ui/bad-bound.stderr
+index f8c498c8577..2c56acbdb33 100644
+--- a/vendor/rustversion/tests/ui/bad-bound.stderr
++++ b/vendor/rustversion/tests/ui/bad-bound.stderr
+@@ -1,10 +1,10 @@
+-error: expected rustc release number like 1.31, or nightly date like 2020-10-26
++error: expected rustc release number like 1.31, or nightly date like 2020-02-25
+ --> $DIR/bad-bound.rs:1:22
+ |
+ 1 | #[rustversion::since(stable)]
+ | ^^^^^^
+
+-error: expected rustc release number like 1.31, or nightly date like 2020-10-26
++error: expected rustc release number like 1.31, or nightly date like 2020-02-25
+ --> $DIR/bad-bound.rs:4:26
+ |
+ 4 | #[rustversion::any(since(stable))]
+diff --git a/vendor/rustversion/tests/ui/bad-date.stderr b/vendor/rustversion/tests/ui/bad-date.stderr
+index 734d7889075..c523ccc02bf 100644
+--- a/vendor/rustversion/tests/ui/bad-date.stderr
++++ b/vendor/rustversion/tests/ui/bad-date.stderr
+@@ -1,10 +1,10 @@
+-error: expected nightly date, like 2020-10-26
++error: expected nightly date, like 2020-02-25
+ --> $DIR/bad-date.rs:1:24
+ |
+ 1 | #[rustversion::nightly(stable)]
+ | ^^^^^^
+
+-error: expected nightly date, like 2020-10-26
++error: expected nightly date, like 2020-02-25
+ --> $DIR/bad-date.rs:4:28
+ |
+ 4 | #[rustversion::any(nightly(stable))]
--
2.32.0
diff --git a/dev-lang/rust/rust-1.53.0.ebuild b/dev-lang/rust/rust-1.53.0.ebuild
index 07427b717a4..e8b0c98a8c1 100644
--- a/dev-lang/rust/rust-1.53.0.ebuild
+++ b/dev-lang/rust/rust-1.53.0.ebuild
@@ -148,7 +148,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc"
PATCHES=(
"${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
- "${FILESDIR}"/1.53.0-rustversion.patch #https://github.com/dtolnay/rustversion/issues/28
+ "${FILESDIR}"/1.53.0-rustversion-1.0.5.patch # https://github.com/rust-lang/rust/pull/86425
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2021-05-02 16:45 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2021-05-02 16:45 UTC (permalink / raw
To: gentoo-commits
commit: a2aea284925131711696b4cd7529c91e2db62c23
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun May 2 16:39:50 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun May 2 16:45:10 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2aea284
dev-lang/rust: drop libressl support
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.47.0-libressl.patch | 44 -------------------------------
dev-lang/rust/rust-1.51.0-r2.ebuild | 6 ++---
2 files changed, 2 insertions(+), 48 deletions(-)
diff --git a/dev-lang/rust/files/1.47.0-libressl.patch b/dev-lang/rust/files/1.47.0-libressl.patch
deleted file mode 100644
index 8e9bf9997a7..00000000000
--- a/dev-lang/rust/files/1.47.0-libressl.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 208145c7598d4b8fb93c22d42931b6f9f4fe9c40 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <steils@gentoo.org>
-Date: Sun, 6 Dec 2020 16:32:05 +0200
-Subject: [PATCH] Support LibreSSL 3.{2,3}.x
-
-Signed-off-by: Stefan Strogin <steils@gentoo.org>
----
- vendor/openssl-sys/.cargo-checksum.json | 2 +-
- vendor/openssl-sys/build/main.rs | 4 +++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
-index 4c079f564..367a18830 100644
---- a/vendor/openssl-sys/.cargo-checksum.json
-+++ b/vendor/openssl-sys/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"17531e8bd93e3bd9ada0d3b4e4d07508d316985a2cbe4df73186ba70d5971923","Cargo.toml":"b71de20a64dc4704f77b8cc8ea9f63e47f2d39f06696900077eefd93a17d16ec","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"2b49fbdb045c40bd46bf7e7adfde8c45508e4b51af0080fb934eb1131863d75a","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0742487bd3faa681232e812c5c96f0e5b83b485ba236a4efda1cd8f5a260b5eb","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"0d8b960ab71be4e2a08e3ff7e9615a17f7dddcd601b7fdd885bb6f6c5a6fe5f5","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"3edf1379b3277df32e047a52553d243d4a4001111a277cf4b12f7297f2fe2bf0","src/evp.rs":"ae748b7d7a0f74eb21c2750bf571c09f99bb835f23436c247493a66c28fb5c6b","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"846f03332238caace3dade00a6c15b5ed1773edd601cc72dca2f1339d58b2b7f","src/macros.rs":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"3e45fb025ccbd6a556aae9738ef8a3b11cc2655ffa9d8422be21699b2e45d6c4","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"f00c3f88f7947f5d13698a2fc796c68eb1bd65b2686f661d29482021170db71f","src/pem.rs":"d3ae2748c53597c91aa1896f18844ccd9ce2dca1627662b8974330e5f1b3f36c","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"bb9bcb4a3b96ce6919236f48dfc5e0ad66f1cef1dce7d989c778d6f28ee6403b","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"31ad553ece8fbb1fda6d8cf43ea0895863f961b6e1171ed05063134d3892f5cc","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"17531e8bd93e3bd9ada0d3b4e4d07508d316985a2cbe4df73186ba70d5971923","Cargo.toml":"b71de20a64dc4704f77b8cc8ea9f63e47f2d39f06696900077eefd93a17d16ec","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"2b49fbdb045c40bd46bf7e7adfde8c45508e4b51af0080fb934eb1131863d75a","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0742487bd3faa681232e812c5c96f0e5b83b485ba236a4efda1cd8f5a260b5eb","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"630c6697a821e6f10058d58966e86253310b6b59b52cea159d2ed819b277b6b0","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"3edf1379b3277df32e047a52553d243d4a4001111a277cf4b12f7297f2fe2bf0","src/evp.rs":"ae748b7d7a0f74eb21c2750bf571c09f99bb835f23436c247493a66c28fb5c6b","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"846f03332238caace3dade00a6c15b5ed1773edd601cc72dca2f1339d58b2b7f","src/macros.rs":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"3e45fb025ccbd6a556aae9738ef8a3b11cc2655ffa9d8422be21699b2e45d6c4","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"f00c3f88f7947f5d13698a2fc796c68eb1bd65b2686f661d29482021170db71f","src/pem.rs":"d3ae2748c53597c91aa1896f18844ccd9ce2dca1627662b8974330e5f1b3f36c","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"bb9bcb4a3b96ce6919236f48dfc5e0ad66f1cef1dce7d989c778d6f28ee6403b","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"31ad553ece8fbb1fda6d8cf43ea0895863f961b6e1171ed05063134d3892f5cc","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de"}
-diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
-index 49f26d2b7..361e06cf9 100644
---- a/vendor/openssl-sys/build/main.rs
-+++ b/vendor/openssl-sys/build/main.rs
-@@ -221,6 +221,8 @@ See rust-openssl README for more information:
- (3, 1, 0) => ('3', '1', '0'),
- (3, 1, _) => ('3', '1', 'x'),
- (3, 2, 0) => ('3', '2', '0'),
-+ (3, 2, _) => ('3', '2', 'x'),
-+ (3, 3, _) => ('3', '3', 'x'),
- _ => version_error(),
- };
-
-@@ -261,7 +263,7 @@ fn version_error() -> ! {
- "
-
- This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
--through 3.2.0, but a different version of OpenSSL was found. The build is now aborting
-+through 3.3.x, but a different version of OpenSSL was found. The build is now aborting
- due to this version mismatch.
-
- "
---
-2.29.2
-
diff --git a/dev-lang/rust/rust-1.51.0-r2.ebuild b/dev-lang/rust/rust-1.51.0-r2.ebuild
index c2db84721a7..66e32974203 100644
--- a/dev-lang/rust/rust-1.51.0-r2.ebuild
+++ b/dev-lang/rust/rust-1.51.0-r2.ebuild
@@ -39,7 +39,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
@@ -99,8 +99,7 @@ DEPEND="
>=app-arch/xz-utils-5.2
net-misc/curl:=[http2,ssl]
sys-libs/zlib:=
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
+ dev-libs/openssl:0=
elibc_musl? ( sys-libs/libunwind:= )
system-llvm? ( ${LLVM_DEPEND} )
"
@@ -140,7 +139,6 @@ QA_SONAME="
RESTRICT="test"
PATCHES=(
- "${FILESDIR}"/1.47.0-libressl.patch
"${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
"${FILESDIR}"/1.51.0-bootstrap-panic.patch
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2021-04-18 1:24 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2021-04-18 1:24 UTC (permalink / raw
To: gentoo-commits
commit: 65b9e4c1a1c3a2de55637c7977584c5827b66366
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 18 01:23:09 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Apr 18 01:23:24 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65b9e4c1
dev-lang/rust: security revbump of 1.51.0
Fixes for:
CVE-2020-36323
CVE-2021-28876
CVE-2021-31162
Bug: https://bugs.gentoo.org/782799
Bug: https://bugs.gentoo.org/782367
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.51.0-CVE-2020-36323.patch | 175 +++++++
dev-lang/rust/files/1.51.0-CVE-2021-28876.patch | 39 ++
dev-lang/rust/files/1.51.0-CVE-2021-28878.patch | 112 +++++
dev-lang/rust/files/1.51.0-CVE-2021-28879.patch | 84 ++++
dev-lang/rust/files/1.51.0-CVE-2021-31162.patch | 195 ++++++++
dev-lang/rust/rust-1.51.0-r1.ebuild | 622 ++++++++++++++++++++++++
6 files changed, 1227 insertions(+)
diff --git a/dev-lang/rust/files/1.51.0-CVE-2020-36323.patch b/dev-lang/rust/files/1.51.0-CVE-2020-36323.patch
new file mode 100644
index 00000000000..b4f2215cc23
--- /dev/null
+++ b/dev-lang/rust/files/1.51.0-CVE-2020-36323.patch
@@ -0,0 +1,175 @@
+From 6d43225bfb08ec91f7476b76c7fec632c4a096ef Mon Sep 17 00:00:00 2001
+From: Yechan Bae <yechan@gatech.edu>
+Date: Wed, 3 Feb 2021 16:36:33 -0500
+Subject: [PATCH 1/2] Fixes #80335
+
+---
+ library/alloc/src/str.rs | 42 ++++++++++++++++++++++----------------
+ library/alloc/tests/str.rs | 30 +++++++++++++++++++++++++++
+ 2 files changed, 54 insertions(+), 18 deletions(-)
+
+diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
+index 70e0c7dba5eab..a7584c6b65100 100644
+--- a/library/alloc/src/str.rs
++++ b/library/alloc/src/str.rs
+@@ -90,8 +90,8 @@ impl<S: Borrow<str>> Join<&str> for [S] {
+ }
+ }
+
+-macro_rules! spezialize_for_lengths {
+- ($separator:expr, $target:expr, $iter:expr; $($num:expr),*) => {
++macro_rules! specialize_for_lengths {
++ ($separator:expr, $target:expr, $iter:expr; $($num:expr),*) => {{
+ let mut target = $target;
+ let iter = $iter;
+ let sep_bytes = $separator;
+@@ -102,7 +102,8 @@ macro_rules! spezialize_for_lengths {
+ $num => {
+ for s in iter {
+ copy_slice_and_advance!(target, sep_bytes);
+- copy_slice_and_advance!(target, s.borrow().as_ref());
++ let content_bytes = s.borrow().as_ref();
++ copy_slice_and_advance!(target, content_bytes);
+ }
+ },
+ )*
+@@ -110,11 +111,13 @@ macro_rules! spezialize_for_lengths {
+ // arbitrary non-zero size fallback
+ for s in iter {
+ copy_slice_and_advance!(target, sep_bytes);
+- copy_slice_and_advance!(target, s.borrow().as_ref());
++ let content_bytes = s.borrow().as_ref();
++ copy_slice_and_advance!(target, content_bytes);
+ }
+ }
+ }
+- };
++ target
++ }}
+ }
+
+ macro_rules! copy_slice_and_advance {
+@@ -153,7 +156,7 @@ where
+ // if the `len` calculation overflows, we'll panic
+ // we would have run out of memory anyway and the rest of the function requires
+ // the entire Vec pre-allocated for safety
+- let len = sep_len
++ let reserved_len = sep_len
+ .checked_mul(iter.len())
+ .and_then(|n| {
+ slice.iter().map(|s| s.borrow().as_ref().len()).try_fold(n, usize::checked_add)
+@@ -161,22 +164,25 @@ where
+ .expect("attempt to join into collection with len > usize::MAX");
+
+ // crucial for safety
+- let mut result = Vec::with_capacity(len);
+- assert!(result.capacity() >= len);
++ let mut result = Vec::with_capacity(reserved_len);
++ debug_assert!(result.capacity() >= reserved_len);
+
+ result.extend_from_slice(first.borrow().as_ref());
+
+ unsafe {
+- {
+- let pos = result.len();
+- let target = result.get_unchecked_mut(pos..len);
+-
+- // copy separator and slices over without bounds checks
+- // generate loops with hardcoded offsets for small separators
+- // massive improvements possible (~ x2)
+- spezialize_for_lengths!(sep, target, iter; 0, 1, 2, 3, 4);
+- }
+- result.set_len(len);
++ let pos = result.len();
++ let target = result.get_unchecked_mut(pos..reserved_len);
++
++ // copy separator and slices over without bounds checks
++ // generate loops with hardcoded offsets for small separators
++ // massive improvements possible (~ x2)
++ let remain = specialize_for_lengths!(sep, target, iter; 0, 1, 2, 3, 4);
++
++ // issue #80335: A weird borrow implementation can return different
++ // slices for the length calculation and the actual copy, so
++ // `remain.len()` might be non-zero.
++ let result_len = reserved_len - remain.len();
++ result.set_len(result_len);
+ }
+ result
+ }
+diff --git a/library/alloc/tests/str.rs b/library/alloc/tests/str.rs
+index 604835e6cc4a6..6df8d8c2f354f 100644
+--- a/library/alloc/tests/str.rs
++++ b/library/alloc/tests/str.rs
+@@ -160,6 +160,36 @@ fn test_join_for_different_lengths_with_long_separator() {
+ test_join!("~~~~~a~~~~~bc", ["", "a", "bc"], "~~~~~");
+ }
+
++#[test]
++fn test_join_isue_80335() {
++ use core::{borrow::Borrow, cell::Cell};
++
++ struct WeirdBorrow {
++ state: Cell<bool>,
++ }
++
++ impl Default for WeirdBorrow {
++ fn default() -> Self {
++ WeirdBorrow { state: Cell::new(false) }
++ }
++ }
++
++ impl Borrow<str> for WeirdBorrow {
++ fn borrow(&self) -> &str {
++ let state = self.state.get();
++ if state {
++ "0"
++ } else {
++ self.state.set(true);
++ "123456"
++ }
++ }
++ }
++
++ let arr: [WeirdBorrow; 3] = Default::default();
++ test_join!("0-0-0", arr, "-");
++}
++
+ #[test]
+ #[cfg_attr(miri, ignore)] // Miri is too slow
+ fn test_unsafe_slice() {
+
+From 26a62701e42d10c03ce5f2f911e7d5edeefa2f0f Mon Sep 17 00:00:00 2001
+From: Yechan Bae <yechan@gatech.edu>
+Date: Sat, 20 Mar 2021 13:42:54 -0400
+Subject: [PATCH 2/2] Update the comment
+
+---
+ library/alloc/src/str.rs | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
+index a7584c6b65100..4d1e876457b8e 100644
+--- a/library/alloc/src/str.rs
++++ b/library/alloc/src/str.rs
+@@ -163,7 +163,7 @@ where
+ })
+ .expect("attempt to join into collection with len > usize::MAX");
+
+- // crucial for safety
++ // prepare an uninitialized buffer
+ let mut result = Vec::with_capacity(reserved_len);
+ debug_assert!(result.capacity() >= reserved_len);
+
+@@ -178,9 +178,9 @@ where
+ // massive improvements possible (~ x2)
+ let remain = specialize_for_lengths!(sep, target, iter; 0, 1, 2, 3, 4);
+
+- // issue #80335: A weird borrow implementation can return different
+- // slices for the length calculation and the actual copy, so
+- // `remain.len()` might be non-zero.
++ // A weird borrow implementation may return different
++ // slices for the length calculation and the actual copy.
++ // Make sure we don't expose uninitialized bytes to the caller.
+ let result_len = reserved_len - remain.len();
+ result.set_len(result_len);
+ }
diff --git a/dev-lang/rust/files/1.51.0-CVE-2021-28876.patch b/dev-lang/rust/files/1.51.0-CVE-2021-28876.patch
new file mode 100644
index 00000000000..3a0af024143
--- /dev/null
+++ b/dev-lang/rust/files/1.51.0-CVE-2021-28876.patch
@@ -0,0 +1,39 @@
+From 86a4b27475aab52b998c15f5758540697cc9cff0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Thu, 4 Feb 2021 10:23:01 +0200
+Subject: [PATCH] Increment `self.index` before calling
+ `Iterator::self.a.__iterator_get_unchecked` in `Zip` `TrustedRandomAccess`
+ specialization
+
+Otherwise if `Iterator::self.a.__iterator_get_unchecked` panics the
+index would not have been incremented yet and another call to
+`Iterator::next` would read from the same index again, which is not
+allowed according to the API contract of `TrustedRandomAccess` for
+`!Clone`.
+
+Fixes https://github.com/rust-lang/rust/issues/81740
+---
+ library/core/src/iter/adapters/zip.rs | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
+index 98b8dca961407..9f98353452006 100644
+--- a/library/core/src/iter/adapters/zip.rs
++++ b/library/core/src/iter/adapters/zip.rs
+@@ -198,12 +198,13 @@ where
+ Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
+ }
+ } else if A::may_have_side_effect() && self.index < self.a.size() {
++ let i = self.index;
++ self.index += 1;
+ // match the base implementation's potential side effects
+- // SAFETY: we just checked that `self.index` < `self.a.len()`
++ // SAFETY: we just checked that `i` < `self.a.len()`
+ unsafe {
+- self.a.__iterator_get_unchecked(self.index);
++ self.a.__iterator_get_unchecked(i);
+ }
+- self.index += 1;
+ None
+ } else {
+ None
diff --git a/dev-lang/rust/files/1.51.0-CVE-2021-28878.patch b/dev-lang/rust/files/1.51.0-CVE-2021-28878.patch
new file mode 100644
index 00000000000..f319ab5e8c4
--- /dev/null
+++ b/dev-lang/rust/files/1.51.0-CVE-2021-28878.patch
@@ -0,0 +1,112 @@
+From 2371914a05f8f2763dffe6e2511d0870bcd6b461 Mon Sep 17 00:00:00 2001
+From: Giacomo Stevanato <giaco.stevanato@gmail.com>
+Date: Wed, 3 Mar 2021 21:09:01 +0100
+Subject: [PATCH 1/2] Prevent Zip specialization from calling
+ __iterator_get_unchecked twice with the same index after calling next_back
+
+---
+ library/core/src/iter/adapters/zip.rs | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
+index 817fc2a51e981..ea7a809c6badb 100644
+--- a/library/core/src/iter/adapters/zip.rs
++++ b/library/core/src/iter/adapters/zip.rs
+@@ -13,9 +13,10 @@ use crate::iter::{InPlaceIterable, SourceIter, TrustedLen};
+ pub struct Zip<A, B> {
+ a: A,
+ b: B,
+- // index and len are only used by the specialized version of zip
++ // index, len and a_len are only used by the specialized version of zip
+ index: usize,
+ len: usize,
++ a_len: usize,
+ }
+ impl<A: Iterator, B: Iterator> Zip<A, B> {
+ pub(in crate::iter) fn new(a: A, b: B) -> Zip<A, B> {
+@@ -110,6 +111,7 @@ where
+ b,
+ index: 0, // unused
+ len: 0, // unused
++ a_len: 0, // unused
+ }
+ }
+
+@@ -184,8 +186,9 @@ where
+ B: TrustedRandomAccess + Iterator,
+ {
+ fn new(a: A, b: B) -> Self {
+- let len = cmp::min(a.size(), b.size());
+- Zip { a, b, index: 0, len }
++ let a_len = a.size();
++ let len = cmp::min(a_len, b.size());
++ Zip { a, b, index: 0, len, a_len }
+ }
+
+ #[inline]
+@@ -197,7 +200,7 @@ where
+ unsafe {
+ Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
+ }
+- } else if A::MAY_HAVE_SIDE_EFFECT && self.index < self.a.size() {
++ } else if A::MAY_HAVE_SIDE_EFFECT && self.index < self.a_len {
+ let i = self.index;
+ self.index += 1;
+ self.len += 1;
+@@ -262,6 +265,7 @@ where
+ for _ in 0..sz_a - self.len {
+ self.a.next_back();
+ }
++ self.a_len = self.len;
+ }
+ let sz_b = self.b.size();
+ if B::MAY_HAVE_SIDE_EFFECT && sz_b > self.len {
+@@ -273,6 +277,7 @@ where
+ }
+ if self.index < self.len {
+ self.len -= 1;
++ self.a_len -= 1;
+ let i = self.len;
+ // SAFETY: `i` is smaller than the previous value of `self.len`,
+ // which is also smaller than or equal to `self.a.len()` and `self.b.len()`
+
+From c1bfb9a78db6d481be1d03355672712c766e20b0 Mon Sep 17 00:00:00 2001
+From: Giacomo Stevanato <giaco.stevanato@gmail.com>
+Date: Fri, 19 Feb 2021 15:25:09 +0100
+Subject: [PATCH 2/2] Add relevant test
+
+---
+ library/core/tests/iter/adapters/zip.rs | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/library/core/tests/iter/adapters/zip.rs b/library/core/tests/iter/adapters/zip.rs
+index a597710392952..000c15f72c886 100644
+--- a/library/core/tests/iter/adapters/zip.rs
++++ b/library/core/tests/iter/adapters/zip.rs
+@@ -265,3 +265,26 @@ fn test_issue_82282() {
+ panic!();
+ }
+ }
++
++#[test]
++fn test_issue_82291() {
++ use std::cell::Cell;
++
++ let mut v1 = [()];
++ let v2 = [()];
++
++ let called = Cell::new(0);
++
++ let mut zip = v1
++ .iter_mut()
++ .map(|r| {
++ called.set(called.get() + 1);
++ r
++ })
++ .zip(&v2);
++
++ zip.next_back();
++ assert_eq!(called.get(), 1);
++ zip.next();
++ assert_eq!(called.get(), 1);
++}
diff --git a/dev-lang/rust/files/1.51.0-CVE-2021-28879.patch b/dev-lang/rust/files/1.51.0-CVE-2021-28879.patch
new file mode 100644
index 00000000000..3407a2ddf2f
--- /dev/null
+++ b/dev-lang/rust/files/1.51.0-CVE-2021-28879.patch
@@ -0,0 +1,84 @@
+From 66a260617a88ed1ad55a46f03c5a90d5ad3004d3 Mon Sep 17 00:00:00 2001
+From: Giacomo Stevanato <giaco.stevanato@gmail.com>
+Date: Fri, 19 Feb 2021 12:15:37 +0100
+Subject: [PATCH 1/3] Increment self.len in specialized ZipImpl to avoid
+ underflow in size_hint
+
+---
+ library/core/src/iter/adapters/zip.rs | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
+index 9d0f4e3618fc5..ce48016afcd50 100644
+--- a/library/core/src/iter/adapters/zip.rs
++++ b/library/core/src/iter/adapters/zip.rs
+@@ -200,6 +200,7 @@ where
+ } else if A::MAY_HAVE_SIDE_EFFECT && self.index < self.a.size() {
+ let i = self.index;
+ self.index += 1;
++ self.len += 1;
+ // match the base implementation's potential side effects
+ // SAFETY: we just checked that `i` < `self.a.len()`
+ unsafe {
+
+From 8b9ac4d4155c74db5b317046033ab9c05a09e351 Mon Sep 17 00:00:00 2001
+From: Giacomo Stevanato <giaco.stevanato@gmail.com>
+Date: Fri, 19 Feb 2021 12:16:12 +0100
+Subject: [PATCH 2/3] Add test for underflow in specialized Zip's size_hint
+
+---
+ library/core/tests/iter/adapters/zip.rs | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/library/core/tests/iter/adapters/zip.rs b/library/core/tests/iter/adapters/zip.rs
+index 1fce0951e365e..a597710392952 100644
+--- a/library/core/tests/iter/adapters/zip.rs
++++ b/library/core/tests/iter/adapters/zip.rs
+@@ -245,3 +245,23 @@ fn test_double_ended_zip() {
+ assert_eq!(it.next_back(), Some((3, 3)));
+ assert_eq!(it.next(), None);
+ }
++
++#[test]
++fn test_issue_82282() {
++ fn overflowed_zip(arr: &[i32]) -> impl Iterator<Item = (i32, &())> {
++ static UNIT_EMPTY_ARR: [(); 0] = [];
++
++ let mapped = arr.into_iter().map(|i| *i);
++ let mut zipped = mapped.zip(UNIT_EMPTY_ARR.iter());
++ zipped.next();
++ zipped
++ }
++
++ let arr = [1, 2, 3];
++ let zip = overflowed_zip(&arr).zip(overflowed_zip(&arr));
++
++ assert_eq!(zip.size_hint(), (0, Some(0)));
++ for _ in zip {
++ panic!();
++ }
++}
+
+From aeb4ea739efb70e0002a4a9c4c7b8027dd0620b3 Mon Sep 17 00:00:00 2001
+From: Giacomo Stevanato <giaco.stevanato@gmail.com>
+Date: Fri, 19 Feb 2021 12:17:48 +0100
+Subject: [PATCH 3/3] Remove useless comparison since now self.index <=
+ self.len is an invariant
+
+---
+ library/core/src/iter/adapters/zip.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
+index ce48016afcd50..817fc2a51e981 100644
+--- a/library/core/src/iter/adapters/zip.rs
++++ b/library/core/src/iter/adapters/zip.rs
+@@ -259,7 +259,7 @@ where
+ if sz_a != sz_b {
+ let sz_a = self.a.size();
+ if A::MAY_HAVE_SIDE_EFFECT && sz_a > self.len {
+- for _ in 0..sz_a - cmp::max(self.len, self.index) {
++ for _ in 0..sz_a - self.len {
+ self.a.next_back();
+ }
+ }
diff --git a/dev-lang/rust/files/1.51.0-CVE-2021-31162.patch b/dev-lang/rust/files/1.51.0-CVE-2021-31162.patch
new file mode 100644
index 00000000000..fd9165ea3c5
--- /dev/null
+++ b/dev-lang/rust/files/1.51.0-CVE-2021-31162.patch
@@ -0,0 +1,195 @@
+From fa89c0fbcfa8f4d44f153b1195ec5a305540ffc4 Mon Sep 17 00:00:00 2001
+From: The8472 <git@infinite-source.de>
+Date: Mon, 29 Mar 2021 04:22:34 +0200
+Subject: [PATCH 1/3] add testcase for double-drop during Vec in-place
+ collection
+
+---
+ library/alloc/tests/vec.rs | 38 +++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 37 insertions(+), 1 deletion(-)
+
+diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs
+index c142536cd2dfb..b926c697d58ab 100644
+--- a/library/alloc/tests/vec.rs
++++ b/library/alloc/tests/vec.rs
+@@ -1027,7 +1027,7 @@ fn test_from_iter_specialization_head_tail_drop() {
+ }
+
+ #[test]
+-fn test_from_iter_specialization_panic_drop() {
++fn test_from_iter_specialization_panic_during_iteration_drops() {
+ let drop_count: Vec<_> = (0..=2).map(|_| Rc::new(())).collect();
+ let src: Vec<_> = drop_count.iter().cloned().collect();
+ let iter = src.into_iter();
+@@ -1050,6 +1050,42 @@ fn test_from_iter_specialization_panic_drop() {
+ );
+ }
+
++#[test]
++fn test_from_iter_specialization_panic_during_drop_leaks() {
++ static mut DROP_COUNTER: usize = 0;
++
++ #[derive(Debug)]
++ enum Droppable {
++ DroppedTwice(Box<i32>),
++ PanicOnDrop,
++ }
++
++ impl Drop for Droppable {
++ fn drop(&mut self) {
++ match self {
++ Droppable::DroppedTwice(_) => {
++ unsafe {
++ DROP_COUNTER += 1;
++ }
++ println!("Dropping!")
++ }
++ Droppable::PanicOnDrop => {
++ if !std::thread::panicking() {
++ panic!();
++ }
++ }
++ }
++ }
++ }
++
++ let _ = std::panic::catch_unwind(AssertUnwindSafe(|| {
++ let v = vec![Droppable::DroppedTwice(Box::new(123)), Droppable::PanicOnDrop];
++ let _ = v.into_iter().take(0).collect::<Vec<_>>();
++ }));
++
++ assert_eq!(unsafe { DROP_COUNTER }, 1);
++}
++
+ #[test]
+ fn test_cow_from() {
+ let borrowed: &[_] = &["borrowed", "(slice)"];
+
+From 421f5d282a51e130d3ca7c4524d8ad6753437da9 Mon Sep 17 00:00:00 2001
+From: The8472 <git@infinite-source.de>
+Date: Mon, 29 Mar 2021 04:22:48 +0200
+Subject: [PATCH 2/3] fix double-drop in in-place collect specialization
+
+---
+ library/alloc/src/vec/into_iter.rs | 27 ++++++++++++++-------
+ library/alloc/src/vec/source_iter_marker.rs | 4 +--
+ 2 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs
+index bcbdffabc7fbe..324e894bafd23 100644
+--- a/library/alloc/src/vec/into_iter.rs
++++ b/library/alloc/src/vec/into_iter.rs
+@@ -85,20 +85,29 @@ impl<T, A: Allocator> IntoIter<T, A> {
+ ptr::slice_from_raw_parts_mut(self.ptr as *mut T, self.len())
+ }
+
+- pub(super) fn drop_remaining(&mut self) {
+- unsafe {
+- ptr::drop_in_place(self.as_mut_slice());
+- }
+- self.ptr = self.end;
+- }
++ /// Drops remaining elements and relinquishes the backing allocation.
++ ///
++ /// This is roughly equivalent to the following, but more efficient
++ ///
++ /// ```
++ /// # let mut into_iter = Vec::<u8>::with_capacity(10).into_iter();
++ /// (&mut into_iter).for_each(core::mem::drop);
++ /// unsafe { core::ptr::write(&mut into_iter, Vec::new().into_iter()); }
++ /// ```
++ pub(super) fn forget_allocation_drop_remaining(&mut self) {
++ let remaining = self.as_raw_mut_slice();
+
+- /// Relinquishes the backing allocation, equivalent to
+- /// `ptr::write(&mut self, Vec::new().into_iter())`
+- pub(super) fn forget_allocation(&mut self) {
++ // overwrite the individual fields instead of creating a new
++ // struct and then overwriting &mut self.
++ // this creates less assembly
+ self.cap = 0;
+ self.buf = unsafe { NonNull::new_unchecked(RawVec::NEW.ptr()) };
+ self.ptr = self.buf.as_ptr();
+ self.end = self.buf.as_ptr();
++
++ unsafe {
++ ptr::drop_in_place(remaining);
++ }
+ }
+ }
+
+diff --git a/library/alloc/src/vec/source_iter_marker.rs b/library/alloc/src/vec/source_iter_marker.rs
+index 50882fc17673e..e857d284d3ab6 100644
+--- a/library/alloc/src/vec/source_iter_marker.rs
++++ b/library/alloc/src/vec/source_iter_marker.rs
+@@ -69,9 +69,9 @@ where
+ }
+
+ // drop any remaining values at the tail of the source
+- src.drop_remaining();
+ // but prevent drop of the allocation itself once IntoIter goes out of scope
+- src.forget_allocation();
++ // if the drop panics then we also leak any elements collected into dst_buf
++ src.forget_allocation_drop_remaining();
+
+ let vec = unsafe { Vec::from_raw_parts(dst_buf, len, cap) };
+
+
+From 328a5e040780984c60dde2db300dad4f1323c39d Mon Sep 17 00:00:00 2001
+From: The8472 <git@infinite-source.de>
+Date: Fri, 2 Apr 2021 23:06:05 +0200
+Subject: [PATCH 3/3] cleanup leak after test to make miri happy
+
+---
+ library/alloc/tests/vec.rs | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs
+index b926c697d58ab..b9fe07c73e55e 100644
+--- a/library/alloc/tests/vec.rs
++++ b/library/alloc/tests/vec.rs
+@@ -1,3 +1,4 @@
++use alloc::boxed::Box;
+ use std::borrow::Cow;
+ use std::cell::Cell;
+ use std::collections::TryReserveError::*;
+@@ -1056,14 +1057,14 @@ fn test_from_iter_specialization_panic_during_drop_leaks() {
+
+ #[derive(Debug)]
+ enum Droppable {
+- DroppedTwice(Box<i32>),
++ DroppedTwice,
+ PanicOnDrop,
+ }
+
+ impl Drop for Droppable {
+ fn drop(&mut self) {
+ match self {
+- Droppable::DroppedTwice(_) => {
++ Droppable::DroppedTwice => {
+ unsafe {
+ DROP_COUNTER += 1;
+ }
+@@ -1078,12 +1079,21 @@ fn test_from_iter_specialization_panic_during_drop_leaks() {
+ }
+ }
+
++ let mut to_free: *mut Droppable = core::ptr::null_mut();
++ let mut cap = 0;
++
+ let _ = std::panic::catch_unwind(AssertUnwindSafe(|| {
+- let v = vec![Droppable::DroppedTwice(Box::new(123)), Droppable::PanicOnDrop];
++ let mut v = vec![Droppable::DroppedTwice, Droppable::PanicOnDrop];
++ to_free = v.as_mut_ptr();
++ cap = v.capacity();
+ let _ = v.into_iter().take(0).collect::<Vec<_>>();
+ }));
+
+ assert_eq!(unsafe { DROP_COUNTER }, 1);
++ // clean up the leak to keep miri happy
++ unsafe {
++ Vec::from_raw_parts(to_free, 0, cap);
++ }
+ }
+
+ #[test]
diff --git a/dev-lang/rust/rust-1.51.0-r1.ebuild b/dev-lang/rust/rust-1.51.0-r1.ebuild
new file mode 100644
index 00000000000..e2f25109d3e
--- /dev/null
+++ b/dev-lang/rust/rust-1.51.0-r1.ebuild
@@ -0,0 +1,622 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 12.
+# 3. Specify LLVM_MAX_SLOT, e.g. 11.
+LLVM_DEPEND="
+ || (
+ sys-devel/llvm:11[${LLVM_TARGET_USEDEPS// /,}]
+ )
+ <sys-devel/llvm-12:=
+ wasm? ( sys-devel/lld )
+"
+LLVM_MAX_SLOT=11
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-$(ver_cut 1).$(($(ver_cut 2) - 1))*
+ =dev-lang/rust-bin-$(ver_cut 1).$(($(ver_cut 2) - 1))*
+ =dev-lang/rust-$(ver_cut 1).$(ver_cut 2)*
+ =dev-lang/rust-bin-$(ver_cut 1).$(ver_cut 2)*
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ dev-util/cmake
+ dev-util/ninja
+ )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? (
+ ${LLVM_DEPEND}
+ )
+"
+
+# we need to block older versions due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warnings
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+# causes double bootstrap
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/1.47.0-libressl.patch
+ "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.51.0-bootstrap-panic.patch
+ "${FILESDIR}"/1.51.0-CVE-2020-36323.patch
+ "${FILESDIR}"/1.51.0-CVE-2021-28876.patch
+ #"${FILESDIR}"/1.51.0-CVE-2021-28878.patch
+ #"${FILESDIR}"/1.51.0-CVE-2021-28879.patch
+ "${FILESDIR}"/1.51.0-CVE-2021-31162.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+boostrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=6144
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ M=$(( $(usex system-llvm 0 2048) + ${M} ))
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 15 10) * ${M} / 10 ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+
+ use system-bootstrap && boostrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm32_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use miri; then
+ tools="\"miri\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ rust_stage0_root="$(rustc --print sysroot)"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+
+ rust_target="$(rust_abi)"
+
+ cat <<- _EOF_ > "${S}"/config.toml
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ compiler-docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = false
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- _EOF_ >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ _EOF_
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ar = "${cross_toolchain}-ar"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ # we need \n IFS to have config.env with spaces loaded properly. #734018
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ )
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml || die
+ )
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2021-04-05 4:27 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2021-04-05 4:27 UTC (permalink / raw
To: gentoo-commits
commit: a0103a61da2ab319aa179ff4b6e6f638f2b7fa7c
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 5 04:25:44 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Apr 5 04:26:15 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0103a61
dev-lang/rust: fix 1.51.0 bootstrap with same version
Closes: https://bugs.gentoo.org/779970
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.51.0-bootstrap-panic.patch | 43 ++++++++++++++++++++++++
dev-lang/rust/rust-1.51.0.ebuild | 1 +
2 files changed, 44 insertions(+)
diff --git a/dev-lang/rust/files/1.51.0-bootstrap-panic.patch b/dev-lang/rust/files/1.51.0-bootstrap-panic.patch
new file mode 100644
index 00000000000..529d5a1f402
--- /dev/null
+++ b/dev-lang/rust/files/1.51.0-bootstrap-panic.patch
@@ -0,0 +1,43 @@
+From 31c93397bde772764cda3058e16f9cef61895090 Mon Sep 17 00:00:00 2001
+From: Joshua Nelson <jyn514@gmail.com>
+Date: Mon, 8 Feb 2021 22:51:21 -0500
+Subject: [PATCH] Use format string in bootstrap panic instead of a string
+ directly
+
+This fixes the following warning when compiling with nightly:
+
+```
+warning: panic message is not a string literal
+ --> src/bootstrap/builder.rs:1515:24
+ |
+1515 | panic!(out);
+ | ^^^
+ |
+ = note: `#[warn(non_fmt_panic)]` on by default
+ = note: this is no longer accepted in Rust 2021
+help: add a "{}" format string to Display the message
+ |
+1515 | panic!("{}", out);
+ | ^^^^^
+help: or use std::panic::panic_any instead
+ |
+1515 | std::panic::panic_any(out);
+ | ^^^^^^^^^^^^^^^^^^^^^^
+```
+---
+ src/bootstrap/builder.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index f1a160250dbe1..0f5fcb4af400d 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -1490,7 +1490,7 @@ impl<'a> Builder<'a> {
+ for el in stack.iter().rev() {
+ out += &format!("\t{:?}\n", el);
+ }
+- panic!(out);
++ panic!("{}", out);
+ }
+ if let Some(out) = self.cache.get(&step) {
+ self.verbose(&format!("{}c {:?}", " ".repeat(stack.len()), step));
diff --git a/dev-lang/rust/rust-1.51.0.ebuild b/dev-lang/rust/rust-1.51.0.ebuild
index 630a170abe5..45c23455773 100644
--- a/dev-lang/rust/rust-1.51.0.ebuild
+++ b/dev-lang/rust/rust-1.51.0.ebuild
@@ -135,6 +135,7 @@ PATCHES=(
"${FILESDIR}"/1.47.0-libressl.patch
"${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.51.0-bootstrap-panic.patch
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2020-11-24 0:41 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2020-11-24 0:41 UTC (permalink / raw
To: gentoo-commits
commit: 539b8728990de5bb5158e0be98fbf48838d14a35
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 23 23:08:09 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Nov 24 00:39:10 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=539b8728
dev-lang/rust: bump to 1.48.0
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 15 +
.../files/1.48.0-gentoo-musl-target-specs.patch | 164 ++++++
dev-lang/rust/rust-1.48.0.ebuild | 590 +++++++++++++++++++++
3 files changed, 769 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 52fc44542f4..89bcd45b952 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -40,6 +40,21 @@ DIST rust-1.46.0-powerpc64le-unknown-linux-gnu.tar.xz 130200900 BLAKE2B d38a7f13
DIST rust-1.46.0-s390x-unknown-linux-gnu.tar.xz 134521076 BLAKE2B d3efd71dd7db812736680929185ad5f58a2dbf7d1b8a6f851834dd7b41713fc171dbcdf2472bedc13751bfeed58070d919d2a1138765ab75c0f4bdf817cb6418 SHA512 b6146695225ff6d0516e7bb6bc4620599356bb89b14f429a09d9d7f8715a94e8e218402346d5c9a10eeb54c0bdc40fb179289216b0cb4edd5bdf886f6b69aab4
DIST rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz 127200200 BLAKE2B 7d755e0622cda99d111490197b21ff4aaeb7b13292804566bc677b7b1d833eaa644b7a801863a1a01e3aa34be28a80344cae69edc57f8c8788884c78e037b750 SHA512 95f5adc2d2137010c7e5ac8a0fc70485250b4f9a909cb8b164b35fffff76ab88e9b09d305bfac37324ed080c5fc7643001d2abec5454ca911dc3513f1af52c88
DIST rust-1.46.0-x86_64-unknown-linux-musl.tar.xz 142372372 BLAKE2B 7d3672234b61b772e2311127db569b37296bf3a9bf86841fb78c6d20da6a6abfc6c866ba4aa7cc44c12eebb0744fbeb401b491314db9eb481b926792cadcca22 SHA512 e2599c4c10fe9725e63524d89c0be869d43347620b0f6ff1a93cee5e7219f5560c6171d8eda99e5624eba60b9d488bfe0942c23eacdbac2ba42e4cd63f14b7c9
+DIST rust-1.47.0-aarch64-unknown-linux-gnu.tar.xz 136486128 BLAKE2B 872226c232141e25466413d9a998bb021a6f4955dd8ccb5d68f8cca70ea8f7056a6f7b4125134b48a3106331dd3db2e77b32a0083fca3c66a348b77699c49e7a SHA512 7df7045df341f03508f1ad795a9117b39c1f4c4cc778c7fd9d78c42e7da662ce244d018084ac9e80d9409cf8b3b5d1ccc25ef4cb71a2b8727398d30a4e962e19
+DIST rust-1.47.0-arm-unknown-linux-gnueabi.tar.xz 133989400 BLAKE2B 301c17d6f9c048f43d460898ca352e189f7770539431721d178239d5cd64e9e62c05a63482049c18d6fe3fbaa463616d64cf6d82f2bd846576dedc6fc19bd3bd SHA512 db9caa96f142145c3f515730a1aee2fb24c9990f7b9b56e277997975409786904c6490609dfb29712acd9bba077acf36103e4d612bc6c2a74581b40fb50d12ad
+DIST rust-1.47.0-arm-unknown-linux-gnueabihf.tar.xz 133431024 BLAKE2B ab94ee2961ac3060154834d21a47384dd09a55213f1a7082911e0976ab9e572b5b234e175ad068cee0fa9355ef2d85acd7ebfff109565be013f14c32e61a71ff SHA512 fa0643c4b2eb36c2bcf4c786517d27fee4428114b79565e0da3b5626700275e9368ce6a68e93b4eae9881265ecca474cced25d63f352ffe3c8617a725185cd28
+DIST rust-1.47.0-armv7-unknown-linux-gnueabihf.tar.xz 137060904 BLAKE2B 8e6cbd665cdffcdd059dc4278dfb1647d046a96619f784dfe45299a0c29f1af51de4511b87cb8c0d0d166ba76b484f4249819e22275e2c1775c53b2ee5b1ffb5 SHA512 b207ab7c478dce6db4018527888f539938c8e77b5ceccb460b9d52ffee13a2329d225d03a605b60729cae6254129245bdd69730aebb6ec91dd0c83005cf25253
+DIST rust-1.47.0-i686-unknown-linux-gnu.tar.xz 154793612 BLAKE2B a8063a9241fb9fa8b7f9c430d65fd2353d3a1014e51148c9cd1b5686338ccf5170fbde78cb6f95a9d4db5441392ad4e7bf14e5a39418208937cda4019cf4e2e2 SHA512 551204b4edfc1500aa83108c88b845997bb6befba0dd3401e9ae5294ab27960421f1b3130159946b996171c1d46f7532afa0c3ae767a9318985db0bb7c88dba0
+DIST rust-1.47.0-mips-unknown-linux-gnu.tar.xz 122428884 BLAKE2B 10778716e282f9b74ef1a3daeec70ed1bb4f4dcc4a31baeed90c26f398bbe313df58b62469595ced95c73df9aad4739210add4eb3c6f0f94b5fa3dc937967394 SHA512 0e39ef2cd814474c33adc38658cbc2e84879f0208fbb37c1a4bf3719d3cace071606e7b03fd8464ba80f6328cc0a0bd38ec8e7772cc460b5a2d2d8b704042c49
+DIST rust-1.47.0-mips64-unknown-linux-gnuabi64.tar.xz 125553888 BLAKE2B 27c9f5d860025ceff4acb1e40ecfa0ec4c053ac694e4bec3bab41e2a193492afb8b4ac22ca471d3170ebe5c3e0fce628d0bf8060b5831af10bd99d614caaceb6 SHA512 186324da11997a65586930e5f2422c687a6ad817e3e0a5766caadbd51153cd29dd1e0d472586117c654d5db20e0ea2bd4073e05a94f3197bed2403dc325b31d5
+DIST rust-1.47.0-mipsel-unknown-linux-gnu.tar.xz 122801616 BLAKE2B 667712f3441ce63bcfc245801dd580ba8a9a06e0695b9f9a713baa55d8f9b8ca208a02f043918814490166a4c3dd2cb6ffa0d669b9533845f9c241063ee9b9c1 SHA512 8cd441739a25af20298ed25d877f8da4b81969e6f591d45527b94187808b7ce04ef6106785fc050d1318f71fccd00c295f60cdbf8fb79288aac80d92be9e57c4
+DIST rust-1.47.0-powerpc-unknown-linux-gnu.tar.xz 125781632 BLAKE2B 00e966a5ba83702ee36fc2dadd9d058f655d4ea8b3b0072b61d221508ccddb82efae0f5028768a4744b6c439e0f7080db5f727e9f2f7facd7d57964bc332b5a3 SHA512 8a20462ed79f22b868a3e64ba147b32c32eb0b0a149a7a571cc91ffe1ae9fe2d71a244c910817f3c151464f6c417550923a4f02e9dc433670b38502684bf349f
+DIST rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz 134272040 BLAKE2B c7b4256df6c7a031a53e022ba00999706674e273c041534b75743fee1d366567dcd86fb805ec9997737cff3902641e21269f2a95fef651227cac5da34c947091 SHA512 46fa1c042aebb06db4185fed6ef3bc7772f2a13f2290a20f5499757aae2a05dc984026315be7b5813aac172f52f50565e56aa074d32f6271858590a9ceb9e1c7
+DIST rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz 141965604 BLAKE2B b4b7ce862b2201526e6a96249e509faa7bce2d841e571b6dd241c9a82bd9011c92e0918df649ffcce7f3c6c93aa47aa8f66b99e6529b1b3cecbe16622b08e0b2 SHA512 d5c6580861786545f0540cc9591884fb9f2036061bdd451d17cf8bfb427008d365cacd14e5054028c72b83d1d5eb347ab74478a882cbbd7fcc75a7421657561c
+DIST rust-1.47.0-s390x-unknown-linux-gnu.tar.xz 146987276 BLAKE2B 1810e7bfbd235613563677449376167700c33960eb57b100e65058f6a00692316db518f2f4b79b39e414f3892c62bb1ec09b0866ff2221641c4a3056659a1668 SHA512 dd5877b6ff5c310ca6aa23c1cc621e6b0675d4c46f5a06b2a0b107641b604a1a2101109ba8e286267bab1158768c601d5d9a922a8da72486c91755ef465720c0
+DIST rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz 150891572 BLAKE2B 45ff02465ba82ae96de25dd616fa08abb2396be21236d2f66f831effb349f39b047a380b38cb83254f27e56cecdbea8478f4de8ccc0aa23b11de2f11a28f501b SHA512 f695986ab8e67636b0e92ca7ea223984121e3c22788434a6f1062690e7932f6b30c0c302160fef96831f821acedaf8a909bd3d00a9aa873c7200d2b8fa39013f
+DIST rust-1.47.0-x86_64-unknown-linux-musl.tar.xz 166456672 BLAKE2B d6ccfc574a81ae3e9e6a96805e6863009970b5c480f35ee0d582a204b782fe513b9c6c7094d1adea509de1a3097a8a0524ac00c2186b968f70f390615904eb5a SHA512 f71b162635955ecd8a6ec322818be69c788c18d4e923d84d901916648f2eb58573b1f97b460209294ee64198e76566b78e472f9cbca8665c59444adfc5ae603c
DIST rustc-1.45.2-src.tar.xz 98683036 BLAKE2B a4102a5d4744b7ccc9b076aba00c39d69532f777e7d39e0e4ce2033b663b43e27b55034fdb3a1e13379fae9a16bff9e7748865a84507f7388ef0ebf9d421eac7 SHA512 cc6250c0bc844e77ca6dd7ae013e434ed3009b001914114866ed31f28edf3960221454d131e298b15050e3b8153fb8298d509559c2f7307c64611aa8e36b4d25
DIST rustc-1.46.0-src.tar.xz 101868452 BLAKE2B da9798596b124a10d79c236a871228f05e5f571d22c2259328e7026c91e088c85f5de9c0536a16531e0cb10477bfcd16d3ac11467979f5561cb6199442b877ef SHA512 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4
DIST rustc-1.47.0-src.tar.xz 104143736 BLAKE2B 0454094dde35275488046826da87655e51bf0795481d6d08fd70d644bfc12481bca8641166106ef32f20494906025244715b16ff21a1c023f4bd2818aab42521 SHA512 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9
+DIST rustc-1.48.0-src.tar.xz 105951736 BLAKE2B 42468fc5ac5e80c4793cfe0913cbb8e43a8def28cc8cf5ed25ab989561e2bf33e155c83e180183362535cbc9008f341eb1273087a2364672b1a4032ac2d6ca45 SHA512 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23
diff --git a/dev-lang/rust/files/1.48.0-gentoo-musl-target-specs.patch b/dev-lang/rust/files/1.48.0-gentoo-musl-target-specs.patch
new file mode 100644
index 00000000000..850257f932e
--- /dev/null
+++ b/dev-lang/rust/files/1.48.0-gentoo-musl-target-specs.patch
@@ -0,0 +1,164 @@
+From 671ef2d1c228aed031b4232b8bea96f17b825263 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Mon, 23 Nov 2020 14:52:04 -0800
+Subject: [PATCH] add gentoo musl target specs
+
+---
+ .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++
+ .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +++++++++++
+ .../rustc_target/src/spec/i686_gentoo_linux_musl.rs | 11 +++++++++++
+ compiler/rustc_target/src/spec/mod.rs | 8 ++++++++
+ .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++
+ .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +++++++++++
+ .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +++++++++++
+ .../rustc_target/src/spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++
+ 8 files changed, 85 insertions(+)
+ create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+ create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+
+diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..420fe7c
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
++
++pub fn target() -> TargetResult {
++ let mut base = super::aarch64_unknown_linux_musl::target()?;
++
++ base.llvm_target = "aarch64-gentoo-linux-musl".to_string();
++ base.target_vendor = "gentoo".to_string();
++ base.options.crt_static_default = false;
++
++ Ok(base)
++}
+diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+new file mode 100644
+index 0000000..067e2d6
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
++
++pub fn target() -> TargetResult {
++ let mut base = super::armv7_unknown_linux_musleabihf::target()?;
++
++ base.llvm_target = "armv7-gentoo-linux-musleabihf".to_string();
++ base.target_vendor = "gentoo".to_string();
++ base.options.crt_static_default = false;
++
++ Ok(base)
++}
+diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..1cd39cd
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
++
++pub fn target() -> TargetResult {
++ let mut base = super::i686_unknown_linux_musl::target()?;
++
++ base.llvm_target = "i686-gentoo-linux-musl".to_string();
++ base.target_vendor = "gentoo".to_string();
++ base.options.crt_static_default = false;
++
++ Ok(base)
++}
+diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
+index f1e8330..d8c0ba0 100644
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -490,6 +490,14 @@ macro_rules! supported_targets {
+ }
+
+ supported_targets! {
++ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
++ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf),
++ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
++ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
++ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
++ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl),
++ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
++
+ ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
+ ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
+ ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
+diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..e840bb2
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
++
++pub fn target() -> TargetResult {
++ let mut base = super::powerpc64_unknown_linux_musl::target()?;
++
++ base.llvm_target = "powerpc64-gentoo-linux-musl".to_string();
++ base.target_vendor = "gentoo".to_string();
++ base.options.crt_static_default = false;
++
++ Ok(base)
++}
+diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..1037d82
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
++
++pub fn target() -> TargetResult {
++ let mut base = super::powerpc64le_unknown_linux_musl::target()?;
++
++ base.llvm_target = "powerpc64le-gentoo-linux-musl".to_string();
++ base.target_vendor = "gentoo".to_string();
++ base.options.crt_static_default = false;
++
++ Ok(base)
++}
+diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..a623ffe
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
++
++pub fn target() -> TargetResult {
++ let mut base = super::powerpc_unknown_linux_musl::target()?;
++
++ base.llvm_target = "powerpc-gentoo-linux-musl".to_string();
++ base.target_vendor = "gentoo".to_string();
++ base.options.crt_static_default = false;
++
++ Ok(base)
++}
+diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..f330473
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::TargetResult;
++
++pub fn target() -> TargetResult {
++ let mut base = super::x86_64_unknown_linux_musl::target()?;
++
++ base.llvm_target = "x86_64-gentoo-linux-musl".to_string();
++ base.target_vendor = "gentoo".to_string();
++ base.options.crt_static_default = false;
++
++ Ok(base)
++}
+--
+2.29.2
+
diff --git a/dev-lang/rust/rust-1.48.0.ebuild b/dev-lang/rust/rust-1.48.0.ebuild
new file mode 100644
index 00000000000..145293e816d
--- /dev/null
+++ b/dev-lang/rust/rust-1.48.0.ebuild
@@ -0,0 +1,590 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc libressl miri nightly parallel-compiler rls rustfmt +system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 12.
+# 3. Specify LLVM_MAX_SLOT, e.g. 11.
+LLVM_DEPEND="
+ || (
+ sys-devel/llvm:11[${LLVM_TARGET_USEDEPS// /,}]
+ )
+ <sys-devel/llvm-12:=
+ wasm? ( sys-devel/lld )
+"
+LLVM_MAX_SLOT=11
+
+BOOTSTRAP_DEPEND="|| ( >=dev-lang/rust-1.$(($(ver_cut 2) - 1)) >=dev-lang/rust-bin-1.$(($(ver_cut 2) - 1)) )"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ dev-util/cmake
+ dev-util/ninja
+ )
+"
+
+DEPEND="
+ >=dev-libs/libgit2-1.1.0:=
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? (
+ ${LLVM_DEPEND}
+ )
+"
+
+# we need to block versions older than 1.47.0 due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warnings
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+# causes double bootstrap
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/1.47.0-libressl.patch
+ "${FILESDIR}"/1.46.0-don-t-create-prefix-at-time-of-check.patch
+ "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.47.0-llvm-tensorflow-fix.patch
+ "${FILESDIR}"/1.48.0-gentoo-musl-target-specs.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+boostrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rustc version!"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run \'eselect rust\' and set correct rust version"
+ die
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=6144
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ M=$(( $(usex system-llvm 0 2048) + ${M} ))
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 15 10) * ${M} / 10 ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ use system-bootstrap && boostrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' src/librustc_target/spec/wasm32_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use miri; then
+ tools="\"miri\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ rust_stage0_root="$(rustc --print sysroot)"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+
+ rust_target="$(rust_abi)"
+
+ cat <<- _EOF_ > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ compiler-docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = false
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debuginfo-level-rustc = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- _EOF_ >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ _EOF_
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ar = "${cross_toolchain}-ar"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following settings:"
+ cat "${S}"/config.toml || die
+}
+
+src_compile() {
+ # we need \n IFS to have config.env with spaces loaded properly. #734018
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ )
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
+ "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ )
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ # https://github.com/rust-lang/rust/issues/77721
+ # also 1.46.0-don-t-create-prefix-at-time-of-check.patch
+ dodir "/usr/lib/${PN}/${PV}"
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) DESTDIR="${D}" \
+ "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml || die
+ )
+
+ # bug #689562, #689160
+ rm -v "${D}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${D}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2020-10-28 1:42 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2020-10-28 1:42 UTC (permalink / raw
To: gentoo-commits
commit: b4fb6fc0f73b4b4145236b56355c35070c3b529a
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 28 01:39:19 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Oct 28 01:39:41 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4fb6fc0
dev-lang/rust: fix build with tensorflow installed
Closes: https://bugs.gentoo.org/750875
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../rust/files/1.47.0-llvm-tensorflow-fix.patch | 55 ++++++++++++++++++++++
dev-lang/rust/rust-1.47.0-r1.ebuild | 1 +
2 files changed, 56 insertions(+)
diff --git a/dev-lang/rust/files/1.47.0-llvm-tensorflow-fix.patch b/dev-lang/rust/files/1.47.0-llvm-tensorflow-fix.patch
new file mode 100644
index 00000000000..5b12c15ff40
--- /dev/null
+++ b/dev-lang/rust/files/1.47.0-llvm-tensorflow-fix.patch
@@ -0,0 +1,55 @@
+From 8dcb88f7705fb3927938dd9bd103efcabafcefb0 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Tue, 27 Oct 2020 18:20:56 -0700
+Subject: [PATCH] backport D88371, guard `find_library(tensorflow_c_api ...)`
+
+Differential Revision: https://reviews.llvm.org/D88371
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ src/llvm-project/llvm/CMakeLists.txt | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/src/llvm-project/llvm/CMakeLists.txt b/src/llvm-project/llvm/CMakeLists.txt
+index 1f137f0..4112def 100644
+--- a/src/llvm-project/llvm/CMakeLists.txt
++++ b/src/llvm-project/llvm/CMakeLists.txt
+@@ -832,6 +832,11 @@ configure_file(
+ ${LLVM_INCLUDE_DIR}/llvm/Config/Targets.def
+ )
+
++# They are not referenced. See set_output_directory().
++set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
++set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
++set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
++
+ # For up-to-date instructions for installing the Tensorflow dependency, refer to
+ # the bot setup script: https://github.com/google/ml-compiler-opt/blob/master/buildbot/buildbot_init.sh
+ # In this case, the latest C API library is available for download from
+@@ -840,9 +845,9 @@ configure_file(
+ # LLVM_HAVE_TF_API, through llvm-config.h, so that a user of the LLVM library may
+ # also leverage the dependency.
+ set(TENSORFLOW_C_LIB_PATH "" CACHE PATH "Path to TensorFlow C library install")
+-find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib)
+
+-if (tensorflow_c_api)
++if (TENSORFLOW_C_LIB_PATH)
++ find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib NO_DEFAULT_PATH REQUIRED)
+ set(LLVM_HAVE_TF_API "ON" CACHE BOOL "Full Tensorflow API available")
+ include_directories(${TENSORFLOW_C_LIB_PATH}/include)
+ endif()
+@@ -877,12 +882,6 @@ add_custom_target(srpm
+ COMMAND rpmbuild -bs --define '_topdir ${LLVM_SRPM_DIR}' ${LLVM_SRPM_BINARY_SPECFILE})
+ set_target_properties(srpm PROPERTIES FOLDER "Misc")
+
+-
+-# They are not referenced. See set_output_directory().
+-set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
+-set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
+-set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
+-
+ if(APPLE AND DARWIN_LTO_LIBRARY)
+ set(CMAKE_EXE_LINKER_FLAGS
+ "${CMAKE_EXE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
+--
+2.26.2
+
diff --git a/dev-lang/rust/rust-1.47.0-r1.ebuild b/dev-lang/rust/rust-1.47.0-r1.ebuild
index cd258a9cb85..371a9cd72b5 100644
--- a/dev-lang/rust/rust-1.47.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.47.0-r1.ebuild
@@ -122,6 +122,7 @@ PATCHES=(
"${FILESDIR}"/1.47.0-libressl.patch
"${FILESDIR}"/1.46.0-don-t-create-prefix-at-time-of-check.patch
"${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.47.0-llvm-tensorflow-fix.patch
"${FILESDIR}"/gentoo-musl-target-specs.patch
)
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2020-06-05 8:53 Stefan Strogin
0 siblings, 0 replies; 33+ messages in thread
From: Stefan Strogin @ 2020-06-05 8:53 UTC (permalink / raw
To: gentoo-commits
commit: 1d96ad33ef698286ac2fea7a71fda01e2c458da5
Author: Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 5 08:50:33 2020 +0000
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Fri Jun 5 08:51:58 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d96ad33
dev-lang/rust: add patch for LibreSSL 3.2.x
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
dev-lang/rust/files/1.44.0-libressl.patch | 45 +++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.44.0.ebuild | 1 +
2 files changed, 46 insertions(+)
diff --git a/dev-lang/rust/files/1.44.0-libressl.patch b/dev-lang/rust/files/1.44.0-libressl.patch
new file mode 100644
index 00000000000..3bbae36e016
--- /dev/null
+++ b/dev-lang/rust/files/1.44.0-libressl.patch
@@ -0,0 +1,45 @@
+From 3d1be8d8981a0f847e935312a78bd2ba5129f90e Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Fri, 5 Jun 2020 06:37:06 +0300
+Subject: [PATCH] Support LibreSSL 3.2.x
+
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ vendor/openssl-sys/.cargo-checksum.json | 2 +-
+ vendor/openssl-sys/build/main.rs | 5 ++++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
+index 7f63bae3d..76025fe7f 100644
+--- a/vendor/openssl-sys/.cargo-checksum.json
++++ b/vendor/openssl-sys/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"CHANGELOG.md":"ffd4bbaeec2740afbcab5a6828f9e65523aaff8638e3d5d13c93a3241fb8ed2f","Cargo.toml":"3eb2f65dda1aa74c8b47814878b56bf4999b4d01bc5864fc9f3c0ece9a5694a7","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"56cee620b082d87b1c9cdeba7c6c022e6aa7d3a99e2b66ec18a534ceaf2e2bb7","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"6e800f4dc5c2cbbd54d1b1b995a2915ff941e17e11300d7091858210d3ce788d","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"5afdfc0ab87259b13a55375c178ae3af934b3281240aa24ca27afac7acccea42","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"c464eca1beb33844718044946f6ffb1bc27356d65b5b70ebcd2d4082520e7235","src/macros.rs":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"13bf789702e37dc4b9f74f3a0e61ae6e5602e4dedf45c05d884c41257b32d76c","src/pem.rs":"4427060f543ae9e6745d9a8f7f76cb72acfb06afacaf396b011afff6a221714b","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"34ad7d5413d77f9052815cfd7344d5a21868b5ae0d38dadd6f4ed3b5c4b33760","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986"}
+\ No newline at end of file
++{"files":{"CHANGELOG.md":"ffd4bbaeec2740afbcab5a6828f9e65523aaff8638e3d5d13c93a3241fb8ed2f","Cargo.toml":"3eb2f65dda1aa74c8b47814878b56bf4999b4d01bc5864fc9f3c0ece9a5694a7","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"56cee620b082d87b1c9cdeba7c6c022e6aa7d3a99e2b66ec18a534ceaf2e2bb7","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"049f7020b6a1f8bb831cb750054fbc0f408e048e34c0817644696ec9d0cfb06e","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"1f38a3ec4029511fecd7a51548965a265f3e7772891b5514e22bfb1d
061b3a90","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"5afdfc0ab87259b13a55375c178ae3af934b3281240aa24ca27afac7acccea42","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"c464eca1beb33844718044946f6ffb1bc27356d65b5b70ebcd2d4082520e7235","src/macros.rs":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"13bf789702e37dc4b9f74f3a0e61ae6e5602e4dedf45c05d884c41257b32d76c","src/pem.rs":"4427060f543ae9e6745d9a8f7f76cb72acfb06afacaf396b011afff6a221714b","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"34ad7d5413d77f9052815cfd7344d5a21868b5ae0d38dadd6f4ed3b5c4b33760","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986"}
+diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
+index 162e11a66..6754ddeef 100644
+--- a/vendor/openssl-sys/build/main.rs
++++ b/vendor/openssl-sys/build/main.rs
+@@ -204,6 +204,9 @@ See rust-openssl README for more information:
+ (3, 0, 0) => ('3', '0', '0'),
+ (3, 0, 1) => ('3', '0', '1'),
+ (3, 0, _) => ('3', '0', 'x'),
++ (3, 1, 0) => ('3', '1', '0'),
++ (3, 1, _) => ('3', '1', 'x'),
++ (3, 2, _) => ('3', '2', 'x'),
+ _ => version_error(),
+ };
+
+@@ -244,7 +247,7 @@ fn version_error() -> ! {
+ "
+
+ This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
+-through 3.0.x, but a different version of OpenSSL was found. The build is now aborting
++through 3.2.x, but a different version of OpenSSL was found. The build is now aborting
+ due to this version mismatch.
+
+ "
+--
+2.27.0
+
diff --git a/dev-lang/rust/rust-1.44.0.ebuild b/dev-lang/rust/rust-1.44.0.ebuild
index e43191f125e..5deb73a5022 100644
--- a/dev-lang/rust/rust-1.44.0.ebuild
+++ b/dev-lang/rust/rust-1.44.0.ebuild
@@ -117,6 +117,7 @@ RESTRICT="test"
PATCHES=(
"${FILESDIR}"/0012-Ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.44.0-libressl.patch
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2020-04-10 11:28 Stefan Strogin
0 siblings, 0 replies; 33+ messages in thread
From: Stefan Strogin @ 2020-04-10 11:28 UTC (permalink / raw
To: gentoo-commits
commit: 0ae60725796a8ec0bbdac0a33c94e77046ee7e3a
Author: Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 10 11:25:51 2020 +0000
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Fri Apr 10 11:27:53 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ae60725
dev-lang/rust: add patch for LibreSSL 3.1.0 support
Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
dev-lang/rust/files/1.42.0-libressl.patch | 43 +++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.42.0.ebuild | 1 +
2 files changed, 44 insertions(+)
diff --git a/dev-lang/rust/files/1.42.0-libressl.patch b/dev-lang/rust/files/1.42.0-libressl.patch
new file mode 100644
index 00000000000..2606b3bb17f
--- /dev/null
+++ b/dev-lang/rust/files/1.42.0-libressl.patch
@@ -0,0 +1,43 @@
+From aedf1cffc61878fdea9e59468dc44cdb56eb7cf5 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Fri, 10 Apr 2020 09:18:41 +0300
+Subject: [PATCH] Support LibreSSL 3.1.0
+
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ vendor/openssl-sys/.cargo-checksum.json | 2 +-
+ vendor/openssl-sys/build/main.rs | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
+index e0bfd3035..8e2f52217 100644
+--- a/vendor/openssl-sys/.cargo-checksum.json
++++ b/vendor/openssl-sys/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"CHANGELOG.md":"736f0ad8717294a2ccb82065547f7161aa979eaad38c08c16d74954ece406dde","Cargo.toml":"4dbed0ba08fc7676bf7f6350eaaef6e6edb21b350718c218aae1d6372ec5918c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"4f39735ff73e6a13ff6ad34b9c046546a5887d705a86f68d1a8866fb305f728f","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"6e800f4dc5c2cbbd54d1b1b995a2915ff941e17e11300d7091858210d3ce788d","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928
f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"ddd25891a630f4676b16bd63ed3071f1b036722c7cdf1a72ca0a54cd3bf91898","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"c464eca1beb33844718044946f6ffb1bc27356d65b5b70ebcd2d4082520e7235","src/macros.rs":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"fbe95faaeb5b13ce44eb6574b4e21aa384d60fad079e895acaa61390887240d1","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"215a27daa698c73fa909159a9e88a4302b075c33ebd17699f7f3423de60f5d68","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"465d16ae7fc0e313318f7de5cecf57b2fbe7511fd213978b457e1c96ff46736f"}
+\ No newline at end of file
++{"files":{"CHANGELOG.md":"736f0ad8717294a2ccb82065547f7161aa979eaad38c08c16d74954ece406dde","Cargo.toml":"4dbed0ba08fc7676bf7f6350eaaef6e6edb21b350718c218aae1d6372ec5918c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"949fb3913ec7f94229242978dfeee5e19261b6d7506fc91dcd153bb0d2a84895","build/cfgs.rs":"4f39735ff73e6a13ff6ad34b9c046546a5887d705a86f68d1a8866fb305f728f","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"90bdf5c8d11678455cd65d29d5fd0969d248ff9be2b2a93c6e5decb71b514871","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"254025cb408dbeff73bee6d06325acba9042cb11db30bdad04eedfb789be84b3","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928
f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"f21a403fea95e7b7efe0539a429831cfa51c8818adb79c7ebf73ae2a6f2dc87e","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"a1279719ade9704be3d9af55ff679abbe918d525f332ca15810146d45e9080cf","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"81372dfe497db2fc90457a470a3b8ccb249828b3ce2bf4fd2da8ec42afd6a6b3","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"ddd25891a630f4676b16bd63ed3071f1b036722c7cdf1a72ca0a54cd3bf91898","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"c464eca1beb33844718044946f6ffb1bc27356d65b5b70ebcd2d4082520e7235","src/macros.rs":"638fb9
098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"7203d356f7654c5805600b823eccf8e1d9d9cbce9a01859938612a3f0aae4cdc","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"fbe95faaeb5b13ce44eb6574b4e21aa384d60fad079e895acaa61390887240d1","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"1a6b028a63654d2419417a9a8af790cd22409a4643682a0686ecdb9441264eba","src/srtp.rs":"306047f3f31828fe7
d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"215a27daa698c73fa909159a9e88a4302b075c33ebd17699f7f3423de60f5d68","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"465d16ae7fc0e313318f7de5cecf57b2fbe7511fd213978b457e1c96ff46736f"}
+diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
+index 162e11a66..d3f723bbe 100644
+--- a/vendor/openssl-sys/build/main.rs
++++ b/vendor/openssl-sys/build/main.rs
+@@ -204,6 +204,7 @@ See rust-openssl README for more information:
+ (3, 0, 0) => ('3', '0', '0'),
+ (3, 0, 1) => ('3', '0', '1'),
+ (3, 0, _) => ('3', '0', 'x'),
++ (3, 1, 0) => ('3', '1', '0'),
+ _ => version_error(),
+ };
+
+@@ -244,7 +245,7 @@ fn version_error() -> ! {
+ "
+
+ This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
+-through 3.0.x, but a different version of OpenSSL was found. The build is now aborting
++through 3.1.0, but a different version of OpenSSL was found. The build is now aborting
+ due to this version mismatch.
+
+ "
+--
+2.26.0
+
diff --git a/dev-lang/rust/rust-1.42.0.ebuild b/dev-lang/rust/rust-1.42.0.ebuild
index 1b72b56f8df..d61ae45fa31 100644
--- a/dev-lang/rust/rust-1.42.0.ebuild
+++ b/dev-lang/rust/rust-1.42.0.ebuild
@@ -109,6 +109,7 @@ QA_SONAME="usr/lib.*/librustc_macros.*.so"
PATCHES=(
"${FILESDIR}"/1.40.0-add-soname.patch
"${FILESDIR}"/1.42.0-fix-bootstrap.patch
+ "${FILESDIR}"/1.42.0-libressl.patch
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2020-03-28 19:08 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2020-03-28 19:08 UTC (permalink / raw
To: gentoo-commits
commit: db3aa7638741984c27df6bb96069ed1a40ad54c8
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 28 18:31:31 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 19:07:52 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db3aa763
dev-lang/rust: fix system-bootstrap with 1.42.0
Closes: https://bugs.gentoo.org/715142
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.42.0-fix-bootstrap.patch | 440 +++++++++++++++++++++++++
dev-lang/rust/rust-1.42.0.ebuild | 1 +
2 files changed, 441 insertions(+)
diff --git a/dev-lang/rust/files/1.42.0-fix-bootstrap.patch b/dev-lang/rust/files/1.42.0-fix-bootstrap.patch
new file mode 100644
index 00000000000..16e4e6dce1c
--- /dev/null
+++ b/dev-lang/rust/files/1.42.0-fix-bootstrap.patch
@@ -0,0 +1,440 @@
+From 5f979e9afab42dd7536ca93994de66169880361e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= <matthias.krueger@famsik.de>
+Date: Mon, 3 Feb 2020 20:13:30 +0100
+Subject: [PATCH] bootstrap: fix clippy warnings
+
+---
+ src/bootstrap/bin/rustc.rs | 6 +++---
+ src/bootstrap/bin/rustdoc.rs | 2 +-
+ src/bootstrap/builder.rs | 24 ++++++++----------------
+ src/bootstrap/builder/tests.rs | 1 -
+ src/bootstrap/compile.rs | 20 ++++++++++----------
+ src/bootstrap/config.rs | 7 +++----
+ src/bootstrap/dist.rs | 4 ++--
+ src/bootstrap/doc.rs | 2 +-
+ src/bootstrap/flags.rs | 2 +-
+ src/bootstrap/install.rs | 5 ++---
+ src/bootstrap/lib.rs | 6 +++---
+ src/bootstrap/metadata.rs | 1 -
+ src/bootstrap/native.rs | 4 +---
+ src/bootstrap/test.rs | 9 +++------
+ src/bootstrap/tool.rs | 2 +-
+ src/bootstrap/toolstate.rs | 2 +-
+ src/bootstrap/util.rs | 2 +-
+ 17 files changed, 41 insertions(+), 58 deletions(-)
+
+diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
+index a34ec44566bc..a8c00c8c3ca8 100644
+--- a/src/bootstrap/bin/rustc.rs
++++ b/src/bootstrap/bin/rustc.rs
+@@ -47,7 +47,7 @@ fn main() {
+ };
+ let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set");
+ let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
+- let on_fail = env::var_os("RUSTC_ON_FAIL").map(|of| Command::new(of));
++ let on_fail = env::var_os("RUSTC_ON_FAIL").map(Command::new);
+
+ let rustc = env::var_os(rustc).unwrap_or_else(|| panic!("{:?} was not set", rustc));
+ let libdir = env::var_os(libdir).unwrap_or_else(|| panic!("{:?} was not set", libdir));
+@@ -64,7 +64,7 @@ fn main() {
+ if let Some(crate_name) = crate_name {
+ if let Some(target) = env::var_os("RUSTC_TIME") {
+ if target == "all"
+- || target.into_string().unwrap().split(",").any(|c| c.trim() == crate_name)
++ || target.into_string().unwrap().split(',').any(|c| c.trim() == crate_name)
+ {
+ cmd.arg("-Ztime");
+ }
+@@ -189,7 +189,7 @@ fn main() {
+ crate_name,
+ is_test,
+ dur.as_secs(),
+- dur.subsec_nanos() / 1_000_000
++ dur.subsec_millis()
+ );
+
+ match status.code() {
+diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
+index 8c8b33a4e4e0..04345867bf5c 100644
+--- a/src/bootstrap/bin/rustdoc.rs
++++ b/src/bootstrap/bin/rustdoc.rs
+@@ -61,7 +61,7 @@ fn main() {
+ }
+
+ // Needed to be able to run all rustdoc tests.
+- if let Some(_) = env::var_os("RUSTDOC_GENERATE_REDIRECT_PAGES") {
++ if env::var_os("RUSTDOC_GENERATE_REDIRECT_PAGES").is_some() {
+ // This "unstable-options" can be removed when `--generate-redirect-pages` is stabilized
+ if !has_unstable {
+ cmd.arg("-Z").arg("unstable-options");
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index d9c894aa9c6b..18f6fda76084 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -510,7 +510,7 @@ impl<'a> Builder<'a> {
+ Subcommand::Format { .. } | Subcommand::Clean { .. } => panic!(),
+ };
+
+- let builder = Builder {
++ Builder {
+ build,
+ top_stage: build.config.stage.unwrap_or(2),
+ kind,
+@@ -518,9 +518,7 @@ impl<'a> Builder<'a> {
+ stack: RefCell::new(Vec::new()),
+ time_spent_on_dependencies: Cell::new(Duration::new(0, 0)),
+ paths: paths.to_owned(),
+- };
+-
+- builder
++ }
+ }
+
+ pub fn execute_cli(&self) {
+@@ -753,13 +751,12 @@ impl<'a> Builder<'a> {
+ cargo.env("RUST_CHECK", "1");
+ }
+
+- let stage;
+- if compiler.stage == 0 && self.local_rebuild {
++ let stage = if compiler.stage == 0 && self.local_rebuild {
+ // Assume the local-rebuild rustc already has stage1 features.
+- stage = 1;
++ 1
+ } else {
+- stage = compiler.stage;
+- }
++ compiler.stage
++ };
+
+ let mut rustflags = Rustflags::new(&target);
+ if stage != 0 {
+@@ -1252,12 +1249,7 @@ impl<'a> Builder<'a> {
+ };
+
+ if self.config.print_step_timings && dur > Duration::from_millis(100) {
+- println!(
+- "[TIMING] {:?} -- {}.{:03}",
+- step,
+- dur.as_secs(),
+- dur.subsec_nanos() / 1_000_000
+- );
++ println!("[TIMING] {:?} -- {}.{:03}", step, dur.as_secs(), dur.subsec_millis());
+ }
+
+ {
+@@ -1302,7 +1294,7 @@ impl Rustflags {
+
+ fn arg(&mut self, arg: &str) -> &mut Self {
+ assert_eq!(arg.split_whitespace().count(), 1);
+- if self.0.len() > 0 {
++ if !self.0.is_empty() {
+ self.0.push_str(" ");
+ }
+ self.0.push_str(arg);
+diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs
+index 5fefb972866a..cca8ab80c93b 100644
+--- a/src/bootstrap/builder/tests.rs
++++ b/src/bootstrap/builder/tests.rs
+@@ -19,7 +19,6 @@ fn configure(host: &[&str], target: &[&str]) -> Config {
+ config.out = dir;
+ config.build = INTERNER.intern_str("A");
+ config.hosts = vec![config.build]
+- .clone()
+ .into_iter()
+ .chain(host.iter().map(|s| INTERNER.intern_str(s)))
+ .collect::<Vec<_>>();
+diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
+index eced03506ab9..7dded96e18ef 100644
+--- a/src/bootstrap/compile.rs
++++ b/src/bootstrap/compile.rs
+@@ -18,7 +18,6 @@ use std::str;
+ use build_helper::{output, t, up_to_date};
+ use filetime::FileTime;
+ use serde::Deserialize;
+-use serde_json;
+
+ use crate::builder::Cargo;
+ use crate::dist;
+@@ -149,7 +148,8 @@ fn copy_third_party_objects(
+ // which is provided by std for this target.
+ if target == "x86_64-fortanix-unknown-sgx" {
+ let src_path_env = "X86_FORTANIX_SGX_LIBS";
+- let src = env::var(src_path_env).expect(&format!("{} not found in env", src_path_env));
++ let src =
++ env::var(src_path_env).unwrap_or_else(|_| panic!("{} not found in env", src_path_env));
+ copy_and_stamp(Path::new(&src), "libunwind.a");
+ }
+
+@@ -361,7 +361,7 @@ impl Step for StartupObjects {
+ );
+ }
+
+- let target = sysroot_dir.join(file.to_string() + ".o");
++ let target = sysroot_dir.join((*file).to_string() + ".o");
+ builder.copy(dst_file, &target);
+ target_deps.push(target);
+ }
+@@ -515,7 +515,7 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: Interne
+ .env("CFG_VERSION", builder.rust_version())
+ .env("CFG_PREFIX", builder.config.prefix.clone().unwrap_or_default());
+
+- let libdir_relative = builder.config.libdir_relative().unwrap_or(Path::new("lib"));
++ let libdir_relative = builder.config.libdir_relative().unwrap_or_else(|| Path::new("lib"));
+ cargo.env("CFG_LIBDIR_RELATIVE", libdir_relative);
+
+ if let Some(ref ver_date) = builder.rust_info.commit_date() {
+@@ -843,11 +843,11 @@ pub fn run_cargo(
+ };
+ for filename in filenames {
+ // Skip files like executables
+- if !filename.ends_with(".rlib")
+- && !filename.ends_with(".lib")
+- && !filename.ends_with(".a")
+- && !is_dylib(&filename)
+- && !(is_check && filename.ends_with(".rmeta"))
++ if !(filename.ends_with(".rlib")
++ || filename.ends_with(".lib")
++ || filename.ends_with(".a")
++ || is_dylib(&filename)
++ || (is_check && filename.ends_with(".rmeta")))
+ {
+ continue;
+ }
+@@ -905,7 +905,7 @@ pub fn run_cargo(
+ for (prefix, extension, expected_len) in toplevel {
+ let candidates = contents.iter().filter(|&&(_, ref filename, ref meta)| {
+ filename.starts_with(&prefix[..])
+- && filename[prefix.len()..].starts_with("-")
++ && filename[prefix.len()..].starts_with('-')
+ && filename.ends_with(&extension[..])
+ && meta.len() == expected_len
+ });
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 110c8b844d54..709cf2908ead 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -16,7 +16,6 @@ use crate::flags::Flags;
+ pub use crate::flags::Subcommand;
+ use build_helper::t;
+ use serde::Deserialize;
+-use toml;
+
+ /// Global configuration for the entire build and/or bootstrap.
+ ///
+@@ -440,7 +439,7 @@ impl Config {
+ }
+ }
+ })
+- .unwrap_or_else(|| TomlConfig::default());
++ .unwrap_or_else(TomlConfig::default);
+
+ let build = toml.build.clone().unwrap_or_default();
+ // set by bootstrap.py
+@@ -539,7 +538,7 @@ impl Config {
+ config.llvm_ldflags = llvm.ldflags.clone();
+ set(&mut config.llvm_use_libcxx, llvm.use_libcxx);
+ config.llvm_use_linker = llvm.use_linker.clone();
+- config.llvm_allow_old_toolchain = llvm.allow_old_toolchain.clone();
++ config.llvm_allow_old_toolchain = llvm.allow_old_toolchain;
+ }
+
+ if let Some(ref rust) = toml.rust {
+@@ -606,7 +605,7 @@ impl Config {
+ target.ar = cfg.ar.clone().map(PathBuf::from);
+ target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
+ target.linker = cfg.linker.clone().map(PathBuf::from);
+- target.crt_static = cfg.crt_static.clone();
++ target.crt_static = cfg.crt_static;
+ target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+ target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index 8d13df3ee21a..651506dbaa8a 100644
+--- a/src/bootstrap/dist.rs
++++ b/src/bootstrap/dist.rs
+@@ -827,7 +827,7 @@ impl Step for Analysis {
+ assert!(builder.config.extended);
+ let name = pkgname(builder, "rust-analysis");
+
+- if &compiler.host != builder.config.build {
++ if compiler.host != builder.config.build {
+ return distdir(builder).join(format!("{}-{}.tar.gz", name, target));
+ }
+
+@@ -876,7 +876,7 @@ fn copy_src_dirs(builder: &Builder<'_>, src_dirs: &[&str], exclude_dirs: &[&str]
+ Some(path) => path,
+ None => return false,
+ };
+- if spath.ends_with("~") || spath.ends_with(".pyc") {
++ if spath.ends_with('~') || spath.ends_with(".pyc") {
+ return false;
+ }
+
+diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
+index 204056598d90..b0d9a5b94641 100644
+--- a/src/bootstrap/doc.rs
++++ b/src/bootstrap/doc.rs
+@@ -560,7 +560,7 @@ impl Step for Rustdoc {
+ builder.ensure(Rustc { stage, target });
+
+ // Build rustdoc.
+- builder.ensure(tool::Rustdoc { compiler: compiler });
++ builder.ensure(tool::Rustdoc { compiler });
+
+ // Symlink compiler docs to the output directory of rustdoc documentation.
+ let out_dir = builder.stage_out(compiler, Mode::ToolRustc).join(target).join("doc");
+diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs
+index 2101ef27f9d4..516be6a30c23 100644
+--- a/src/bootstrap/flags.rs
++++ b/src/bootstrap/flags.rs
+@@ -571,7 +571,7 @@ fn split(s: &[String]) -> Vec<String> {
+ }
+
+ fn parse_deny_warnings(matches: &getopts::Matches) -> Option<bool> {
+- match matches.opt_str("warnings").as_ref().map(|v| v.as_str()) {
++ match matches.opt_str("warnings").as_deref() {
+ Some("deny") => Some(true),
+ Some("warn") => Some(false),
+ Some(value) => {
+diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
+index f8734ebdf425..6549262811b9 100644
+--- a/src/bootstrap/install.rs
++++ b/src/bootstrap/install.rs
+@@ -126,9 +126,8 @@ fn add_destdir(path: &Path, destdir: &Option<PathBuf>) -> PathBuf {
+ None => return path.to_path_buf(),
+ };
+ for part in path.components() {
+- match part {
+- Component::Normal(s) => ret.push(s),
+- _ => {}
++ if let Component::Normal(s) = part {
++ ret.push(s)
+ }
+ }
+ ret
+diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
+index 1fee3fd9ac1d..0db4fb389010 100644
+--- a/src/bootstrap/lib.rs
++++ b/src/bootstrap/lib.rs
+@@ -444,7 +444,7 @@ impl Build {
+ builder.execute_cli();
+ } else {
+ let builder = builder::Builder::new(&self);
+- let _ = builder.execute_cli();
++ builder.execute_cli();
+ }
+
+ // Check for postponed failures from `test --no-fail-fast`.
+@@ -839,7 +839,7 @@ impl Build {
+ .target_config
+ .get(&target)
+ .and_then(|t| t.musl_root.as_ref())
+- .or(self.config.musl_root.as_ref())
++ .or_else(|| self.config.musl_root.as_ref())
+ .map(|p| &**p)
+ }
+
+@@ -1026,7 +1026,7 @@ impl Build {
+ }
+
+ fn llvm_link_tools_dynamically(&self, target: Interned<String>) -> bool {
+- (target.contains("linux-gnu") || target.contains("apple-darwin"))
++ target.contains("linux-gnu") || target.contains("apple-darwin")
+ }
+
+ /// Returns the `version` string associated with this compiler for Rust
+diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
+index 8a26adc7ed50..292aa3b1e24a 100644
+--- a/src/bootstrap/metadata.rs
++++ b/src/bootstrap/metadata.rs
+@@ -5,7 +5,6 @@ use std::process::Command;
+
+ use build_helper::output;
+ use serde::Deserialize;
+-use serde_json;
+
+ use crate::cache::INTERNER;
+ use crate::{Build, Crate};
+diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
+index 5bbd9f47fc90..1cfb4b2f63b5 100644
+--- a/src/bootstrap/native.rs
++++ b/src/bootstrap/native.rs
+@@ -15,8 +15,6 @@ use std::path::{Path, PathBuf};
+ use std::process::Command;
+
+ use build_helper::{output, t};
+-use cc;
+-use cmake;
+
+ use crate::builder::{Builder, RunConfig, ShouldRun, Step};
+ use crate::cache::Interned;
+@@ -205,7 +203,7 @@ impl Step for Llvm {
+ cfg.define("LLVM_ENABLE_LIBXML2", "OFF");
+ }
+
+- if enabled_llvm_projects.len() > 0 {
++ if !enabled_llvm_projects.is_empty() {
+ enabled_llvm_projects.sort();
+ enabled_llvm_projects.dedup();
+ cfg.define("LLVM_ENABLE_PROJECTS", enabled_llvm_projects.join(";"));
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+index 6adf9ddaf343..8d9e62010015 100644
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -1424,13 +1424,10 @@ impl Step for ErrorIndex {
+ }
+
+ fn markdown_test(builder: &Builder<'_>, compiler: Compiler, markdown: &Path) -> bool {
+- match fs::read_to_string(markdown) {
+- Ok(contents) => {
+- if !contents.contains("```") {
+- return true;
+- }
++ if let Ok(contents) = fs::read_to_string(markdown) {
++ if !contents.contains("```") {
++ return true;
+ }
+- Err(_) => {}
+ }
+
+ builder.info(&format!("doc tests for: {}", markdown.display()));
+diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
+index 7f24768a4f10..67e0ed5c5802 100644
+--- a/src/bootstrap/tool.rs
++++ b/src/bootstrap/tool.rs
+@@ -234,7 +234,7 @@ pub fn prepare_tool_cargo(
+ cargo.env("RUSTC_EXTERNAL_TOOL", "1");
+ }
+
+- let mut features = extra_features.iter().cloned().collect::<Vec<_>>();
++ let mut features = extra_features.to_vec();
+ if builder.build.config.cargo_native_static {
+ if path.ends_with("cargo")
+ || path.ends_with("rls")
+diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs
+index b068c8200ace..bb012a388551 100644
+--- a/src/bootstrap/toolstate.rs
++++ b/src/bootstrap/toolstate.rs
+@@ -124,7 +124,7 @@ fn check_changed_files(toolstates: &HashMap<Box<str>, ToolState>) {
+ let output = t!(String::from_utf8(output.stdout));
+
+ for (tool, submodule) in STABLE_TOOLS.iter().chain(NIGHTLY_TOOLS.iter()) {
+- let changed = output.lines().any(|l| l.starts_with("M") && l.ends_with(submodule));
++ let changed = output.lines().any(|l| l.starts_with('M') && l.ends_with(submodule));
+ eprintln!("Verifying status of {}...", tool);
+ if !changed {
+ continue;
+diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
+index 7d1efe4610f9..eac790fe504b 100644
+--- a/src/bootstrap/util.rs
++++ b/src/bootstrap/util.rs
+@@ -98,7 +98,7 @@ impl Drop for TimeIt {
+ fn drop(&mut self) {
+ let time = self.1.elapsed();
+ if !self.0 {
+- println!("\tfinished in {}.{:03}", time.as_secs(), time.subsec_nanos() / 1_000_000);
++ println!("\tfinished in {}.{:03}", time.as_secs(), time.subsec_millis());
+ }
+ }
+ }
diff --git a/dev-lang/rust/rust-1.42.0.ebuild b/dev-lang/rust/rust-1.42.0.ebuild
index 89ac74e3331..484af8fa84f 100644
--- a/dev-lang/rust/rust-1.42.0.ebuild
+++ b/dev-lang/rust/rust-1.42.0.ebuild
@@ -107,6 +107,7 @@ QA_SONAME="usr/lib.*/librustc_macros.*.so"
PATCHES=(
"${FILESDIR}"/1.40.0-add-soname.patch
+ "${FILESDIR}"/1.42.0-fix-bootstrap.patch
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2019-09-26 22:06 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2019-09-26 22:06 UTC (permalink / raw
To: gentoo-commits
commit: d7c507ec43a21a951774add8a4a92680e5d8f4b3
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 26 21:58:56 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Sep 26 22:06:37 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7c507ec
dev-lang/rust: bump to 1.38.0
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 14 +
dev-lang/rust/files/1.38.0-fix-custom-libdir.patch | 90 ++++++
.../files/1.38.0-fix-multiple-llvm-rebuilds.patch | 75 +++++
dev-lang/rust/rust-1.38.0.ebuild | 327 +++++++++++++++++++++
4 files changed, 506 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index fa10664a6c4..56ecbd36bd4 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -50,7 +50,21 @@ DIST rust-1.36.0-powerpc64-unknown-linux-gnu.tar.xz 145880928 BLAKE2B 4922df3a7d
DIST rust-1.36.0-powerpc64le-unknown-linux-gnu.tar.xz 149721676 BLAKE2B e00bcc60a89354f6d4b5c89feffe5fe6dd7bf25d8dd2db2878e7c12ffc484e9258f37d80bda2b12f3965d96c73f1a03b6adbd8c20176c383e04f1a229d47d000 SHA512 02f32b544b0a55ba6f6fc4852f18766107bc0ce2c50488db11605e8a10e5965dd44e8332905c00080b08576370f2f0297ecbe12ba9fe01b4c24cdb9fd03ad64f
DIST rust-1.36.0-s390x-unknown-linux-gnu.tar.xz 159518028 BLAKE2B c5876ea15c9fa56a92b4c0bf2aab472b83381a7a31fbb207e4165fdc49fea2150dddd53cc771dbcb81b01fe43a3175df146d8645d04c556af3556822fc59bf25 SHA512 c637b8f50cbce3333280f43ce4b97d3f75ddae429ee34461837c3c3869e20aed8c5e76f7a58998f617dc0ffc2e6afd00908e5de05f4c7ed9a8c34d5dbc7ce916
DIST rust-1.36.0-x86_64-unknown-linux-gnu.tar.xz 169600936 BLAKE2B 8bf075f2b5624e4716e3058512b85b70e72ec6f0c8ce8fc38857612b02aa5702a1bb447f13f882a1b96b1f32330d0a8f7f1f1db81827b51cb7429195e070a5a3 SHA512 3f14dda1e09ef8c8168600f4d70ba60cb2a1086ad9edb5eed708d0ffc16fdb9c582ce350a93afcd64b78f87737e37d4f099703835a1ec9837a5721c2335e17c7
+DIST rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz 124322996 BLAKE2B 732dc36933682a18bcd5694b1715af5c442452df8232e2affda8185b9aaf0daf297cf7c4a64fc7d35898e1b3829ba9e8fbe33e8c8f7bc6183b3149f983208ba8 SHA512 c70054f589aa2aecfbd6a89f567306e0cf5d3eb56e5a544ced0a5d212f14033dab10559d22dd6b07945e45a25d8de14fc7897c9d24c0d8149548a06b404ca9d2
+DIST rust-1.37.0-arm-unknown-linux-gnueabi.tar.xz 124741032 BLAKE2B 88e38ea9152546c8a04bd6f93fa8d97d3e58255568a522d2774a2656a4c6dd7bad74633a10b424f6c5f6ca07ea07e473e620ab24dfdbe5c27bb5141ab0f5bba8 SHA512 bd28b8bb60b8e4373693ad9d41bfe62eb12a7272a5d7978691b0c7e1892a2df8d6ff8cf5c25dab805fab1d03dd17c76c1014d395b042118cb24603739c6dbb32
+DIST rust-1.37.0-arm-unknown-linux-gnueabihf.tar.xz 124971492 BLAKE2B 07614242bc500c9ca81a87ed81cc0bada9b467049b7bc2afbe6245b742ac2bec9030feb08f0ef8a2402bf2c2a19722b8b06dacd0ef56edb0522bf41e29080a01 SHA512 e380e2bf862a157cb5e06d27fa8e306474e708ce7e0ffd087531a4fa5729bef104131c256625c05515f6e7dfd43f639ce1fd5e05a2da42ad7f437d578b4acd8a
+DIST rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz 126583596 BLAKE2B f836c88801bde52c43726fb728d03b5f145b511a7a4b3d857de0218b87c83a4a2c939b9956aa61cef362a255209ea9e5159d2ac00edea2b9656ef320875f79a2 SHA512 6d9e055f36a2e912f30bebb25afdd3188019a438f208d3db67b38078bd5c37633c38fd48da15ba80640399babf89221e727a2bf43990aee269fcc5c91cd412b4
+DIST rust-1.37.0-i686-unknown-linux-gnu.tar.xz 177419360 BLAKE2B 4b28b002f0db349f9d12f2e4ae63b3fb5e9f472ec4d32d671626a56377cb87b07efd884ef3f4b23cca7072818c597fa8c693f55fd30ced5b408e8c0b0081af29 SHA512 b59377350f82efd10c7afe0f7a28ecbd5355719d841d40c98bec0f01961233f7a19bed2581a111a76cde8dd8dc68a019fa7d3da66cb7ebcb002ba52a14a7e573
+DIST rust-1.37.0-mips-unknown-linux-gnu.tar.xz 124577076 BLAKE2B 299d2b650c8236b94079ce4895e020bf2fe6c5d9b768da47d9716010eaa024c6b8ea743ddc7fadd660a9e49f65a02a8d0da7853cbff2bb6b43bb7771d3d42149 SHA512 1b71e1840470f7dd44cda177b7abf1cdc3f63db547fa36657b9fe5030a3d363afe1fa3ff8566351910daeef91ab4b33be46ef117342b4660fa23f76bee0ace00
+DIST rust-1.37.0-mips64-unknown-linux-gnuabi64.tar.xz 124565528 BLAKE2B e5bd6241ca7f2356638d39e18a71e577972143f37aa05e00e965bcce742828f25adf0f5cd6334c430d464e51b4112baeceb44a9eb41713233df6942b077983bb SHA512 1002173e608d29a2d32a6479a5c530d36e18bcce9e0813607369d3173c49b019a69ef05e8f1aba9b232285529f72837dfa8f4400866c49b6450e0f53028ebab1
+DIST rust-1.37.0-mipsel-unknown-linux-gnu.tar.xz 126620196 BLAKE2B 9174e7a48ba9e0f0bc2fc023991f6005614310a8db76824f5e733b0d8c4eaec6729c00b92e1c45f82fbb77f573c4bdc71004e887b9a170dc88c1a3f6e5ec0ccc SHA512 41f17b2f9bef0d5453153660d0f49aa0c8df0bfd003abac46728a477d3c00f67f5b1460aa851a92605fd628bf9dc18d9b44a16dbfc8fff22d84fd2a0a58b971e
+DIST rust-1.37.0-powerpc-unknown-linux-gnu.tar.xz 124035536 BLAKE2B 2b0b2c34cbe929ff4632e13b41670fa25e765a8b954c3226da67e098a06bb59c1d2387bf64beddaa554e439dd1549dcb529048bcb1e0f00998aee7bf302d6f6c SHA512 54b08c4a5523749ee5054e000f82ffc7ec29562d1194fbc311bee0e953c49eead3c851dcaf34803bb8eb997550a64ec784f40927f52d33b18ceee7c921c0eed0
+DIST rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz 128662180 BLAKE2B 0df1def64d07b3eabf1aa6c993c7a01b596119abf60b1a3e3e6663b1bb3c6a945146c9cd639ee7d57462e1cbb866badfa83abb7b52b36de4b089552f624c2245 SHA512 e8e5cf1c64bd3eec389cef022e1c7bae4618fb6966505d2e762d10e7f443fece43b8b95c989c020bdf739abaf9c3f036230df46f6477a2ccd517a7bdef2ba0d7
+DIST rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz 131763436 BLAKE2B 76b9120e98da09344ce5af39a9b333c6ca8917516ae7108d6cc129fdda4d4d6c21e2ca4c41533e202f63b992bcede5390ec986a262ea216c1340a82c5ba798e8 SHA512 366c8920448000bfb4baa3a47588a1c7bc81e18afb8d40f0efc824e429e9e6900efbdb4c9003fb45b9d8595328bd612bd63f390a7d3dedbb30b7dc57fc12abf3
+DIST rust-1.37.0-s390x-unknown-linux-gnu.tar.xz 141808296 BLAKE2B 73825a004be81cca4dfff1301ea0ef45c9f55ab8d9a9a0343585377d83c4bdc03d3c027622f18e144c9355afe6f5236a6273f84b43b01a221066d3c395f71017 SHA512 14f403d3ce9df2a2baba1db13c9f039d7118d7e0c8285ca19ea0284c32e80c3f786660dedef4d1758b2227f91732b8e7deccbf3f38c2b3491738c1408d6bfd0e
+DIST rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz 165034364 BLAKE2B 3047fff28da00e01179d3a648cb4e5636fa15ac7f4cb9ddc14e1df86d045b69ff3e41691b4a6ef4227c4cb58137524c5e029ba21a2c3a3a171fdb6f46b44f4ff SHA512 c4d48aa12cb929d6600f9cce81bb612c504aa1b3b3f8e76352af3a76b737dcbe0d31e8d139c17884b11aef9f12a55c4908fb8f3ff63dfa92533e4bd0a729914f
DIST rustc-1.34.2-src.tar.xz 95048792 BLAKE2B e81e4bfda87ddfb09ab8a74792346970aa440c678d2bb1279c329db4929282f761ada6fea9d81ceeecfd513613025c8e636487626fc36bd0b33559e045bb1b15 SHA512 f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
DIST rustc-1.35.0-src.tar.xz 96543548 BLAKE2B 0291152f2b7aa8b50b22d74afbd9c7654bab8ae7dcb76224dbff43bc39a3b918ff86bfd20f408a9a16da8b20b08d9f0289bb63620f093d25d9fa008de57f52c3 SHA512 477c10b780bd54776be7ecbda0ab970416253e4a87c3e701825a7d07bcbcd91601b8e61129c5d04d4259e89c2e81e87cdbdee853375a8de5c9cf8372be2c9129
DIST rustc-1.36.0-src.tar.xz 98707920 BLAKE2B caff82482589941ab63be51eeffdf2a0419c1b624485240a0547b4bebc9f64f6c65a4babb960d1b23b3cde76550390d6d4813e1e9a9c43bf325998c87832fb94 SHA512 1adbb3b67d599f926dc19258e2596cb3b990e152e75e71645637098526207aa5632d7915fd5b67c7a045f63860cc7be3d28be014ad6141a342adc16b2fe8a879
DIST rustc-1.37.0-src.tar.xz 98654252 BLAKE2B ddee92c7959a0e1ee11ffe5ded6017703cfac7bbf2a00dc46c37ed28f1cd1d31e1d5b62cc1a5ae2d55d64f8705d0cb282f4968deddf36c3152e5e0cfdfbea67d SHA512 bfee43f578e6d44ead950b870b9fd31087e1bd3f917611f5dce7ad56504b83185edf43e297e8d1304e9e97b9a580d1e6adf6608ab8ed6dee0dc8c5153cdbc5d4
+DIST rustc-1.38.0-src.tar.xz 96163304 BLAKE2B 1e900b44db64727477ccf8e58e0ebb9ec209bbeb349816b5f7937e58c165db8befae33c5667732e5aaaa677c5a6c1e0229d9969ab8967fda9b8d7a593e6c5eb6 SHA512 b756d29a7a222bc7b5c7f42ff397346ab840f78e559f93e6e36b65e76eea525cf429899fe4de9fb8966623a2225b552feef9fa831bee50f9e25c976fa2af8c0a
diff --git a/dev-lang/rust/files/1.38.0-fix-custom-libdir.patch b/dev-lang/rust/files/1.38.0-fix-custom-libdir.patch
new file mode 100644
index 00000000000..b2b14876c90
--- /dev/null
+++ b/dev-lang/rust/files/1.38.0-fix-custom-libdir.patch
@@ -0,0 +1,90 @@
+From 8553cc0681db7fb6b58b25bb3fbd520604a0cc3a Mon Sep 17 00:00:00 2001
+From: O01eg <o01eg@yandex.ru>
+Date: Wed, 7 Aug 2019 23:37:55 +0300
+Subject: [PATCH] Fix double resolving custom libdir
+
+---
+ src/bootstrap/builder.rs | 20 +++++++++++++-------
+ src/bootstrap/dist.rs | 13 +++++++++----
+ 2 files changed, 22 insertions(+), 11 deletions(-)
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index 5a75497173eb..06ccdd8e7f0f 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -627,13 +627,7 @@ impl<'a> Builder<'a> {
+ }
+
+ fn run(self, builder: &Builder<'_>) -> Interned<PathBuf> {
+- let compiler = self.compiler;
+- let config = &builder.build.config;
+- let lib = if compiler.stage >= 1 && config.libdir_relative().is_some() {
+- builder.build.config.libdir_relative().unwrap()
+- } else {
+- Path::new("lib")
+- };
++ let lib = builder.sysroot_libdir_relative(self.compiler);
+ let sysroot = builder
+ .sysroot(self.compiler)
+ .join(lib)
+@@ -687,6 +681,18 @@ impl<'a> Builder<'a> {
+ }
+ }
+
++ /// Returns the compiler's relative libdir where the standard library and other artifacts are
++ /// found for a compiler's sysroot.
++ ///
++ /// For example this returns `lib` on Unix and Windows.
++ pub fn sysroot_libdir_relative(&self, compiler: Compiler) -> &Path {
++ match self.config.libdir_relative() {
++ Some(relative_libdir) if compiler.stage >= 1
++ => relative_libdir,
++ _ => Path::new("lib")
++ }
++ }
++
+ /// Adds the compiler's directory of dynamic libraries to `cmd`'s dynamic
+ /// library lookup path.
+ pub fn add_rustc_lib_path(&self, compiler: Compiler, cmd: &mut Command) {
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index bd012a887c26..213ceb194a81 100644
+--- a/src/bootstrap/dist.rs
++++ b/src/bootstrap/dist.rs
+@@ -469,7 +469,6 @@ impl Step for Rustc {
+ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
+ let host = compiler.host;
+ let src = builder.sysroot(compiler);
+- let libdir = builder.rustc_libdir(compiler);
+
+ // Copy rustc/rustdoc binaries
+ t!(fs::create_dir_all(image.join("bin")));
+@@ -481,11 +480,14 @@ impl Step for Rustc {
+
+ // Copy runtime DLLs needed by the compiler
+ if libdir_relative.to_str() != Some("bin") {
++ let libdir = builder.rustc_libdir(compiler);
+ for entry in builder.read_dir(&libdir) {
+ let name = entry.file_name();
+ if let Some(s) = name.to_str() {
+ if is_dylib(s) {
+- builder.install(&entry.path(), &image.join(&libdir_relative), 0o644);
++ // Don't use custom libdir here because ^lib/ will be resolved again
++ // with installer
++ builder.install(&entry.path(), &image.join("lib"), 0o644);
+ }
+ }
+ }
+@@ -493,8 +495,11 @@ impl Step for Rustc {
+
+ // Copy over the codegen backends
+ let backends_src = builder.sysroot_codegen_backends(compiler);
+- let backends_rel = backends_src.strip_prefix(&src).unwrap();
+- let backends_dst = image.join(&backends_rel);
++ let backends_rel = backends_src.strip_prefix(&src).unwrap()
++ .strip_prefix(builder.sysroot_libdir_relative(compiler)).unwrap();
++ // Don't use custom libdir here because ^lib/ will be resolved again with installer
++ let backends_dst = image.join("lib").join(&backends_rel);
++
+ t!(fs::create_dir_all(&backends_dst));
+ builder.cp_r(&backends_src, &backends_dst);
+
diff --git a/dev-lang/rust/files/1.38.0-fix-multiple-llvm-rebuilds.patch b/dev-lang/rust/files/1.38.0-fix-multiple-llvm-rebuilds.patch
new file mode 100644
index 00000000000..235b95625e4
--- /dev/null
+++ b/dev-lang/rust/files/1.38.0-fix-multiple-llvm-rebuilds.patch
@@ -0,0 +1,75 @@
+From 53fe76479aab03b1fbe5b7184f45484886f769b1 Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Wed, 4 Sep 2019 16:02:31 -0700
+Subject: [PATCH] Assume non-git LLVM is fresh if the stamp file exists
+
+Rustbuild usually writes the LLVM submodule commit in a stamp file, so
+we can avoid rebuilding it unnecessarily. However, for builds from a
+source tarball (non-git), we were assuming a rebuild is always needed.
+This can cause a lot of extra work if any environment like `CFLAGS`
+changed between steps like build and install, which are often separate
+in distro builds.
+
+Now we also write an empty stamp file if the git commit is unknown, and
+its presence is trusted to indicate that no rebuild is needed. An info
+message reports that this is happening, along with the stamp file path
+that can be deleted to force a rebuild anyway.
+---
+ src/bootstrap/native.rs | 27 ++++++++++++++-------------
+ 1 file changed, 14 insertions(+), 13 deletions(-)
+
+diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
+index f02def3e1b05..7bf9ea2688f4 100644
+--- a/src/bootstrap/native.rs
++++ b/src/bootstrap/native.rs
+@@ -81,26 +81,29 @@ impl Step for Llvm {
+ (info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
+ };
+
+- if !llvm_info.is_git() {
+- println!(
+- "git could not determine the LLVM submodule commit hash. \
+- Assuming that an LLVM build is necessary.",
+- );
+- }
+-
+ let build_llvm_config = llvm_config_ret_dir
+ .join(exe("llvm-config", &*builder.config.build));
+ let done_stamp = out_dir.join("llvm-finished-building");
+
+- if let Some(llvm_commit) = llvm_info.sha() {
+- if done_stamp.exists() {
++ if done_stamp.exists() {
++ if let Some(llvm_commit) = llvm_info.sha() {
+ let done_contents = t!(fs::read(&done_stamp));
+
+ // If LLVM was already built previously and the submodule's commit didn't change
+ // from the previous build, then no action is required.
+ if done_contents == llvm_commit.as_bytes() {
+- return build_llvm_config
++ return build_llvm_config;
+ }
++ } else {
++ builder.info(
++ "Could not determine the LLVM submodule commit hash. \
++ Assuming that an LLVM rebuild is not necessary.",
++ );
++ builder.info(&format!(
++ "To force LLVM to rebuild, remove the file `{}`",
++ done_stamp.display()
++ ));
++ return build_llvm_config;
+ }
+ }
+
+@@ -303,9 +306,7 @@ impl Step for Llvm {
+
+ cfg.build();
+
+- if let Some(llvm_commit) = llvm_info.sha() {
+- t!(fs::write(&done_stamp, llvm_commit));
+- }
++ t!(fs::write(&done_stamp, llvm_info.sha().unwrap_or("")));
+
+ build_llvm_config
+ }
diff --git a/dev-lang/rust/rust-1.38.0.ebuild b/dev-lang/rust/rust-1.38.0.ebuild
new file mode 100644
index 00000000000..152d59601f5
--- /dev/null
+++ b/dev-lang/rust/rust-1.38.0.ebuild
@@ -0,0 +1,327 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
+
+inherit check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# 1. List all the working slots (with min versions) in ||, newest first.
+# 2. Update the := to specify *max* version, e.g. < 9.
+# 3. Specify LLVM_MAX_SLOT, e.g. 8.
+LLVM_DEPEND="
+ || (
+ sys-devel/llvm:9[llvm_targets_WebAssembly?]
+ wasm? ( =sys-devel/lld-9* )
+ )
+ <sys-devel/llvm-10:=
+"
+LLVM_MAX_SLOT=8
+
+COMMON_DEPEND="
+ sys-libs/zlib
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libssh2
+ net-libs/http-parser:=
+ net-misc/curl[ssl]
+ system-llvm? (
+ ${LLVM_DEPEND}
+ )
+"
+
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake
+"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-eselect/eselect-rust-20190311
+ !dev-util/cargo
+ rustfmt? ( !dev-util/rustfmt )
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+QA_FLAGS_IGNORED="usr/bin/* usr/lib*/${P}"
+
+PATCHES=(
+ "${FILESDIR}"/1.38.0-fix-custom-libdir.patch
+ "${FILESDIR}"/1.38.0-fix-multiple-llvm-rebuilds.patch
+ "${FILESDIR}"/1.36.0-libressl.patch
+ "${FILESDIR}"/1.36.0-libressl3.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pre_build_checks() {
+ CHECKREQS_DISK_BUILD="9G"
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ CHECKREQS_DISK_BUILD="14G"
+ fi
+ eshopts_pop
+ check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+ use system-llvm && llvm_pkg_setup
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local extended="true" tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ rust_target="$(rust_abi)"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = ${extended}
+ tools = [${tools}]
+ verbose = 2
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)/${P}"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ default-linker = "$(tc-getCC)"
+ channel = "stable"
+ rpath = false
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ if use system-llvm; then
+ cat <<- EOF >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ EOF
+ fi
+ done
+
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ EOF
+ fi
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env)\
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \
+ --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
+}
+
+src_install() {
+ local rust_target abi_libdir
+
+ env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \
+ --exclude src/tools/miri || die
+
+ mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
+ mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
+ mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die
+ mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die
+ mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die
+ mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die
+ if use clippy; then
+ mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die
+ mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die
+ fi
+ if use rls; then
+ mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die
+ fi
+ if use rustfmt; then
+ mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die
+ mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die
+ fi
+
+ # Copy shared library versions of standard libraries for all targets
+ # into the system's abi-dependent lib directories because the rust
+ # installer only does so for the native ABI.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+ continue
+ fi
+ abi_libdir=$(get_abi_LIBDIR ${v##*.})
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ mkdir -p "${ED}/usr/${abi_libdir}/${P}"
+ cp "${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
+ "${ED}/usr/${abi_libdir}/${P}" || die
+ done
+
+ dodoc COPYRIGHT
+
+ # FIXME:
+ # Really not sure if that env is needed, specailly LDPATH
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/${P}"
+ MANPATH="${EPREFIX}/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ EOF
+ echo /usr/bin/cargo >> "${T}/provider-${P}"
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+
+ ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
+ ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
+ ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2019-06-19 0:35 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2019-06-19 0:35 UTC (permalink / raw
To: gentoo-commits
commit: 80f2ab4cbfa3a18f3d981f527b317467bc7578e9
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 17 23:24:55 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jun 19 00:09:26 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80f2ab4c
dev-lang/rust: cleanup old unstable versions
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 67 -----
dev-lang/rust/files/1.29.2-clippy-sysroot.patch | 62 ----
dev-lang/rust/files/1.30.1-clippy-sysroot.patch | 62 ----
.../1.32.0-fix-configure-of-bundled-llvm.patch | 32 --
dev-lang/rust/files/1.32.0-libressl.patch | 30 --
.../rust/files/1.32.0-system-llvm-7-SIGSEGV.patch | 33 ---
dev-lang/rust/files/1.33.0-clippy-sysroot.patch | 62 ----
dev-lang/rust/rust-1.29.2-r1.ebuild | 279 ------------------
dev-lang/rust/rust-1.30.1-r1.ebuild | 299 -------------------
dev-lang/rust/rust-1.31.1.ebuild | 298 -------------------
dev-lang/rust/rust-1.32.0.ebuild | 309 --------------------
dev-lang/rust/rust-1.33.0.ebuild | 322 ---------------------
12 files changed, 1855 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index fd33db50eff..af8e766ac0e 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,68 +1,6 @@
DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.xz 98937652 BLAKE2B 836d3dd4e583fa50dd317c3bea56257e6ea19defdb38c16be6debb2854e147c8a92c4832263e4ac314136022a176526fe7d3774a3c5a84cd8d364cd2a1532860 SHA512 8d9acbc90ddaa1e0de0234a21798b19b5365ea371a12f9a143c6ebacbb48f57344da6e827e867513be502bce2801de27a0dbbacdf8618c653aeb58026b6c469c
-DIST rust-1.28.0-arm-unknown-linux-gnueabi.tar.xz 104676648 BLAKE2B b26b23c3605e6584c51e0e914dbb3be60996e079e52ff2d4850ed43c1f1f7cd5ac575b40dbe852f927d36654f5ab7e384548f3a92b3466bfbb1cda7f9f069bcb SHA512 a1eaf1d7826ebfe222d233cabd8b88073ca2c8dd42a0b870e324dfc63e7290308418222c56802bc421c9bda119dc7c5f3e225ff33cacad5776b79cbcc1a877b2
-DIST rust-1.28.0-arm-unknown-linux-gnueabihf.tar.xz 104992084 BLAKE2B df97766d7abf73f668a2936834bc0f35739289eeeb5395276a2fdfd5b6c0baee3ba1eee1099f19d4f4f1cbd1a33cf62ad888dd3d1856b613ac853c6a17650741 SHA512 3b58b83f38bf8d8e841ae6614d72bb6e6faf75fb7c19abc5451548b0e6de0ef3b64dfbc70481a1e40f74074bfad701aa7a58296b4a0d07957a418bd3cd769917
-DIST rust-1.28.0-armv7-unknown-linux-gnueabihf.tar.xz 105144132 BLAKE2B d9e0791c7dc77ade26d383a5c57117a2b7b50c6a523b31fbf604c0b779c966c5055554f85c718353f2e581bfe8a228369671a8b731f808bc0133ad3fad61f853 SHA512 9142110e0c24657aca41468648d9364c2e6fce60b08ca7113c944a53701fc5a309481a8fdd5845b229bcc750ccad63af561d452c3a3a0727ab1ca7a461b06d3d
DIST rust-1.28.0-i686-unknown-linux-gnu.tar.xz 136925948 BLAKE2B 85d9239533920c3f16d7c61bada0caeabceceade29032b70bb4562bfd04fa0158cdd85b8a0a1119506416fa5916ade8a0466bf6c10da457299a6319aa25f9dd6 SHA512 ffdfab46db14f07354b553e02fdb9dc6602c2c52b78d8f17c499f4ddb1e257aa53479df836eb3f06a2548d34296b0277cdb6b4c6f3cec57265823df22752c135
-DIST rust-1.28.0-mips-unknown-linux-gnu.tar.xz 102116424 BLAKE2B 72c7cfa9157c0d7fb6a9dc0698322e5285bc2ef9f914a1be5063c8aeaed8a7d29bbcd71090aa5f09ec5229e38ac08e6883119f03af42ffa794cadf227450049d SHA512 0d2e2785178e235b0effd2a7251e9004c87c21e158c2e6f122eeb10942ce2545e5d67d7ff040b7c277627cc402321fff5ad5186a41f2de581f46633adb1894bf
-DIST rust-1.28.0-mips64-unknown-linux-gnuabi64.tar.xz 101617356 BLAKE2B eb0cc524e40cdf20ec16b72418cae9ea03ce946006412153a7c0a173f27a3f8e193a41685295be9917b10ca39565be57b6d3f7c7a7122cbee088a5652081dda1 SHA512 0d7bfafa1340de97efab8db3100d5462afde94e8e54d6543e229d9240aca5a69d469a3e5ac750527d5e40dad11286b40d6be22812655721a0b8bf3ecba485ad6
-DIST rust-1.28.0-mipsel-unknown-linux-gnu.tar.xz 103574324 BLAKE2B 671e8ee0de674e37c8156825603e3cea659c0ad016698c8f208a78afe18cf0411dc953cf683d297079e3eaedddad540dbfa1821950585fb5ffcf74267f0ebcdd SHA512 40233beb18c937f7293a8191d6a9d98c5628b0709ef808e48fac4db10ce0af91cb8d6bec9056dae00149e8e0b1613b1c66960e23302bc0b66b50fbb0994cb018
-DIST rust-1.28.0-powerpc-unknown-linux-gnu.tar.xz 100580084 BLAKE2B 2487976f495e78d8cc8129d81e1eb29cc86d7c523133d9ea42e6425f7607fea74c8a848877e926c53c2dd9599a0c3bede46109e96c3851fd7726b251442fca6c SHA512 450aa028644fc73cf8dadccfabc1a66c360880300479df9c0041f773b3f6b6072afb9aee0221fe51abd4194b86f8cc8b7f14c788b3792858a44bfc8c83bcc03d
-DIST rust-1.28.0-powerpc64-unknown-linux-gnu.tar.xz 105788856 BLAKE2B 828082612561ddd186472472e11e1afb9bc24a3332ff5f82a9924fc950b29655e892c974a88ce6c0b04c34a9c7d13856a8629027069808234ffb1e3cfb788e01 SHA512 1bd2c5069beecb765a2305715070e4052d5a66dafe50a5b53bea2c2082b22b3f9a2d2b9fb059c93476f88ee5e602effc18b807e5c964610e8255a3a945931f51
-DIST rust-1.28.0-powerpc64le-unknown-linux-gnu.tar.xz 105822856 BLAKE2B 0cf534a55efff99daf700127fc7bc7b82b93054d054fbf8479a8b247b41381fd82f8672ac12f3e3f53566d816964d83069593817d1932b33902f83994f1bdc33 SHA512 bdbdf3a64a184dd4510a113bbe20c058f42e35321cd2fb7c938487dfc9b1f04320b523ea215dd92a23c2537292eeb064097119e2097d6e24a1c4e237d9d4fc8b
-DIST rust-1.28.0-s390x-unknown-linux-gnu.tar.xz 98839840 BLAKE2B bbff015b3d2daf1443781cccb80527cf8c7f86a01ed928b49cc7e87e17f8c6354f6a47dd2356ff75357e09f7f79ec85812bd8458aee9455800fdf88761243e94 SHA512 5ffb44d16c990b8a6377b64e5042a3b2e709bcc7187013dbe4ab3c9d8cd781b6bf07b0d374340e2ccabe9f84fd4731b606cb05a10a739ebcfa49652518a2aa46
DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.xz 134120432 BLAKE2B 56fb79a98659d9c8e56b8eef87dea3302ee5901bc4507d1c204628370b20cf34b2875c9586faa0acc2bc2b1a5beedeb9b5ba199cfb85d52f268f084a02f04f27 SHA512 4f427c11a9cd22aedd01bd7ed5bee2ba5e00a27db25af4f596cf8627d88eff8e72625eb83729d2e6c6780aaffd44c0e7065a1c8fa22f4899349b72c726cf6a5f
-DIST rust-1.29.2-aarch64-unknown-linux-gnu.tar.xz 99702524 BLAKE2B 669066ada5c88ad966125edca77723fbe0ebc0e19859a96cf02eb28a107df87647bc552358cb5e1f8be1fb79d836f8202f4e59349f123bd95383a3a9cb82d0f0 SHA512 f871359a3b1ac54fb237921204d98ef4fac06830e9835849538397c27d40283662c0f6ab3f6eafe0e9ef63182a460e26d615111055430ece0fe94ddf7ad03914
-DIST rust-1.29.2-arm-unknown-linux-gnueabi.tar.xz 105368092 BLAKE2B 7764689fdaeb2ade9aff248707f472ed35d06d4240b138ddf083ef614227845bf6e1d0be38ebc771e95b0998dab3f550de5abe50ffe89625690611d4bdf53aad SHA512 2ef8fda575b00bf7c6f20a8f2a1b6cb8c3b1de6287c9e07889c9a3a682f73f9470bb5649425652ac47af8f61f49abf21209f6b151c4a5ae42dcea59f6e79f84b
-DIST rust-1.29.2-arm-unknown-linux-gnueabihf.tar.xz 105657004 BLAKE2B 5813dde3020afda41e307f4d9ba57c3840ff800bceb0ef494d743095ce6d4da333da208fc72bb36e21209a9ae16e081ca3e7580d59a984ce561d85bcf4b2e2dc SHA512 81d4e392afe3f4bd1ad76a78610e92e8a27afe8f6d0ff1773dbdf35f2041a587c2a0d71db0658ff50fb43460b4f15f23bbb1cc03a018d49d153314e636befb8a
-DIST rust-1.29.2-armv7-unknown-linux-gnueabihf.tar.xz 105958932 BLAKE2B 569cbee0ad0eba41c280be934fc5a59c52331b0853d890aad2188c1979a259d90f4092d72dc9e8027255e2ea6b5ea422a06dd9d82f6b2a865fb1d3bcf146c13d SHA512 bff1220781eca904a93d2cefafed3587e3f76e1dc04fbef09a0281295b6c06491c5fa327830c430d31df80eb7a3e64eac7f45739bc118e3626854f96dce246e2
-DIST rust-1.29.2-i686-unknown-linux-gnu.tar.xz 150567444 BLAKE2B d3b3cfa88e89e29cf2e502a2ee11b22ea45cf9fa5ca0611de273062a8885dc0b9206a43175895a873cbfbaa08bf0bbdcf38cca45436b77b47dbac1b09e0fdb68 SHA512 faac22aec54d0754ff991f2a34ed7b8bfefa8dc9720d247eec1c6b671bbc701907146a796699591e4a677a0f378b9d96bfea5b33452f05dd876c668525f9f33d
-DIST rust-1.29.2-mips-unknown-linux-gnu.tar.xz 96027696 BLAKE2B e12dbd41e45a5009c218be07f085d75ce99bd7a7daf8917db0127aa03ac78f4883b344b566d3a8947b836d55750388ea5387264e036c75de7ef4ba5dda081d63 SHA512 21d860c6f7219f51b65dced57e0173500e054d2d13300f0ee7721262a8354e5dbc272deb8387fcaaeb16ad793808f87edc6c087f7e442e7434264a3302acf537
-DIST rust-1.29.2-mips64-unknown-linux-gnuabi64.tar.xz 102149796 BLAKE2B 1f40dd40e461769cfb75a671d6f83c650c74031302bd8872861cfdd3432e270e47c150382c6f02c38e7823f35a158de395cbc33f0061e51632d130b6fd0910f9 SHA512 5b98632b80d2ed4cef17bd068adabbe26146a6df68e6e70f2535f61f981c8f935b2491a2dcf388a2afe0cc225f10f9f262342457ce9def8c800364253cac7e67
-DIST rust-1.29.2-mipsel-unknown-linux-gnu.tar.xz 97362256 BLAKE2B 4d3170a8c48a68a606eff5631d198b16ca09953b0d8079c39f5edc6284a037c0b2212c74d098da4fa0a40a0917139022a9746734e9fdeb62e2564337430a4edb SHA512 9c5ca864da672a975730073e3291c2be218c2624a11ec5fc9a2637bdf58c7437ae77910bccbc6678d584a3464036377d4717d7f6ebdd5712e9bc86973e91d0ad
-DIST rust-1.29.2-powerpc-unknown-linux-gnu.tar.xz 93639612 BLAKE2B 54fe353f32bedb2567784bfe28ac741f137cc55928e874157f420460831cdb4617fee262c4d3b56d6720dba37bb7b6281c970d4a3002c673aaa85aa70eed922d SHA512 f217cd5169225b290870821b5ba17ad9dfffc99906057c79e91e2a2db5cfd8bc5a83d4e20023e9b73171d15c988e4b28cdbf3f8af2c70657566e6d89658998b0
-DIST rust-1.29.2-powerpc64-unknown-linux-gnu.tar.xz 103432092 BLAKE2B ed700d298770b621767f5439841e3be79c3c02d2b05feb211b8508933d4ca2d13c30cf689c5376cfc93bd374c09aaa4fdc4fb84dd4db264eef6a70cba62b6647 SHA512 1af0b55bc62d7641d33e2d33aadaf474298d3284cb2d914be0240eae54e20f464513db4b04f7518385dc5135498c58ec18e0d4cc6341c9e165847536479f44dc
-DIST rust-1.29.2-powerpc64le-unknown-linux-gnu.tar.xz 106607384 BLAKE2B de19f341dcc1cc580e68865d3b0034f781ed4ca0ac1b07c89352409684670c7d0fd5c95ea6018fc7de4fbfacf4f7d0ebeec34c036c0062ca7f776403511df7dd SHA512 b9181da601a467f46713f2f438fc7ad69c46fc310e62a8d45f665744c8578491d832b8624ff454c19c94f1694fa406846a82289250241030a70b2cb4b88913d1
-DIST rust-1.29.2-s390x-unknown-linux-gnu.tar.xz 99114900 BLAKE2B 08e9251bd8e9c9ac6352ab81735b720052b3288b5fd344f6ba69205c7971f362270f0acce7dbd3763b20d3b1e976ff5404151253acb9c29708f36038d23299f1 SHA512 f76a030257edbdd993d7a4e83da895c8b4749904fb2252a125b3e4ef4331a1cb2c389ec54a372bea413718e3dad987e4b17eb29d301c29ba330222502e6b9b75
-DIST rust-1.29.2-x86_64-unknown-linux-gnu.tar.xz 148275708 BLAKE2B bd7c974f5c8cf78a1fbfc73544ecdab97b7f9ab28ed9ab66759eca3e0fa085fdb2689ba5dfc6dccc6746bab91b6b0b544c44cb729e493dddde2f9ed84c96a247 SHA512 8bc05942a72b186ea1765831bea6921f734e2dd58790a8e427a6d63a2db0d9064937d3198ca3febffeba73b1cc3bef716155ef6cb32127ddeef29ac884cde4b8
-DIST rust-1.30.1-aarch64-unknown-linux-gnu.tar.xz 114223904 BLAKE2B ca3f93d8cb59f5ecc8680ab018f8666a5c0df1bf671af4220c39178a946ce77a05588d91709facd42a1d693120c46c472c4d6dc0b6a5e7d3330b9f0807ff3fcc SHA512 5fb9cb0281cd76b1995bcd6c4dd824f8a4d4c1ffc61a0a54f62b45340b98a7b41cf5ec3d4a8ec370c2603c14f9dc5451ae1a47ea96ebbd520770dfd22cf0ffdc
-DIST rust-1.30.1-arm-unknown-linux-gnueabi.tar.xz 120865688 BLAKE2B 18934c592882ad3608b82ab9aac68412790d02c148c2af0a37a5027ebe059ff697a8556c4dcbf0ac5cf37c6fbd37c51abbf88a3f0ce274742ff1d7ec94f96f04 SHA512 871e0b036273ec62e28712fe1d5d1c74b061eabb59f9cc852e8924df1aaa3797af28d51dde643010920321fa71382ddd70f2d97d25c06999d5663f5209ffc6b7
-DIST rust-1.30.1-arm-unknown-linux-gnueabihf.tar.xz 121114868 BLAKE2B 6410c16e3019b67d2e299b06527db6d7291a1426c4606012234bd8e93b3e3738dda5907aa6d9e48ac25f2a7e06a441f7e42095ec81de01408c235577e0df2df5 SHA512 73ac63f81a86b70ea0378e859b6a913f3f6e2044f1ddcb056c53a18d3f32011a47abf29bf2a84f3a9d6732bec348741662448104e320bcaebf2a3667209fcedb
-DIST rust-1.30.1-armv7-unknown-linux-gnueabihf.tar.xz 122390768 BLAKE2B 39c38b9bf96e94023b9c6d81fce8c341e789f182b59bf1b540a6d22be24e0498c638d0d3aa1433f49e52048795f91f5f4ca707dd8fcb998ea51caa932537b74e SHA512 88f9f23f431cc34d6b7ddc51c2321905df03dc714aab0b3a5e067390de5092b472f8092ba25a5c09666ad9b138efc2f4b625ca86dbe10ddeea213b8e9d70c9b3
-DIST rust-1.30.1-i686-unknown-linux-gnu.tar.xz 143689500 BLAKE2B 0b654570e295c785b074625c8fe7649e1841327fba790e38e08e912ad0602440e08a205318e637c903989bd19bab4c0a726583f2ab457d75ff71e96524251aa0 SHA512 66c56107fd8c83f9c1948137aee09c67633f6f472823696719a22b5f0b0e28925b0a6b6545b8fe4d741b8473ddc49db30fe112fc5b0e6fc63439901ff5462a86
-DIST rust-1.30.1-mips-unknown-linux-gnu.tar.xz 112662912 BLAKE2B ded8631f76ac5fc16cae298f5a7afdb8c451ff95af03c827959bd19484d513066ac387e956577f5ee42369fc5d68c1e2cbf4cfc72c364739eea31643844ba936 SHA512 8a1681f054a57d62050a2d11ae3109e7be4f6638319b059d10612f0be073de63f2dffea79bb29452763fad8a64274367d9bbe5ca0636e78c34a6cdce542118a0
-DIST rust-1.30.1-mips64-unknown-linux-gnuabi64.tar.xz 117355424 BLAKE2B fcc583d99a6b17e1d38d26a48d39768b09c52e6a6fa3cd36d9513bd9385fd4560d06c3a737b69c396b5bb465ae261321dbbaf7bda4378d7e4be165bc889d8b2d SHA512 c18cd513021753d2b8e1a9ea2bf0bd73817e2c81dcf246993b52c7055b3b18d9f20c935dec4281acbd2792a6964dbfb0c05b5cb2075703aaa444352ef8f06d50
-DIST rust-1.30.1-mipsel-unknown-linux-gnu.tar.xz 114622708 BLAKE2B 5d62f6744cb1bf69d7047bb18e246623ee98c94bfa083fd5269bdcf8dd1c2c0824747dd641f703931f0b22fd513ee8a65a4dec103bf479f6a00e72098541a1aa SHA512 3d084c5c986ba379a3213c9662bc6a0e24c9d3a1c4ae4e28c3f807841eacb15dd8fb42bcb190967ba4a9e8e5397b63e6bbd3990bd9826d52a127bd71ac5b361e
-DIST rust-1.30.1-powerpc-unknown-linux-gnu.tar.xz 110375696 BLAKE2B 6ffa7b6b7ae569c7ebf6b0ab43287421e4a5e2ea8654638902e61df42f7e3de7f14c14f2e585d7b3e140f2ebc7a0e1149b814fd5a6d6c0374f9d8059ff3369c3 SHA512 ebbd2c2b160e6e36a03eee205a333cddf0a36cd0ce42135a7e4119469be41b76cedda143cf9e9491ae0d9aaf65e2e927550e2e0358401fc5f657ee02b37959b4
-DIST rust-1.30.1-powerpc64-unknown-linux-gnu.tar.xz 118698168 BLAKE2B 58905ab6c62d4b7fca8954fc507f9105537cdfc2a55a6585b4784a41ce721046c41606eae6066a173a548c4d065db497e187b2e8c9c6cbc0ee589e7731c8f106 SHA512 7eddabec2e1e01ddbc8c7b0c55f2753e506786867f78e79e47d4f273e7c02170caa24470e0f2ecf6c473cfc8c023e189017454e2ad0f3faa96465fdd22bdfd6d
-DIST rust-1.30.1-powerpc64le-unknown-linux-gnu.tar.xz 121569444 BLAKE2B d4d390ea24298cd88d224efe3c1a1dc3a802b678d977bc0aa26197e291547a6ca823a0fe5e35491204a649cb6a5419343a825ef32408aa2638d057b209b1c15c SHA512 b4595f031a006335ac778ec6a07c398fd6cce78ed3c0ed5730a5c06fa3a390dbab1afda0468756330783baa86dafb2f0c7ca7c75b735eb532c268027e22975e6
-DIST rust-1.30.1-s390x-unknown-linux-gnu.tar.xz 124025168 BLAKE2B b4a8df333b093ae111136a6b9005aca7f424f209d629041c4fce1efc7e19b176f6e6325bf3552e8de93faa311ebf065ad4b9f104de3ee412b2a3fda70156c2b0 SHA512 592764d3d5b4d8a2a7628f4969ba5204da4ea63ca92efc17d4f9339274fce00aecc4d1ebb1f4d0499da8559375ad205054b26e12775af622a7112b20b8c8d4fb
-DIST rust-1.30.1-x86_64-unknown-linux-gnu.tar.xz 145148116 BLAKE2B e70d667d880656209c036b72f619b1bd29679878ff4b8865f0453c064c4a8a53a96e73994509637312032e1260eeb0e53f7372ca1526760b1631846ed6a4c571 SHA512 05238b65b5184e3df81dbcf1cc1035a03054ef09a8563fe60877e4f078d0d2cad71aec73c1451196171f39f8e729059e91c7eed7b1402e03801c0b7e81815885
-DIST rust-1.31.1-aarch64-unknown-linux-gnu.tar.xz 117785172 BLAKE2B 91d8c525993b3d480a6575f5e9e5e84cd50acd74abb07dc2c1ed030113586189cfdd1e8e820c7449127b203cd67e943eca9564367c40d4ceff5013442cda7661 SHA512 c45aebda96a2df0e24efc7dc75cb913f6f92f6214582863367f3556a335d9a5ddf5bb487cb33dee7a48ab1d4dc986bd1fcf32f85b75d07558b1d18d89b26fd30
-DIST rust-1.31.1-arm-unknown-linux-gnueabi.tar.xz 124598180 BLAKE2B 0fd99225ef2148732a9ef1de928239608898f63ad1eb56c54e5cad23d5b2c257122dea26f560a0246b2b4c194a75aa67b9423097b1ab0d5f38a5dc05a31cbbf6 SHA512 3698ae14179ecd595a0afc2ac516da385ecee069eebccbd28935b380b4c3fd3970e56cd6f3da90c9ef2f10cf58c744f0bb711c4aaf7980e3ce15f4422a06155e
-DIST rust-1.31.1-arm-unknown-linux-gnueabihf.tar.xz 124897320 BLAKE2B 83a5674bedb463847bcdc8c0a23e233abaed16f8c0036629673f4d0468c4c58388e766d97c09eaa816cc65c387c143146728466ea23e0781d8b69cdc3704250f SHA512 6c5f34d4878e2154193da145216ca5b92ba4b7eac7f0c6ff30d0e9275a8d0399d5d508f0868dd78d7a8686298cd391ccec32f4586647abdb915c889220570977
-DIST rust-1.31.1-armv7-unknown-linux-gnueabihf.tar.xz 126152056 BLAKE2B 0ee424eeabdd5312ee81bee04cc53cbd6e3549024d8098cfec028d39d8948f1bc8661e519b65abd70b3349ee945514c2cf021bef8592d0dd40778bbb58891ed9 SHA512 78b1681f44274c9a0bf62c7646c5a2c85164c5f4dd4349a757b512dd82d435a4f2779c4b6653c8c3f66986512438d1b23e4af15defbbe9f489c0119141ef1942
-DIST rust-1.31.1-i686-unknown-linux-gnu.tar.xz 147063596 BLAKE2B 308d53c592bda4795cca0003c0ee6775a28d58f9644db1b517fe395b2380ae07dae33efb6aef8df40a75ef7a73e026c4bcd4f64a18333d975a75277a77726f2b SHA512 ee2c2bb2c1bb0f6e7f8eaeb4b2f0a8de7f53e8da675ec05cb56cab9bc4faa18b7075f5843226d7f9459e1208cc3fb1b90c65063b4a5a3828b04f8ff3c93ebe39
-DIST rust-1.31.1-mips-unknown-linux-gnu.tar.xz 115663720 BLAKE2B ea9864e1a950a1e86bc9677fa50b4652c2e196926e00396fedc83673336ae3bcd995d6e192c83a963096338812575f6297bed0f1fff0c664c04dfff34e540545 SHA512 b65b98b5af8466c572c623d01898be1a570c23d31f29b74f04d96d279e3788d3562f182aba376d93ce242557ad9fd6678dfe02ee744727da4dc04e0a1284ad64
-DIST rust-1.31.1-mips64-unknown-linux-gnuabi64.tar.xz 120650332 BLAKE2B 2ff61ca5ac7485fb0c6af54baab44462ed5f516986d59711a9d4d0d0e2831a2a008f8b0a97dd2eb2f93b62c18dd2acb312a09df3d11d2556e5bde2b088f1636a SHA512 bcb22d7fe48f847d56b02d43e59fbec7b3d52577d294e3e51b4b675a2c31a7384de2fd3e3d0147744b1d6f43eafe47c78a511d50e3af8d4d982c85b079383486
-DIST rust-1.31.1-mipsel-unknown-linux-gnu.tar.xz 117636088 BLAKE2B 0994ffca63e7c87f210ee14c9bf21db802a8365ff707dc670507acf6f8dc428eaef6b87fc3f7ddc347fc7f830e484f698bc8bf90720463b29b72bad69d63a5ee SHA512 2e301a35ba5443e6cd7db0a985a88bb4145a5b60acda0ce0feced9b4d87f32f4b23fa7b0db9dc5b420bf13db688409abdb1e192684684addab94c9662ad0eda7
-DIST rust-1.31.1-powerpc-unknown-linux-gnu.tar.xz 113293336 BLAKE2B c38dd3f1329533ccfac224e23fcca05866e5fbaa025840be6adfe9a36fbcd86330f073ec7f7bfabecf80ed4e812e8e67a6af5d6a936cb130dad6a14621917d05 SHA512 2900ed20006bdad0078c2e6751b769cc48984d36b43151c1510b6a6a46e50492c23c495777b0f160b338d96311b646f15a6175f5dcdc572fa96be87ea22f86ec
-DIST rust-1.31.1-powerpc64-unknown-linux-gnu.tar.xz 122297864 BLAKE2B 3cc4e867e3a16f182dbb6a35f1c69bda2e8e56763a5b32fdc96ef7a00654f1426d8f9efd658d804e9d8fa8d8cd60dd8db8894e0c2ea40753a973b4a2279d2ce8 SHA512 9a4427735e345d5e8f860ceab497c0ea3efd001c04322f5d2ecf0d5ac76e27feb1a247bb42662446ae39bf52eca75455b01a4c27341d6241406aa6feab1d1d4b
-DIST rust-1.31.1-powerpc64le-unknown-linux-gnu.tar.xz 125272712 BLAKE2B 5a1cb8226ac6209c451841b2ae40ecf452d14fefb7ce8f5f0e681a2f08954d643628b28ceae03e7a164f5fd5415a408843bb2ddcd86b9e3486b7ddbbd3b6bb99 SHA512 e64f586b632b85d07e18c61e5ce18a69404d89e302ecd8b4495e09e2b2f62bd3f32455b3d0d81cfa2d0031c003f23797421587cf6f314ce5b18b12157e1e9a3b
-DIST rust-1.31.1-s390x-unknown-linux-gnu.tar.xz 127867704 BLAKE2B be4b097506561db4f84db4e8b6224dbcd104f15bb95f7ec56b5c0410b85cc8de8f8b559760d7c01d274b7d031354349eed7b49a816fe404ea319d238af64b932 SHA512 ce6999f7d27468143a9a288fd1bda9f3ec42475f8b8473518be41358a2144317abf8076ed9527a10db94b5b89cf920f04217ce7a78ec214aa3e073a8419675bc
-DIST rust-1.31.1-x86_64-unknown-linux-gnu.tar.xz 148394364 BLAKE2B 92b1860f1d0e2da0fc1755a8ed3f6d351da84103220a8fb560e862375b8ad03485299b42ed4448e6f661bb61650480815f20267ffa3d999c2910bc27b80900ae SHA512 3bf37bc419acd7820c7e33d7b44e6cba7f3b556ca8880fee2f65b1648596f069e0bc590a3a7acc10c60a0328f83787a172650d9c26cf21aa14782dcd9a97ec3a
-DIST rust-1.32.0-aarch64-unknown-linux-gnu.tar.xz 116136352 BLAKE2B 5d5686f285be767a902553d725b59ebe9cf5f8001ea31bc19bee60e65c05d24246dd3f044f07113e37112dd8388e1ee58738aee7af7afbee94c9383c0592aee3 SHA512 b077c54bf38935a55a36fec39d1822562da760489ca924d48978e87b9ac5dc4b5107a7eb08dea0412a5a44c255428c649e31f07a5a67567c715de8644581018d
-DIST rust-1.32.0-arm-unknown-linux-gnueabi.tar.xz 117487960 BLAKE2B 29a92158b6c6fbb0c577e4093c4bfedda1467f0367976676f64e4366d937bd6ebdb7ecfa7ae3a55c4dca0b9f577aea7e1c9905f97f1e167d6b2af5f8b2196b3e SHA512 45d39548e74a22ac862197084e1ca7c4815fefbb49527356d4c7985ef320d2f8d1b0051a4db79503c967ad44df15d0f9ef673b44035f1d90d0383abfca8ef9d4
-DIST rust-1.32.0-arm-unknown-linux-gnueabihf.tar.xz 117758664 BLAKE2B 0ed842e03b8d29c1e5d0856f2498786298f02d4a82ce972e51e51711a5cfff8906ea5e607134edbe2997dc10db655d6cf5dc8ca27d8071c44e0fcbb2f97f6519 SHA512 7f6f1810aa29123d4fc13f4c15220db1cb3911c45c107d7cc5d63e2e04fab3a4b4202f94f2aa3d7f67f4301b77f9e231e6b73983c11b9dce3023918438e9e646
-DIST rust-1.32.0-armv7-unknown-linux-gnueabihf.tar.xz 119183916 BLAKE2B 47e766398ee35ae578a96390757b7e53500b94b1bcab5e17fc4718185e24936797c3b161f06a06aa8eb876726d3916aa3b6a51356fde2a719ff84c6b5996e6f0 SHA512 abadddae0a8de3ee326d1145e3bbe571d9ec0d80261569b6350dbc0fa38b9d31590933c318785f92b75c7add35d7b45e7713a3f1ef7dfd3de085b7255a855b2a
-DIST rust-1.32.0-i686-unknown-linux-gnu.tar.xz 146763596 BLAKE2B 47a8ade700db65eed2e0051a2094d730c22f650599d542951b63de58b6af7d2477d8be4b7a62836d85a4829b5f18bf41e33f50bdd169432583da87545c4c262a SHA512 bec62be3e9f5e37197c10357a386a7083941f44151eab28e7a1c8892c0e8e65d168e1220d5e807bb55b9c86ef046bad5cb23fad89def9cb51d22ff69fb436172
-DIST rust-1.32.0-mips-unknown-linux-gnu.tar.xz 110583680 BLAKE2B b8e95a09b752455b17eca4b7dcb98df60526cb9882b42436b92ba5f0b2478148faceebd88367b42dd98d3c62f7757e850361d1cf507e1008e5dbf5c25752d253 SHA512 6b0fd688535b8679a06384c321b87dc2c6990c799f5b6c14cf89806f46b517633a8a4c79133f4d7f528770fb2a7ba4623308a8c590d8525bd1cbdbdc3defbfad
-DIST rust-1.32.0-mips64-unknown-linux-gnuabi64.tar.xz 118818484 BLAKE2B 8b4adb0a87ca07f9f1e51f84f65a28e2eb98340efe06a70cca312e85b80a2dcf4a1098c981a880f35fdc27a854f41ba8f0de413668756cd6c47a7cad82ff473d SHA512 e8737ff2cb6421af437335c75a48df0d094e6749bb32ae0dc8d614548a2efd682dedb448790f72987332750378259e45cde59c1555a20cb9b78991c422d42b34
-DIST rust-1.32.0-mipsel-unknown-linux-gnu.tar.xz 112802132 BLAKE2B 8d44aa6e19cb2ac5e0e43fb40ab0b879c611481fd3b23750d3dec1c8ab646b8b3f948eccba0f20b583d411de5cc43317d433c49ca3b341cab08225d3688be668 SHA512 c32fa5cbf779c629d423f498f885cb528f2d5b3165f80c6415fc98e7b7fc4802ad893b7aa2c2dad810fbaa968687053b52b32fabe775ba4a1bb72ceabdaf733f
-DIST rust-1.32.0-powerpc-unknown-linux-gnu.tar.xz 111816220 BLAKE2B 7398c98d37589c307953d11a21866bf23a34806cbcb2316926a321f5407481e292645ba3425d9b7deeaad20da65096189b477deff6769fca856547343dde8146 SHA512 4155d662b3f7cfce376896792767132a4e9e1ecf4d4c1232a0f4c0a3765b5e736ee8b4e6f368b874146d94c809d61bd26680c4d7a3dd8ad0bcea819c5756feb2
-DIST rust-1.32.0-powerpc64-unknown-linux-gnu.tar.xz 120518816 BLAKE2B 9666c809b89d0c564b019fc4b7f6102dcb98fc53e88dfd553fe0274b8758c1ceec5c9c6df9e5e3886fb3cb6ea82322ec8d6e38663189336fdccc50ee10e033e6 SHA512 e4c70ab500feccb2ed67435857f584381be051ba7b2d70cea55b0c94b846e61ba10930a20ceceb67ec981daa5baa166fc6dea7c14ac9ac28270c30841d9c16a1
-DIST rust-1.32.0-powerpc64le-unknown-linux-gnu.tar.xz 124278796 BLAKE2B cee79918a210c34918cf183c918099cd2c246d881576f80e960492c7d5ae1920a43f2d4424700543a7cf50cc5f18618b6d4abfac1e856c9e8711fb73429571b7 SHA512 058c1ebe58bb22e8ff791a74edb058e7494e2673dd1d91ffad646ec71cfdc240e934b44fbae6e58639143b33161d314224e7d1c7b2cc35677bf9eab901e130eb
-DIST rust-1.32.0-s390x-unknown-linux-gnu.tar.xz 128857448 BLAKE2B ab0ce58315d116a0aaed007d03df7be4ecfeee01fd6e368173e8aa023b2ae1d922824e92b103aaf205ed2adf1f9da78abd229fff313c24e32ea3fad68f8bdda3 SHA512 4f32934472356d9b7e15abb0fa07be9eddccc7b9e0a1834bbee5ff279c6ece9174d942e2feed611f9b697613ee3b76f8a8ab68559b6d075e740aeab117223325
-DIST rust-1.32.0-x86_64-unknown-linux-gnu.tar.xz 147868652 BLAKE2B 616e69d80dd0e7de2ac86f2090825c8a991ad1b88155d21d0eef89b7aea418ba8bb0140eeb497c417c77afc770f51498020ee86cfd059533500c0cb88f0130b6 SHA512 5c5def0c415b0f34e1e7476841a0bd3f91fe4bde8321c7b06b1cd2a3d10a3d676ed16a26561929ce39c3c2cbcf7a16960c5decca9e385afe8295da32b4fb7a17
DIST rust-1.33.0-aarch64-unknown-linux-gnu.tar.xz 121877852 BLAKE2B accab68c374afe3eafa38e7ad33c32c427db8d0caab722461075c679af2406d991453a8e529a013b99a5841ef9a5e047cdc9ca88dbebab0c904f4afd99c2b851 SHA512 51f6ca909411fd3b3c05baedc38be8a29923966e7cd6960a10152886687132d4ef9750140c5121b9486d6f6ee1ed7ff35f8105c9f0731fe98ce750d0ea9c528f
DIST rust-1.33.0-arm-unknown-linux-gnueabi.tar.xz 122944304 BLAKE2B c9c29d9409d5829029ffc444c890c0bba0ea213c0a4eb169e65447b6183b0693ab26d48db2fb0be5a325f6ebb7588f90e18b8377f46276d519fcdf5a637ddae7 SHA512 7911dd32cb415d69c05041f450540312d6a78efea36646b4d409a01a0809d94c2eb6a20bfc27772f50cfa0cfed076c3cf5ce62509820819111226f6974f05844
DIST rust-1.33.0-arm-unknown-linux-gnueabihf.tar.xz 123280648 BLAKE2B be19b75623995c0f986d56318887685e70b682caa735adeac259a3f4b67f56537dc43a2a5d696db66547cb523227498c9fcc4213b28df12e5d26999f3caaa7ee SHA512 a0850de543cd11efab4d67bde498e5897f66bbffa1671c4bb6d31fc709dc0869e322e18982dffd199ad6ff7cee282475b04a563fd11a4c7df86f872b02fcce93
@@ -90,10 +28,5 @@ DIST rust-1.34.2-powerpc64le-unknown-linux-gnu.tar.xz 129619832 BLAKE2B df76b7c0
DIST rust-1.34.2-s390x-unknown-linux-gnu.tar.xz 134376720 BLAKE2B 3eb1452bc0f5d6cbe5547f18ad039c54d4fee44e8c24e35f3399272755cd293df008db2c7dded32c7853944e43de7a4d337b7408835445a4916dbf55d14a7b3e SHA512 181f58b00cdccb205be853f5d00fc0a0c939b7e4dc801717b21ece0f714a8f3b501f1196eb2e3f3081932a0417a6218763c3d095cdd036e9f202cc41291876a1
DIST rust-1.34.2-x86_64-unknown-linux-gnu.tar.xz 157279864 BLAKE2B c25fcb6168e16a4deb19a8ca9b3d91966194f4c8d2e60933226fab015b64a819f6e56a6b51b6e9457ce80efaf5bf71f2eed2f3e6e39bef5856524e33d0a5637b SHA512 64d6b7da08ffd877c10d819605a37b0bc178c4ab80e2f7449f3d5ac9254a438e148da3729408b4c9429ed499d7f142c9d2926f5c916e0a32bebaaefe4b0a09a6
DIST rustc-1.29.1-src.tar.xz 61937676 BLAKE2B 6a60249538e1ec62471f4d0e3fc31c0a648433aa6f85ca7341657ea07772e338eb92a629941685808f4b80e84cb025d78aee9d0d6fa71c6635a1647c61bca9bc SHA512 1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7
-DIST rustc-1.29.2-src.tar.xz 61888912 BLAKE2B f59b0bf45caa6f6136f92ffbaa612bbc6a340c8694ec69d75aadace9180c36753f985641915524388b52cc108f8f5b71840ee3a6c0b1fcff6decb61d2d8a161e SHA512 d8fa9501764348ace8f60f2069bcd016925abe56c8bbc2b87fb52ff796e4bc7284c1fccbb1671416437bb82fde7d9240eeae875d6099914e27e75cfe050e2d38
-DIST rustc-1.30.1-src.tar.xz 96086232 BLAKE2B 170767b64efe670086e7c4e73838b489a155a72c703148f83cad29d401a825a94a1def3aa462ba527e1bd08181c7a9be0e404c25f012906541c3d739eb57e9e5 SHA512 e466db81b9a82239670c48b876dc7390fcdda28c6390308691ddf2e0c12a39b57bd5ddb18322d1b4cd58165f69a666c7d83bee6573049da3b94e401657459bf5
-DIST rustc-1.31.1-src.tar.xz 96915864 BLAKE2B bedfe1d56e2f99bb43b4b652d540aedf0a86c47b8493f28fb29e5af3135ff469ed40775bc2ee25ac5bd28a264ecba0094d7c9b6aae25ea365ed3e6f354ffa40b SHA512 d6688711452295c41468af214f036499074d82fbeedc3f03560275219c2fae910e623e38e3210176d86f78ba5533ea098da5ff21532c8ad1a5aac132bb74ee02
-DIST rustc-1.32.0-src.tar.xz 99602696 BLAKE2B ab26247e3ecb75dbe373254c1c49f46c00a5a4db2b9cedffccb30122ea3b7de2761d6995b5423d0105caf85cc9542b4c21d487385faa34c835398c3320ccbd3b SHA512 487c405fed6430f62d2d0c38b65f6223b1c5074c7a0d3734dc8b3bb72fca255f5727e49541749569713a0c3e9a67eff574ba5698e8dceca6f0ef20b50f99aa42
-DIST rustc-1.33.0-src.tar.xz 100635400 BLAKE2B 1fe8ffcfab8324a93a07b9b9ac9cd050fd9d660fb24884761e8ce5e5a67ce5b6df8513e1440090b39c3ced9cb5ced43f07cc9b0337d39625d2cf4aa9e083cfef SHA512 3291e4e19f75f44c81e6fcf4c01edc7c9d326eca43722381231abcf2e99f4314059ba59a29b79f5511ad9421c358c45e8fe18584d6954d17fe2aabad0f9d9147
DIST rustc-1.34.2-src.tar.xz 95048792 BLAKE2B e81e4bfda87ddfb09ab8a74792346970aa440c678d2bb1279c329db4929282f761ada6fea9d81ceeecfd513613025c8e636487626fc36bd0b33559e045bb1b15 SHA512 f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
DIST rustc-1.35.0-src.tar.xz 96543548 BLAKE2B 0291152f2b7aa8b50b22d74afbd9c7654bab8ae7dcb76224dbff43bc39a3b918ff86bfd20f408a9a16da8b20b08d9f0289bb63620f093d25d9fa008de57f52c3 SHA512 477c10b780bd54776be7ecbda0ab970416253e4a87c3e701825a7d07bcbcd91601b8e61129c5d04d4259e89c2e81e87cdbdee853375a8de5c9cf8372be2c9129
diff --git a/dev-lang/rust/files/1.29.2-clippy-sysroot.patch b/dev-lang/rust/files/1.29.2-clippy-sysroot.patch
deleted file mode 100644
index 6a527e5a020..00000000000
--- a/dev-lang/rust/files/1.29.2-clippy-sysroot.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/src/tools/clippy/src/driver.rs 2018-10-04 16:30:42.438486058 +0300
-+++ b/src/tools/clippy/src/driver.rs 2018-10-04 16:31:45.044484028 +0300
-@@ -20,54 +20,22 @@
- return;
- }
-
-- let sys_root = option_env!("SYSROOT")
-- .map(String::from)
-- .or_else(|| std::env::var("SYSROOT").ok())
-- .or_else(|| {
-- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
-- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
-- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
-- })
-- .or_else(|| {
-- Command::new("rustc")
-- .arg("--print")
-- .arg("sysroot")
-- .output()
-- .ok()
-- .and_then(|out| String::from_utf8(out.stdout).ok())
-- .map(|s| s.trim().to_owned())
-- })
-- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
--
- // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
- // We're invoking the compiler programmatically, so we ignore this/
-- let mut orig_args: Vec<String> = env::args().collect();
-- if orig_args.len() <= 1 {
-+ let mut args: Vec<String> = env::args().collect();
-+ if args.len() <= 1 {
- std::process::exit(1);
- }
-- if orig_args[1] == "rustc" {
-+ if args[1] == "rustc" {
- // we still want to be able to invoke it normally though
-- orig_args.remove(1);
-+ args.remove(1);
- }
-- // this conditional check for the --sysroot flag is there so users can call
-- // `clippy_driver` directly
-- // without having to pass --sysroot or anything
-- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
-- orig_args.clone()
-- } else {
-- orig_args
-- .clone()
-- .into_iter()
-- .chain(Some("--sysroot".to_owned()))
-- .chain(Some(sys_root))
-- .collect()
-- };
-
- // this check ensures that dependencies are built but not linted and the final
- // crate is
- // linted but not built
- let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
-- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
-+ || args.iter().any(|s| s == "--emit=dep-info,metadata");
-
- if clippy_enabled {
- args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
diff --git a/dev-lang/rust/files/1.30.1-clippy-sysroot.patch b/dev-lang/rust/files/1.30.1-clippy-sysroot.patch
deleted file mode 100644
index d38f8ba5bae..00000000000
--- a/dev-lang/rust/files/1.30.1-clippy-sysroot.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/src/tools/clippy/src/driver.rs 2018-10-25 20:09:06.143109996 +0300
-+++ b/src/tools/clippy/src/driver.rs 2018-10-25 20:11:09.204106005 +0300
-@@ -29,54 +29,22 @@
- exit(0);
- }
-
-- let sys_root = option_env!("SYSROOT")
-- .map(String::from)
-- .or_else(|| std::env::var("SYSROOT").ok())
-- .or_else(|| {
-- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
-- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
-- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
-- })
-- .or_else(|| {
-- Command::new("rustc")
-- .arg("--print")
-- .arg("sysroot")
-- .output()
-- .ok()
-- .and_then(|out| String::from_utf8(out.stdout).ok())
-- .map(|s| s.trim().to_owned())
-- })
-- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
--
- // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
- // We're invoking the compiler programmatically, so we ignore this/
-- let mut orig_args: Vec<String> = env::args().collect();
-- if orig_args.len() <= 1 {
-+ let mut args: Vec<String> = env::args().collect();
-+ if args.len() <= 1 {
- std::process::exit(1);
- }
-- if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
-+ if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
- // we still want to be able to invoke it normally though
-- orig_args.remove(1);
-+ args.remove(1);
- }
-- // this conditional check for the --sysroot flag is there so users can call
-- // `clippy_driver` directly
-- // without having to pass --sysroot or anything
-- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
-- orig_args.clone()
-- } else {
-- orig_args
-- .clone()
-- .into_iter()
-- .chain(Some("--sysroot".to_owned()))
-- .chain(Some(sys_root))
-- .collect()
-- };
-
- // this check ensures that dependencies are built but not linted and the final
- // crate is
- // linted but not built
- let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
-- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
-+ || args.iter().any(|s| s == "--emit=dep-info,metadata");
-
- if clippy_enabled {
- args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
diff --git a/dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch b/dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch
deleted file mode 100644
index eaeab87774e..00000000000
--- a/dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Revert "[CMake] Unconditionally add .h and .td files to target sources"
-
-This reverts commit https://github.com/llvm-mirror/llvm/commit/6fb010f388bb2cb2f00fe039123092308ac4865d.
-
-Bug: https://bugs.gentoo.org/675752#c7
---- a/src/llvm/cmake/modules/LLVMProcessSources.cmake
-+++ b/src/llvm/cmake/modules/LLVMProcessSources.cmake
-@@ -52,15 +52,16 @@ function(llvm_process_sources OUT_VAR)
- cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS;ADDITIONAL_HEADER_DIRS" ${ARGN})
- set(sources ${ARG_UNPARSED_ARGUMENTS})
- llvm_check_source_file_list( ${sources} )
--
-- # This adds .td and .h files to the Visual Studio solution:
-- add_td_sources(sources)
-- find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
-- if (hdrs)
-- set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
-+ if( LLVM_ENABLE_IDE )
-+ # This adds .td and .h files to the Visual Studio solution:
-+ add_td_sources(sources)
-+ find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
-+ if (hdrs)
-+ set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
-+ endif()
-+ set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
-+ list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
- endif()
-- set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
-- list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
-
- set( ${OUT_VAR} ${sources} PARENT_SCOPE )
- endfunction(llvm_process_sources)
diff --git a/dev-lang/rust/files/1.32.0-libressl.patch b/dev-lang/rust/files/1.32.0-libressl.patch
deleted file mode 100644
index 04e7fa8a4f3..00000000000
--- a/dev-lang/rust/files/1.32.0-libressl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
-index 0a703777e..0063f9e9d 100644
---- a/vendor/openssl-sys/.cargo-checksum.json
-+++ b/vendor/openssl-sys/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.toml":"e40f8c3ccf6a2b34f50ae9cee3396ac398944ee253c1e5dabac802ee89732ba2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"f509c63668156ce48b93d05d5483a5bfb112dc8f786ff6296f7801add2db7452","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"57f094c7fee0a6b0611e7f8829663bff525a607e11a35eb77dc30eb159b2139a","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"156e605ecb45d4e1b7a7c404003ccd19c4a2226cbfe47938ad1dce240ed4369f","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"ff3d1b390ab1b9700f682ad95a30dc9c0f40dd212ca57266012cfc678b0e365a"}
-\ No newline at end of file
-+{"files":{"Cargo.toml":"e40f8c3ccf6a2b34f50ae9cee3396ac398944ee253c1e5dabac802ee89732ba2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"0fd6fd2d7215f6b4a2065d352708155938f268a51df044fb7bd0b184b7cd122b","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"57f094c7fee0a6b0611e7f8829663bff525a607e11a35eb77dc30eb159b2139a","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"156e605ecb45d4e1b7a7c404003ccd19c4a2226cbfe47938ad1dce240ed4369f","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"ff3d1b390ab1b9700f682ad95a30dc9c0f40dd212ca57266012cfc678b0e365a"}
-diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
-index 2b1691230..024491358 100644
---- a/vendor/openssl-sys/build/main.rs
-+++ b/vendor/openssl-sys/build/main.rs
-@@ -500,6 +500,8 @@ See rust-openssl README for more information:
- (7, _) => ('7', 'x'),
- (8, 0) => ('8', '0'),
- (8, 1) => ('8', '1'),
-+ (8, _) => ('8', 'x'),
-+ (9, 0) => ('9', '0'),
- _ => version_error(),
- };
-
-@@ -540,7 +542,7 @@ fn version_error() -> ! {
- "
-
- This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
--through 2.8.1, but a different version of OpenSSL was found. The build is now aborting
-+through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
- due to this version mismatch.
-
- "
diff --git a/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch b/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch
deleted file mode 100644
index afc2cabde4b..00000000000
--- a/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1c95f5a34c14f08d65cdd198827e3a2fcb63cf39 Mon Sep 17 00:00:00 2001
-From: Tom Tromey <tom@tromey.com>
-Date: Tue, 22 Jan 2019 11:13:53 -0700
-Subject: [PATCH] Fix issue 57762
-
-Issue 57762 points out a compiler crash when the compiler was built
-using a stock LLVM 7. LLVM 7 was released without a necessary fix for
-a bug in the DWARF discriminant code.
-
-This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.
-
-Closes #57762
----
- src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
-index 6deedd0b5ea3..a354eef6887a 100644
---- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
-+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
-@@ -1164,7 +1164,11 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
- // On MSVC we have to use the fallback mode, because LLVM doesn't
- // lower variant parts to PDB.
- return cx.sess().target.target.options.is_like_msvc
-- || llvm_util::get_major_version() < 7;
-+ || llvm_util::get_major_version() < 7
-+ // LLVM version 7 did not release with an important bug fix;
-+ // but the required patch is in the equivalent Rust LLVM.
-+ // See https://github.com/rust-lang/rust/issues/57762.
-+ || (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() });
- }
-
- // Describes the members of an enum value: An enum is described as a union of
diff --git a/dev-lang/rust/files/1.33.0-clippy-sysroot.patch b/dev-lang/rust/files/1.33.0-clippy-sysroot.patch
deleted file mode 100644
index c8dc7a8e90d..00000000000
--- a/dev-lang/rust/files/1.33.0-clippy-sysroot.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/src/tools/clippy/src/driver.rs 2019-03-01 20:52:40.685331653 +0300
-+++ b/src/tools/clippy/src/driver.rs 2019-03-01 20:54:44.161327649 +0300
-@@ -31,54 +31,22 @@
- exit(0);
- }
-
-- let sys_root = option_env!("SYSROOT")
-- .map(String::from)
-- .or_else(|| std::env::var("SYSROOT").ok())
-- .or_else(|| {
-- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
-- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
-- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
-- })
-- .or_else(|| {
-- Command::new("rustc")
-- .arg("--print")
-- .arg("sysroot")
-- .output()
-- .ok()
-- .and_then(|out| String::from_utf8(out.stdout).ok())
-- .map(|s| s.trim().to_owned())
-- })
-- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
--
- // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
- // We're invoking the compiler programmatically, so we ignore this/
-- let mut orig_args: Vec<String> = env::args().collect();
-- if orig_args.len() <= 1 {
-+ let mut args: Vec<String> = env::args().collect();
-+ if args.len() <= 1 {
- std::process::exit(1);
- }
-- if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
-+ if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
- // we still want to be able to invoke it normally though
-- orig_args.remove(1);
-+ args.remove(1);
- }
-- // this conditional check for the --sysroot flag is there so users can call
-- // `clippy_driver` directly
-- // without having to pass --sysroot or anything
-- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
-- orig_args.clone()
-- } else {
-- orig_args
-- .clone()
-- .into_iter()
-- .chain(Some("--sysroot".to_owned()))
-- .chain(Some(sys_root))
-- .collect()
-- };
-
- // this check ensures that dependencies are built but not linted and the final
- // crate is
- // linted but not built
- let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
-- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
-+ || args.iter().any(|s| s == "--emit=dep-info,metadata");
-
- if clippy_enabled {
- args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
diff --git a/dev-lang/rust/rust-1.29.2-r1.ebuild b/dev-lang/rust/rust-1.29.2-r1.ebuild
deleted file mode 100644
index 472f877be50..00000000000
--- a/dev-lang/rust/rust-1.29.2-r1.ebuild
+++ /dev/null
@@ -1,279 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
-
-inherit eapi7-ver multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm64 ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-CARGO_DEPEND_VERSION="0.$(($(ver_cut 2) + 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
- $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="cargo clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
-
-COMMON_DEPEND="jemalloc? ( dev-libs/jemalloc )
- cargo? (
- sys-libs/zlib
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/libssh2
- net-libs/http-parser:=
- net-misc/curl[ssl]
- )"
-DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- dev-util/cmake"
-RDEPEND="${COMMOND_DEPEND}
- >=app-eselect/eselect-rust-0.3_pre20150425
- cargo? ( !dev-util/cargo )
- rustfmt? ( !dev-util/rustfmt )"
-PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )"
-
-S="${WORKDIR}/${MY_P}-src"
-
-PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
-
-toml_usex() {
- usex "$1" true false
-}
-
-src_prepare() {
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
-
- default
-}
-
-src_configure() {
- local rust_target="" rust_targets="" rust_target_name arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- fi
- rust_targets="${rust_targets#,}"
-
- local extended="false" tools=""
- if use cargo; then
- extended="true"
- tools="\"cargo\","
- fi
- if use clippy; then
- extended="true"
- tools="\"clippy\",$tools"
- fi
- if use rls; then
- extended="true"
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- extended="true"
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- rust_target="$(rust_abi)"
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- [build]
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = ${extended}
- tools = [${tools}]
- [install]
- prefix = "${EPREFIX}/usr"
- libdir = "$(get_libdir)/${P}"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
- [rust]
- optimize = $(toml_usex !debug)
- debuginfo = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- use-jemalloc = $(toml_usex jemalloc)
- default-linker = "$(tc-getCC)"
- channel = "stable"
- rpath = false
- lld = $(toml_usex wasm)
- EOF
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(get_abi_CHOST ${v##*.})
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- EOF >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- EOF
-
- cat <<- EOF >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- EOF
- done
-
- if use wasm; then
- cat <<- EOF >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "rust-lld"
- EOF
- fi
-}
-
-src_compile() {
- env $(cat "${S}"/config.env)\
- "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
-}
-
-src_install() {
- local rust_target abi_libdir
-
- env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
-
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
- if use cargo; then
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
- fi
- if use clippy; then
- mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
- mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
- fi
- if use rls; then
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
- fi
- if use rustfmt; then
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
- fi
-
- # Copy shared library versions of standard libraries for all targets
- # into the system's abi-dependent lib directories because the rust
- # installer only does so for the native ABI.
- for v in $(multilib_get_enabled_abi_pairs); do
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then
- continue
- fi
- abi_libdir=$(get_abi_LIBDIR ${v##*.})
- rust_target=$(get_abi_CHOST ${v##*.})
- mkdir -p "${D}/usr/${abi_libdir}"
- cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
- "${D}/usr/${abi_libdir}" || die
- done
-
- dodoc COPYRIGHT
-
- # FIXME:
- # Really not sure if that env is needed, specailly LDPATH
- cat <<-EOF > "${T}"/50${P}
- LDPATH="/usr/$(get_libdir)/${P}"
- MANPATH="/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- cat <<-EOF > "${T}/provider-${P}"
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-lldb
- EOF
- if use cargo; then
- echo /usr/bin/cargo >> "${T}/provider-${P}"
- fi
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- dodir /etc/env.d/rust
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-}
-
-pkg_postinst() {
- eselect rust update --if-unset
-
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
-
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-
- if has_version 'app-shells/zsh'; then
- elog "install app-shells/rust-zshcomp to get zsh completion for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust unset --if-invalid
-}
diff --git a/dev-lang/rust/rust-1.30.1-r1.ebuild b/dev-lang/rust/rust-1.30.1-r1.ebuild
deleted file mode 100644
index 77587498d40..00000000000
--- a/dev-lang/rust/rust-1.30.1-r1.ebuild
+++ /dev/null
@@ -1,299 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
-
-LLVM_MAX_SLOT=7
-
-inherit check-reqs eapi7-ver estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
- $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
-
-COMMON_DEPEND="
- jemalloc? ( dev-libs/jemalloc )
- sys-libs/zlib
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/libssh2
- net-libs/http-parser:=
- net-misc/curl[ssl]
- system-llvm? ( >=sys-devel/llvm-6:= )"
-DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- dev-util/cmake"
-RDEPEND="${COMMON_DEPEND}
- >=app-eselect/eselect-rust-20190311
- !dev-util/cargo
- rustfmt? ( !dev-util/rustfmt )"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )"
-
-S="${WORKDIR}/${MY_P}-src"
-
-PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
-
-toml_usex() {
- usex "$1" true false
-}
-
-pre_build_checks() {
- CHECKREQS_DISK_BUILD="7G"
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- CHECKREQS_DISK_BUILD="10G"
- fi
- eshopts_pop
- check-reqs_pkg_setup
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
- if use system-llvm; then
- llvm_pkg_setup
- fi
-}
-
-src_prepare() {
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
-
- default
-}
-
-src_configure() {
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- fi
- rust_targets="${rust_targets#,}"
-
- local extended="true" tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- rust_target="$(rust_abi)"
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = "$(usex wasm WebAssembly '')"
- link-shared = $(toml_usex system-llvm)
- [build]
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = ${extended}
- tools = [${tools}]
- [install]
- prefix = "${EPREFIX}/usr"
- libdir = "$(get_libdir)/${P}"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
- [rust]
- optimize = $(toml_usex !debug)
- debuginfo = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- use-jemalloc = $(toml_usex jemalloc)
- default-linker = "$(tc-getCC)"
- channel = "stable"
- rpath = false
- lld = $(toml_usex wasm)
- EOF
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- EOF >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- EOF
-
- cat <<- EOF >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- EOF
- if use system-llvm; then
- cat <<- EOF >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- EOF
- fi
- done
-
- if use wasm; then
- cat <<- EOF >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "rust-lld"
- EOF
- fi
-}
-
-src_compile() {
- env $(cat "${S}"/config.env)\
- "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
-}
-
-src_install() {
- local rust_target abi_libdir
-
- env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
-
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
- if use clippy; then
- mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
- mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
- fi
- if use rls; then
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
- fi
- if use rustfmt; then
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
- fi
-
- # Copy shared library versions of standard libraries for all targets
- # into the system's abi-dependent lib directories because the rust
- # installer only does so for the native ABI.
- for v in $(multilib_get_enabled_abi_pairs); do
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then
- continue
- fi
- abi_libdir=$(get_abi_LIBDIR ${v##*.})
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- mkdir -p "${D}/usr/${abi_libdir}"
- cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
- "${D}/usr/${abi_libdir}" || die
- done
-
- dodoc COPYRIGHT
-
- # FIXME:
- # Really not sure if that env is needed, specailly LDPATH
- cat <<-EOF > "${T}"/50${P}
- LDPATH="/usr/$(get_libdir)/${P}"
- MANPATH="/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- cat <<-EOF > "${T}/provider-${P}"
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-lldb
- EOF
- echo /usr/bin/cargo >> "${T}/provider-${P}"
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- dodir /etc/env.d/rust
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-}
-
-pkg_postinst() {
- eselect rust update --if-unset
-
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
-
- ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
- ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
- ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
-
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-
- if has_version 'app-shells/zsh'; then
- elog "install app-shells/rust-zshcomp to get zsh completion for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust unset --if-invalid
-}
diff --git a/dev-lang/rust/rust-1.31.1.ebuild b/dev-lang/rust/rust-1.31.1.ebuild
deleted file mode 100644
index 78577633647..00000000000
--- a/dev-lang/rust/rust-1.31.1.ebuild
+++ /dev/null
@@ -1,298 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
-
-LLVM_MAX_SLOT=7
-
-inherit check-reqs eapi7-ver estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
- $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
-
-COMMON_DEPEND="jemalloc? ( dev-libs/jemalloc )
- sys-libs/zlib
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/libssh2
- net-libs/http-parser:=
- net-misc/curl[ssl]
- system-llvm? ( >=sys-devel/llvm-6:= )"
-DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- dev-util/cmake"
-RDEPEND="${COMMON_DEPEND}
- >=app-eselect/eselect-rust-20190311
- !dev-util/cargo
- rustfmt? ( !dev-util/rustfmt )"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )"
-
-S="${WORKDIR}/${MY_P}-src"
-
-PATCHES=( "${FILESDIR}"/1.30.1-clippy-sysroot.patch )
-
-toml_usex() {
- usex "$1" true false
-}
-
-pre_build_checks() {
- CHECKREQS_DISK_BUILD="7G"
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- CHECKREQS_DISK_BUILD="10G"
- fi
- eshopts_pop
- check-reqs_pkg_setup
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
- if use system-llvm; then
- llvm_pkg_setup
- fi
-}
-
-src_prepare() {
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
-
- default
-}
-
-src_configure() {
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- fi
- rust_targets="${rust_targets#,}"
-
- local extended="true" tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- rust_target="$(rust_abi)"
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = "$(usex wasm WebAssembly '')"
- link-shared = $(toml_usex system-llvm)
- [build]
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = ${extended}
- tools = [${tools}]
- [install]
- prefix = "${EPREFIX}/usr"
- libdir = "$(get_libdir)/${P}"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
- [rust]
- optimize = $(toml_usex !debug)
- debuginfo = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- use-jemalloc = $(toml_usex jemalloc)
- default-linker = "$(tc-getCC)"
- channel = "stable"
- rpath = false
- lld = $(toml_usex wasm)
- EOF
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- EOF >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- EOF
-
- cat <<- EOF >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- EOF
- if use system-llvm; then
- cat <<- EOF >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- EOF
- fi
- done
-
- if use wasm; then
- cat <<- EOF >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "rust-lld"
- EOF
- fi
-}
-
-src_compile() {
- env $(cat "${S}"/config.env)\
- "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
-}
-
-src_install() {
- local rust_target abi_libdir
-
- env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
-
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
- if use clippy; then
- mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
- mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
- fi
- if use rls; then
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
- fi
- if use rustfmt; then
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
- fi
-
- # Copy shared library versions of standard libraries for all targets
- # into the system's abi-dependent lib directories because the rust
- # installer only does so for the native ABI.
- for v in $(multilib_get_enabled_abi_pairs); do
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then
- continue
- fi
- abi_libdir=$(get_abi_LIBDIR ${v##*.})
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- mkdir -p "${D}/usr/${abi_libdir}"
- cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
- "${D}/usr/${abi_libdir}" || die
- done
-
- dodoc COPYRIGHT
-
- # FIXME:
- # Really not sure if that env is needed, specailly LDPATH
- cat <<-EOF > "${T}"/50${P}
- LDPATH="/usr/$(get_libdir)/${P}"
- MANPATH="/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- cat <<-EOF > "${T}/provider-${P}"
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-lldb
- EOF
- echo /usr/bin/cargo >> "${T}/provider-${P}"
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- dodir /etc/env.d/rust
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-}
-
-pkg_postinst() {
- eselect rust update --if-unset
-
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
-
- ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
- ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
- ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
-
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-
- if has_version 'app-shells/zsh'; then
- elog "install app-shells/rust-zshcomp to get zsh completion for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust unset --if-invalid
-}
diff --git a/dev-lang/rust/rust-1.32.0.ebuild b/dev-lang/rust/rust-1.32.0.ebuild
deleted file mode 100644
index e145841b557..00000000000
--- a/dev-lang/rust/rust-1.32.0.ebuild
+++ /dev/null
@@ -1,309 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
-
-LLVM_MAX_SLOT=7
-
-inherit check-reqs eapi7-ver estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
- $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
-
-COMMON_DEPEND="sys-libs/zlib
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/libssh2
- net-libs/http-parser:=
- net-misc/curl[ssl]
- system-llvm? ( sys-devel/llvm:7= )"
-DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- dev-util/cmake"
-RDEPEND="${COMMON_DEPEND}
- >=app-eselect/eselect-rust-20190311
- !dev-util/cargo
- rustfmt? ( !dev-util/rustfmt )"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )"
-
-S="${WORKDIR}/${MY_P}-src"
-
-PATCHES=(
- "${FILESDIR}"/1.30.1-clippy-sysroot.patch
- "${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch
- "${FILESDIR}"/1.32.0-system-llvm-7-SIGSEGV.patch
- # Support LibreSSL 2.8.x: https://github.com/sfackler/rust-openssl/commit/9fd7584a84168655cb27e03b7e19a9847b88e77f
- # Support LibreSSL 2.9.0: https://github.com/sfackler/rust-openssl/commit/af4488357c9b3e003b883e89c16aaa675ad0c6ac
- "${FILESDIR}"/1.32.0-libressl.patch
-)
-
-toml_usex() {
- usex "$1" true false
-}
-
-pre_build_checks() {
- CHECKREQS_DISK_BUILD="7G"
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- CHECKREQS_DISK_BUILD="10G"
- fi
- eshopts_pop
- check-reqs_pkg_setup
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
- if use system-llvm; then
- llvm_pkg_setup
- fi
-}
-
-src_prepare() {
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
-
- # ugly hack for https://bugs.gentoo.org/679806
- if use ppc64; then
- sed -i 's/getentropy/gEtEnTrOpY/g' "${rust_stage0_root}"/bin/cargo || die
- export OPENSSL_ppccap=0
- fi
-
- default
-}
-
-src_configure() {
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- fi
- rust_targets="${rust_targets#,}"
-
- local extended="true" tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- rust_target="$(rust_abi)"
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = "$(usex wasm WebAssembly '')"
- link-shared = $(toml_usex system-llvm)
- [build]
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = ${extended}
- tools = [${tools}]
- [install]
- prefix = "${EPREFIX}/usr"
- libdir = "$(get_libdir)/${P}"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
- [rust]
- optimize = $(toml_usex !debug)
- debuginfo = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- default-linker = "$(tc-getCC)"
- channel = "stable"
- rpath = false
- lld = $(toml_usex wasm)
- EOF
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- EOF >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- EOF
-
- cat <<- EOF >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- EOF
- if use system-llvm; then
- cat <<- EOF >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- EOF
- fi
- done
-
- if use wasm; then
- cat <<- EOF >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "rust-lld"
- EOF
- fi
-}
-
-src_compile() {
- env $(cat "${S}"/config.env)\
- "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
-}
-
-src_install() {
- local rust_target abi_libdir
-
- env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
-
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
- if use clippy; then
- mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
- mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
- fi
- if use rls; then
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
- fi
- if use rustfmt; then
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
- fi
-
- # Copy shared library versions of standard libraries for all targets
- # into the system's abi-dependent lib directories because the rust
- # installer only does so for the native ABI.
- for v in $(multilib_get_enabled_abi_pairs); do
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then
- continue
- fi
- abi_libdir=$(get_abi_LIBDIR ${v##*.})
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- mkdir -p "${D}/usr/${abi_libdir}"
- cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
- "${D}/usr/${abi_libdir}" || die
- done
-
- dodoc COPYRIGHT
-
- # FIXME:
- # Really not sure if that env is needed, specailly LDPATH
- cat <<-EOF > "${T}"/50${P}
- LDPATH="/usr/$(get_libdir)/${P}"
- MANPATH="/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- cat <<-EOF > "${T}/provider-${P}"
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-lldb
- EOF
- echo /usr/bin/cargo >> "${T}/provider-${P}"
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- dodir /etc/env.d/rust
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-}
-
-pkg_postinst() {
- eselect rust update --if-unset
-
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
-
- ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
- ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
- ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
-
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-
- if has_version 'app-shells/zsh'; then
- elog "install app-shells/rust-zshcomp to get zsh completion for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust unset --if-invalid
-}
diff --git a/dev-lang/rust/rust-1.33.0.ebuild b/dev-lang/rust/rust-1.33.0.ebuild
deleted file mode 100644
index 68b5d2b1221..00000000000
--- a/dev-lang/rust/rust-1.33.0.ebuild
+++ /dev/null
@@ -1,322 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
-
-inherit check-reqs eapi7-ver estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
- $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
-
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling one than more slot
-# simultaneously.
-
-# How to use it:
-# 1. List all the working slots (with min versions) in ||, newest first.
-# 2. Update the := to specify *max* version, e.g. < 8.
-# 3. Specify LLVM_MAX_SLOT, e.g. 7.
-LLVM_DEPEND="
- || (
- sys-devel/llvm:7
- )
- <sys-devel/llvm-8:=
-"
-LLVM_MAX_SLOT=7
-
-COMMON_DEPEND="
- sys-libs/zlib
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- net-libs/libssh2
- net-libs/http-parser:=
- net-misc/curl[ssl]
- system-llvm? (
- ${LLVM_DEPEND}
- )
-"
-
-DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- dev-util/cmake"
-RDEPEND="${COMMON_DEPEND}
- >=app-eselect/eselect-rust-20190311
- !dev-util/cargo
- rustfmt? ( !dev-util/rustfmt )"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- x86? ( cpu_flags_x86_sse2 )"
-
-S="${WORKDIR}/${MY_P}-src"
-
-PATCHES=(
- "${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch
- "${FILESDIR}"/1.33.0-clippy-sysroot.patch
-)
-
-toml_usex() {
- usex "$1" true false
-}
-
-pre_build_checks() {
- CHECKREQS_DISK_BUILD="7G"
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- CHECKREQS_DISK_BUILD="10G"
- fi
- eshopts_pop
- check-reqs_pkg_setup
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
- use system-llvm && llvm_pkg_setup
-}
-
-src_prepare() {
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
-
- # ugly hack for https://bugs.gentoo.org/679806
- if use ppc64; then
- sed -i 's/getentropy/gEtEnTrOpY/g' "${rust_stage0_root}"/bin/cargo || die
- export OPENSSL_ppccap=0
- fi
-
- default
-}
-
-src_configure() {
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- fi
- rust_targets="${rust_targets#,}"
-
- local extended="true" tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- rust_target="$(rust_abi)"
-
- cat <<- EOF > "${S}"/config.toml
- [llvm]
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = "$(usex wasm WebAssembly '')"
- link-shared = $(toml_usex system-llvm)
- [build]
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- docs = $(toml_usex doc)
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = ${extended}
- tools = [${tools}]
- [install]
- prefix = "${EPREFIX}/usr"
- libdir = "$(get_libdir)/${P}"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
- [rust]
- optimize = $(toml_usex !debug)
- debuginfo = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- default-linker = "$(tc-getCC)"
- channel = "stable"
- rpath = false
- lld = $(toml_usex wasm)
- EOF
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- EOF >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- EOF
-
- cat <<- EOF >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- EOF
- if use system-llvm; then
- cat <<- EOF >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- EOF
- fi
- done
-
- if use wasm; then
- cat <<- EOF >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "rust-lld"
- EOF
- fi
-}
-
-src_compile() {
- env $(cat "${S}"/config.env)\
- "${EPYTHON}" ./x.py build -v --config="${S}"/config.toml -j$(makeopts_jobs) \
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
-}
-
-src_install() {
- local rust_target abi_libdir
-
- env DESTDIR="${D}" "${EPYTHON}" ./x.py install -v || die
-
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
- if use clippy; then
- mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
- mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
- fi
- if use rls; then
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
- fi
- if use rustfmt; then
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
- fi
-
- # Copy shared library versions of standard libraries for all targets
- # into the system's abi-dependent lib directories because the rust
- # installer only does so for the native ABI.
- for v in $(multilib_get_enabled_abi_pairs); do
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then
- continue
- fi
- abi_libdir=$(get_abi_LIBDIR ${v##*.})
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- mkdir -p "${D}/usr/${abi_libdir}"
- cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
- "${D}/usr/${abi_libdir}" || die
- done
-
- dodoc COPYRIGHT
-
- # FIXME:
- # Really not sure if that env is needed, specailly LDPATH
- cat <<-EOF > "${T}"/50${P}
- LDPATH="/usr/$(get_libdir)/${P}"
- MANPATH="/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
-
- cat <<-EOF > "${T}/provider-${P}"
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-lldb
- EOF
- echo /usr/bin/cargo >> "${T}/provider-${P}"
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- dodir /etc/env.d/rust
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-}
-
-pkg_postinst() {
- eselect rust update --if-unset
-
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
-
- ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
- ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
- ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
-
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-
- if has_version 'app-shells/zsh'; then
- elog "install app-shells/rust-zshcomp to get zsh completion for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust unset --if-invalid
-}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2019-05-26 6:27 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2019-05-26 6:27 UTC (permalink / raw
To: gentoo-commits
commit: c39dfea3a0cea8f515ddede3d171879ad0df9cf9
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun May 26 06:25:06 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun May 26 06:25:32 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c39dfea3
dev-lang/rust: fix building 1.35.0 with internal llvm
Closes: https://bugs.gentoo.org/686656
X-Upstream-Issue: https://github.com/rust-lang/rust/issues/61206
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
...commits-triggering-multiple-llvm-rebuilds.patch | 117 +++++++++++++++++++++
dev-lang/rust/rust-1.35.0.ebuild | 1 +
2 files changed, 118 insertions(+)
diff --git a/dev-lang/rust/files/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch b/dev-lang/rust/files/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch
new file mode 100644
index 00000000000..1c6c8ca404d
--- /dev/null
+++ b/dev-lang/rust/files/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch
@@ -0,0 +1,117 @@
+From d6bd0a479ceaf6abdd696c3b955a56f66275c562 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Sat, 25 May 2019 22:21:16 -0700
+Subject: [PATCH] revert commits triggering multiple llvm rebuilds
+
+this reverts the following commits
+https://github.com/rust-lang/rust/commit/105692c3ad281c63bf0f75a26a66bb9cff5b4553
+https://github.com/rust-lang/rust/commit/975ba58f42b34ff07cd7c2bd73350daed2057186
+https://github.com/rust-lang/rust/commit/e1daa36ba7df88788c2684bbe5ff6eb37f1cda69
+---
+ src/bootstrap/llvm-rebuild-trigger | 4 +++
+ src/bootstrap/native.rs | 46 +++++++++++++-----------------
+ 2 files changed, 24 insertions(+), 26 deletions(-)
+ create mode 100644 src/bootstrap/llvm-rebuild-trigger
+
+diff --git a/src/bootstrap/llvm-rebuild-trigger b/src/bootstrap/llvm-rebuild-trigger
+new file mode 100644
+index 0000000000..0f18c6a4ac
+--- /dev/null
++++ b/src/rustllvm/llvm-rebuild-trigger
+@@ -0,0 +1,4 @@
++# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
++# The actual contents of this file do not matter, but to trigger a change on the
++# build bots then the contents should be changed so git updates the mtime.
++2019-03-18
+diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
+index fde40b0d1b..3babbc9e10 100644
+--- a/src/bootstrap/native.rs
++++ b/src/bootstrap/native.rs
+@@ -67,40 +67,30 @@ impl Step for Llvm {
+ }
+ }
+
+- let (llvm_info, root, out_dir, llvm_config_ret_dir) = if emscripten {
+- let info = &builder.emscripten_llvm_info;
++ let rebuild_trigger = builder.src.join("src/rustllvm/llvm-rebuild-trigger");
++ let rebuild_trigger_contents = t!(fs::read_to_string(&rebuild_trigger));
++
++ let (out_dir, llvm_config_ret_dir) = if emscripten {
+ let dir = builder.emscripten_llvm_out(target);
+ let config_dir = dir.join("bin");
+- (info, "src/llvm-emscripten", dir, config_dir)
++ (dir, config_dir)
+ } else {
+- let info = &builder.in_tree_llvm_info;
+ let mut dir = builder.llvm_out(builder.config.build);
+ if !builder.config.build.contains("msvc") || builder.config.ninja {
+ dir.push("build");
+ }
+- (info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
++ (builder.llvm_out(target), dir.join("bin"))
+ };
+-
+- if !llvm_info.is_git() {
+- println!(
+- "git could not determine the LLVM submodule commit hash. \
+- Assuming that an LLVM build is necessary.",
+- );
+- }
+-
++ let done_stamp = out_dir.join("llvm-finished-building");
+ let build_llvm_config = llvm_config_ret_dir
+ .join(exe("llvm-config", &*builder.config.build));
+- let done_stamp = out_dir.join("llvm-finished-building");
+-
+- if let Some(llvm_commit) = llvm_info.sha() {
+- if done_stamp.exists() {
+- let done_contents = t!(fs::read(&done_stamp));
++ if done_stamp.exists() {
++ let done_contents = t!(fs::read_to_string(&done_stamp));
+
+- // If LLVM was already built previously and the submodule's commit didn't change
+- // from the previous build, then no action is required.
+- if done_contents == llvm_commit.as_bytes() {
+- return build_llvm_config
+- }
++ // If LLVM was already built previously and contents of the rebuild-trigger file
++ // didn't change from the previous build, then no action is required.
++ if done_contents == rebuild_trigger_contents {
++ return build_llvm_config
+ }
+ }
+
+@@ -111,6 +101,7 @@ impl Step for Llvm {
+ t!(fs::create_dir_all(&out_dir));
+
+ // http://llvm.org/docs/CMake.html
++ let root = if self.emscripten { "src/llvm-emscripten" } else { "src/llvm-project/llvm" };
+ let mut cfg = cmake::Config::new(builder.src.join(root));
+
+ let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) {
+@@ -251,6 +242,11 @@ impl Step for Llvm {
+ channel::CFG_RELEASE_NUM,
+ builder.config.channel,
+ );
++ let llvm_info = if self.emscripten {
++ &builder.emscripten_llvm_info
++ } else {
++ &builder.in_tree_llvm_info
++ };
+ if let Some(sha) = llvm_info.sha_short() {
+ default_suffix.push_str("-");
+ default_suffix.push_str(sha);
+@@ -283,9 +279,7 @@ impl Step for Llvm {
+
+ cfg.build();
+
+- if let Some(llvm_commit) = llvm_info.sha() {
+- t!(fs::write(&done_stamp, llvm_commit));
+- }
++ t!(fs::write(&done_stamp, &rebuild_trigger_contents));
+
+ build_llvm_config
+ }
+--
+2.21.0
+
diff --git a/dev-lang/rust/rust-1.35.0.ebuild b/dev-lang/rust/rust-1.35.0.ebuild
index 801838bb704..b5725b81510 100644
--- a/dev-lang/rust/rust-1.35.0.ebuild
+++ b/dev-lang/rust/rust-1.35.0.ebuild
@@ -89,6 +89,7 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
PATCHES=(
"${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
+ "${FILESDIR}"/1.35.0-revert-commits-triggering-multiple-llvm-rebuilds.patch
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2019-04-24 16:31 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2019-04-24 16:31 UTC (permalink / raw
To: gentoo-commits
commit: b327798c4d14398f0a1f55140cf95241fb5aeda0
Author: Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Wed Apr 24 06:55:03 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 16:30:58 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b327798c
dev-lang/rust: add patch to support LibreSSL 2.9.x
Closes: https://bugs.gentoo.org/684224
Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11810
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.34.0-libressl.patch | 29 +++++++++++++++++++++++++++++
dev-lang/rust/rust-1.34.0-r2.ebuild | 1 +
2 files changed, 30 insertions(+)
diff --git a/dev-lang/rust/files/1.34.0-libressl.patch b/dev-lang/rust/files/1.34.0-libressl.patch
new file mode 100644
index 00000000000..d5705f88af5
--- /dev/null
+++ b/dev-lang/rust/files/1.34.0-libressl.patch
@@ -0,0 +1,29 @@
+diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
+index b5c539431..9428e81b1 100644
+--- a/vendor/openssl-sys/.cargo-checksum.json
++++ b/vendor/openssl-sys/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"c8bc352b94d05afeaeb96300341a695c70c3b62c46793a5c035aaf42e22b69d1","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"b09af0445220130b1b1c45791a316435f7400cf2fab3abe9c419f4f8028cfb9c","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"45da6667bd8b1a35354ee1636df0b55f9d13d4ae45dd1fef5cf17c615c372bfd","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520
b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"13a8a71154545d7c478e156edb21beb219824937aba6b29c6bc6ef895c735a3d","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9
c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58f
a19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"}
+diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
+index 69def400e..08cc96eb9 100644
+--- a/vendor/openssl-sys/build/main.rs
++++ b/vendor/openssl-sys/build/main.rs
+@@ -505,6 +505,7 @@ See rust-openssl README for more information:
+ (8, 1) => ('8', '1'),
+ (8, _) => ('8', 'x'),
+ (9, 0) => ('9', '0'),
++ (9, _) => ('9', 'x'),
+ _ => version_error(),
+ };
+
+@@ -545,7 +546,7 @@ fn version_error() -> ! {
+ "
+
+ This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
+-through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
++through 2.9.x, but a different version of OpenSSL was found. The build is now aborting
+ due to this version mismatch.
+
+ "
diff --git a/dev-lang/rust/rust-1.34.0-r2.ebuild b/dev-lang/rust/rust-1.34.0-r2.ebuild
index ed2af7339e3..3409dc5c4f4 100644
--- a/dev-lang/rust/rust-1.34.0-r2.ebuild
+++ b/dev-lang/rust/rust-1.34.0-r2.ebuild
@@ -85,6 +85,7 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
PATCHES=(
"${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
"${FILESDIR}"/1.34.0-doc-build-fix.patch
+ "${FILESDIR}"/1.34.0-libressl.patch # bug 684224
)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2019-04-14 8:03 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2019-04-14 8:03 UTC (permalink / raw
To: gentoo-commits
commit: 5ff8fc319f6208520bc633dcfcb09e8ff6b08667
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 14 08:02:11 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Apr 14 08:03:44 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ff8fc31
dev-lang/rust: fix 1.34.0 build failure with USE=doc
also speed up bootstrap a bit with upstream commit
Upstream patch url: https://github.com/rust-lang/rust/pull/58897
Bug: https://bugs.gentoo.org/683246
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/files/1.34.0-doc-build-fix.patch | 442 +++++++++++++++++++++++++
dev-lang/rust/rust-1.34.0-r1.ebuild | 5 +-
2 files changed, 446 insertions(+), 1 deletion(-)
diff --git a/dev-lang/rust/files/1.34.0-doc-build-fix.patch b/dev-lang/rust/files/1.34.0-doc-build-fix.patch
new file mode 100644
index 00000000000..52b8d6ea7f7
--- /dev/null
+++ b/dev-lang/rust/files/1.34.0-doc-build-fix.patch
@@ -0,0 +1,442 @@
+From 9efc93c96dd6746460cef916d307b72ba21a7fd0 Mon Sep 17 00:00:00 2001
+From: Mark Rousskov <mark.simulacrum@gmail.com>
+Date: Sun, 3 Mar 2019 09:29:59 -0700
+Subject: [PATCH 1/2] Tools built by the bootstrap compiler must be built by it
+
+This avoids building compilers that we don't need -- most tools will work
+just fine with the downloaded compiler.
+---
+ src/bootstrap/doc.rs | 6 ++-
+ src/bootstrap/test.rs | 10 ++--
+ src/bootstrap/tool.rs | 104 +++++++++++++++++++++++++++---------------
+ 3 files changed, 78 insertions(+), 42 deletions(-)
+
+diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
+index e0ad0422a6ce..621e3a95473e 100644
+--- a/src/bootstrap/doc.rs
++++ b/src/bootstrap/doc.rs
+@@ -883,7 +883,11 @@ impl Step for ErrorIndex {
+ builder.info(&format!("Documenting error index ({})", target));
+ let out = builder.doc_out(target);
+ t!(fs::create_dir_all(&out));
+- let mut index = builder.tool_cmd(Tool::ErrorIndex);
++ let compiler = builder.compiler(2, builder.config.build);
++ let mut index = tool::ErrorIndex::command(
++ builder,
++ compiler,
++ );
+ index.arg("html");
+ index.arg(out.join("error-index.html"));
+
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+index 51412f79c3d0..5abf9d699784 100644
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -414,7 +414,6 @@ impl Step for Miri {
+
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub struct CompiletestTest {
+- stage: u32,
+ host: Interned<String>,
+ }
+
+@@ -427,16 +426,14 @@ impl Step for CompiletestTest {
+
+ fn make_run(run: RunConfig<'_>) {
+ run.builder.ensure(CompiletestTest {
+- stage: run.builder.top_stage,
+ host: run.target,
+ });
+ }
+
+ /// Runs `cargo test` for compiletest.
+ fn run(self, builder: &Builder<'_>) {
+- let stage = self.stage;
+ let host = self.host;
+- let compiler = builder.compiler(stage, host);
++ let compiler = builder.compiler(0, host);
+
+ let mut cargo = tool::prepare_tool_cargo(builder,
+ compiler,
+@@ -1426,7 +1423,10 @@ impl Step for ErrorIndex {
+ t!(fs::create_dir_all(&dir));
+ let output = dir.join("error-index.md");
+
+- let mut tool = builder.tool_cmd(Tool::ErrorIndex);
++ let mut tool = tool::ErrorIndex::command(
++ builder,
++ builder.compiler(compiler.stage, builder.config.build),
++ );
+ tool.arg("markdown")
+ .arg(&output)
+ .env("CFG_BUILD", &builder.config.build)
+diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
+index fc1a17d54667..4f2aa0b795dc 100644
+--- a/src/bootstrap/tool.rs
++++ b/src/bootstrap/tool.rs
+@@ -250,9 +250,9 @@ pub fn prepare_tool_cargo(
+ cargo
+ }
+
+-macro_rules! tool {
++macro_rules! bootstrap_tool {
+ ($(
+- $name:ident, $path:expr, $tool_name:expr, $mode:expr
++ $name:ident, $path:expr, $tool_name:expr
+ $(,llvm_tools = $llvm:expr)*
+ $(,is_external_tool = $external:expr)*
+ ;
+@@ -266,10 +266,7 @@ macro_rules! tool {
+
+ impl Tool {
+ pub fn get_mode(&self) -> Mode {
+- let mode = match self {
+- $(Tool::$name => $mode,)+
+- };
+- mode
++ Mode::ToolBootstrap
+ }
+
+ /// Whether this tool requires LLVM to run
+@@ -282,27 +279,15 @@ macro_rules! tool {
+
+ impl<'a> Builder<'a> {
+ pub fn tool_exe(&self, tool: Tool) -> PathBuf {
+- let stage = self.tool_default_stage(tool);
+ match tool {
+ $(Tool::$name =>
+ self.ensure($name {
+- compiler: self.compiler(stage, self.config.build),
++ compiler: self.compiler(0, self.config.build),
+ target: self.config.build,
+ }),
+ )+
+ }
+ }
+-
+- pub fn tool_default_stage(&self, tool: Tool) -> u32 {
+- // Compile the error-index in the same stage as rustdoc to avoid
+- // recompiling rustdoc twice if we can. Otherwise compile
+- // everything else in stage0 as there's no need to rebootstrap
+- // everything.
+- match tool {
+- Tool::ErrorIndex if self.top_stage >= 2 => self.top_stage,
+- _ => 0,
+- }
+- }
+ }
+
+ $(
+@@ -321,7 +306,8 @@ macro_rules! tool {
+
+ fn make_run(run: RunConfig<'_>) {
+ run.builder.ensure($name {
+- compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
++ // snapshot compiler
++ compiler: run.builder.compiler(0, run.builder.config.build),
+ target: run.target,
+ });
+ }
+@@ -331,7 +317,7 @@ macro_rules! tool {
+ compiler: self.compiler,
+ target: self.target,
+ tool: $tool_name,
+- mode: $mode,
++ mode: Mode::ToolBootstrap,
+ path: $path,
+ is_optional_tool: false,
+ source_type: if false $(|| $external)* {
+@@ -347,21 +333,67 @@ macro_rules! tool {
+ }
+ }
+
+-tool!(
+- Rustbook, "src/tools/rustbook", "rustbook", Mode::ToolBootstrap;
+- ErrorIndex, "src/tools/error_index_generator", "error_index_generator", Mode::ToolRustc;
+- UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen", Mode::ToolBootstrap;
+- Tidy, "src/tools/tidy", "tidy", Mode::ToolBootstrap;
+- Linkchecker, "src/tools/linkchecker", "linkchecker", Mode::ToolBootstrap;
+- CargoTest, "src/tools/cargotest", "cargotest", Mode::ToolBootstrap;
+- Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolBootstrap, llvm_tools = true;
+- BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::ToolBootstrap;
+- RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::ToolBootstrap;
+- RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolBootstrap,
+- is_external_tool = true;
+- RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::ToolBootstrap;
++bootstrap_tool!(
++ Rustbook, "src/tools/rustbook", "rustbook";
++ UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen";
++ Tidy, "src/tools/tidy", "tidy";
++ Linkchecker, "src/tools/linkchecker", "linkchecker";
++ CargoTest, "src/tools/cargotest", "cargotest";
++ Compiletest, "src/tools/compiletest", "compiletest", llvm_tools = true;
++ BuildManifest, "src/tools/build-manifest", "build-manifest";
++ RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
++ RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
++ RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes";
+ );
+
++#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
++pub struct ErrorIndex {
++ pub compiler: Compiler,
++}
++
++impl ErrorIndex {
++ pub fn command(builder: &Builder<'_>, compiler: Compiler) -> Command {
++ let mut cmd = Command::new(builder.ensure(ErrorIndex {
++ compiler
++ }));
++ add_lib_path(
++ vec![PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))],
++ &mut cmd,
++ );
++ cmd
++ }
++}
++
++impl Step for ErrorIndex {
++ type Output = PathBuf;
++
++ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
++ run.path("src/tools/error_index_generator")
++ }
++
++ fn make_run(run: RunConfig<'_>) {
++ // Compile the error-index in the same stage as rustdoc to avoid
++ // recompiling rustdoc twice if we can.
++ let stage = if run.builder.top_stage >= 2 { run.builder.top_stage } else { 0 };
++ run.builder.ensure(ErrorIndex {
++ compiler: run.builder.compiler(stage, run.builder.config.build),
++ });
++ }
++
++ fn run(self, builder: &Builder<'_>) -> PathBuf {
++ builder.ensure(ToolBuild {
++ compiler: self.compiler,
++ target: self.compiler.host,
++ tool: "error_index_generator",
++ mode: Mode::ToolRustc,
++ path: "src/tools/error_index_generator",
++ is_optional_tool: false,
++ source_type: SourceType::InTree,
++ extra_features: Vec::new(),
++ }).expect("expected to build -- essential tool")
++ }
++}
++
+ #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+ pub struct RemoteTestServer {
+ pub compiler: Compiler,
+@@ -625,7 +657,7 @@ impl<'a> Builder<'a> {
+ /// `host`.
+ pub fn tool_cmd(&self, tool: Tool) -> Command {
+ let mut cmd = Command::new(self.tool_exe(tool));
+- let compiler = self.compiler(self.tool_default_stage(tool), self.config.build);
++ let compiler = self.compiler(0, self.config.build);
+ self.prepare_tool_cmd(compiler, tool, &mut cmd);
+ cmd
+ }
+@@ -637,7 +669,7 @@ impl<'a> Builder<'a> {
+ fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
+ let host = &compiler.host;
+ let mut lib_paths: Vec<PathBuf> = vec![
+- if compiler.stage == 0 && tool != Tool::ErrorIndex {
++ if compiler.stage == 0 {
+ self.build.rustc_snapshot_libdir()
+ } else {
+ PathBuf::from(&self.sysroot_libdir(compiler, compiler.host))
+
+From 03718ed67a7b8fd57fc27316ec57ac3bc0f13d06 Mon Sep 17 00:00:00 2001
+From: Mark Rousskov <mark.simulacrum@gmail.com>
+Date: Sun, 3 Mar 2019 09:50:56 -0700
+Subject: [PATCH 2/2] Permit getting stage 0 rustdoc
+
+This allows us to e.g. test compiletest, including doctests, in stage 0
+without building a fresh compiler and rustdoc.
+---
+ src/bootstrap/builder.rs | 15 +++++++--------
+ src/bootstrap/dist.rs | 2 +-
+ src/bootstrap/doc.rs | 8 ++++----
+ src/bootstrap/test.rs | 8 ++++----
+ src/bootstrap/tool.rs | 8 +++++---
+ 5 files changed, 21 insertions(+), 20 deletions(-)
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index 7e6c0a9f52aa..f8b7f25a7543 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -668,20 +668,19 @@ impl<'a> Builder<'a> {
+ .map(|entry| entry.path())
+ }
+
+- pub fn rustdoc(&self, host: Interned<String>) -> PathBuf {
+- self.ensure(tool::Rustdoc { host })
++ pub fn rustdoc(&self, compiler: Compiler) -> PathBuf {
++ self.ensure(tool::Rustdoc { compiler })
+ }
+
+- pub fn rustdoc_cmd(&self, host: Interned<String>) -> Command {
++ pub fn rustdoc_cmd(&self, compiler: Compiler) -> Command {
+ let mut cmd = Command::new(&self.out.join("bootstrap/debug/rustdoc"));
+- let compiler = self.compiler(self.top_stage, host);
+ cmd.env("RUSTC_STAGE", compiler.stage.to_string())
+ .env("RUSTC_SYSROOT", self.sysroot(compiler))
+ // Note that this is *not* the sysroot_libdir because rustdoc must be linked
+ // equivalently to rustc.
+ .env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
+ .env("CFG_RELEASE_CHANNEL", &self.config.channel)
+- .env("RUSTDOC_REAL", self.rustdoc(host))
++ .env("RUSTDOC_REAL", self.rustdoc(compiler))
+ .env("RUSTDOC_CRATE_VERSION", self.rust_version())
+ .env("RUSTC_BOOTSTRAP", "1");
+
+@@ -689,7 +688,7 @@ impl<'a> Builder<'a> {
+ cmd.env_remove("MAKEFLAGS");
+ cmd.env_remove("MFLAGS");
+
+- if let Some(linker) = self.linker(host) {
++ if let Some(linker) = self.linker(compiler.host) {
+ cmd.env("RUSTC_TARGET_LINKER", linker);
+ }
+ cmd
+@@ -751,7 +750,7 @@ impl<'a> Builder<'a> {
+ // This is the intended out directory for compiler documentation.
+ my_out = self.compiler_doc_out(target);
+ }
+- let rustdoc = self.rustdoc(compiler.host);
++ let rustdoc = self.rustdoc(compiler);
+ self.clear_if_dirty(&my_out, &rustdoc);
+ } else if cmd != "test" {
+ match mode {
+@@ -897,7 +896,7 @@ impl<'a> Builder<'a> {
+ .env(
+ "RUSTDOC_REAL",
+ if cmd == "doc" || cmd == "rustdoc" || (cmd == "test" && want_rustdoc) {
+- self.rustdoc(compiler.host)
++ self.rustdoc(compiler)
+ } else {
+ PathBuf::from("/path/to/nowhere/rustdoc/not/required")
+ },
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index 2dae3f9135d8..3045cda125ee 100644
+--- a/src/bootstrap/dist.rs
++++ b/src/bootstrap/dist.rs
+@@ -479,7 +479,7 @@ impl Step for Rustc {
+ t!(fs::create_dir_all(image.join("bin")));
+ builder.cp_r(&src.join("bin"), &image.join("bin"));
+
+- builder.install(&builder.rustdoc(compiler.host), &image.join("bin"), 0o755);
++ builder.install(&builder.rustdoc(compiler), &image.join("bin"), 0o755);
+
+ // Copy runtime DLLs needed by the compiler
+ if libdir != "bin" {
+diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
+index 621e3a95473e..ae329286486d 100644
+--- a/src/bootstrap/doc.rs
++++ b/src/bootstrap/doc.rs
+@@ -335,7 +335,7 @@ fn invoke_rustdoc(
+ let footer = builder.src.join("src/doc/footer.inc");
+ let version_info = out.join("version_info.html");
+
+- let mut cmd = builder.rustdoc_cmd(compiler.host);
++ let mut cmd = builder.rustdoc_cmd(compiler);
+
+ let out = out.join("book");
+
+@@ -415,7 +415,7 @@ impl Step for Standalone {
+ }
+
+ let html = out.join(filename).with_extension("html");
+- let rustdoc = builder.rustdoc(compiler.host);
++ let rustdoc = builder.rustdoc(compiler);
+ if up_to_date(&path, &html) &&
+ up_to_date(&footer, &html) &&
+ up_to_date(&favicon, &html) &&
+@@ -425,7 +425,7 @@ impl Step for Standalone {
+ continue
+ }
+
+- let mut cmd = builder.rustdoc_cmd(compiler.host);
++ let mut cmd = builder.rustdoc_cmd(compiler);
+ cmd.arg("--html-after-content").arg(&footer)
+ .arg("--html-before-content").arg(&version_info)
+ .arg("--html-in-header").arg(&favicon)
+@@ -824,7 +824,7 @@ impl Step for Rustdoc {
+ builder.ensure(Rustc { stage, target });
+
+ // Build rustdoc.
+- builder.ensure(tool::Rustdoc { host: compiler.host });
++ builder.ensure(tool::Rustdoc { compiler: compiler });
+
+ // Symlink compiler docs to the output directory of rustdoc documentation.
+ let out_dir = builder.stage_out(compiler, Mode::ToolRustc)
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+index 5abf9d699784..6b9960c355c5 100644
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -177,7 +177,7 @@ impl Step for Cargotest {
+ cmd.arg(&builder.initial_cargo)
+ .arg(&out_dir)
+ .env("RUSTC", builder.rustc(compiler))
+- .env("RUSTDOC", builder.rustdoc(compiler.host)),
++ .env("RUSTDOC", builder.rustdoc(compiler)),
+ );
+ }
+ }
+@@ -560,7 +560,7 @@ impl Step for RustdocTheme {
+ builder.sysroot_libdir(self.compiler, self.compiler.host),
+ )
+ .env("CFG_RELEASE_CHANNEL", &builder.config.channel)
+- .env("RUSTDOC_REAL", builder.rustdoc(self.compiler.host))
++ .env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
+ .env("RUSTDOC_CRATE_VERSION", builder.rust_version())
+ .env("RUSTC_BOOTSTRAP", "1");
+ if let Some(linker) = builder.linker(self.compiler.host) {
+@@ -995,7 +995,7 @@ impl Step for Compiletest {
+ || (mode == "ui" && is_rustdoc_ui)
+ {
+ cmd.arg("--rustdoc-path")
+- .arg(builder.rustdoc(compiler.host));
++ .arg(builder.rustdoc(compiler));
+ }
+
+ cmd.arg("--src-base")
+@@ -1451,7 +1451,7 @@ fn markdown_test(builder: &Builder<'_>, compiler: Compiler, markdown: &Path) ->
+ }
+
+ builder.info(&format!("doc tests for: {}", markdown.display()));
+- let mut cmd = builder.rustdoc_cmd(compiler.host);
++ let mut cmd = builder.rustdoc_cmd(compiler);
+ builder.add_rust_test_threads(&mut cmd);
+ cmd.arg("--test");
+ cmd.arg(markdown);
+diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
+index 4f2aa0b795dc..5fb83caac06c 100644
+--- a/src/bootstrap/tool.rs
++++ b/src/bootstrap/tool.rs
+@@ -430,7 +430,9 @@ impl Step for RemoteTestServer {
+
+ #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+ pub struct Rustdoc {
+- pub host: Interned<String>,
++ /// This should only ever be 0 or 2.
++ /// We sometimes want to reference the "bootstrap" rustdoc, which is why this option is here.
++ pub compiler: Compiler,
+ }
+
+ impl Step for Rustdoc {
+@@ -444,12 +446,12 @@ impl Step for Rustdoc {
+
+ fn make_run(run: RunConfig<'_>) {
+ run.builder.ensure(Rustdoc {
+- host: run.host,
++ compiler: run.builder.compiler(run.builder.top_stage, run.host),
+ });
+ }
+
+ fn run(self, builder: &Builder<'_>) -> PathBuf {
+- let target_compiler = builder.compiler(builder.top_stage, self.host);
++ let target_compiler = self.compiler;
+ if target_compiler.stage == 0 {
+ if !target_compiler.is_snapshot(builder) {
+ panic!("rustdoc in stage 0 must be snapshot rustdoc");
diff --git a/dev-lang/rust/rust-1.34.0-r1.ebuild b/dev-lang/rust/rust-1.34.0-r1.ebuild
index 7a082deb150..4c34807181a 100644
--- a/dev-lang/rust/rust-1.34.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.34.0-r1.ebuild
@@ -82,7 +82,10 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
x86? ( cpu_flags_x86_sse2 )
"
-PATCHES=( "${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch )
+PATCHES=(
+ "${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
+ "${FILESDIR}"/1.34.0-doc-build-fix.patch
+)
S="${WORKDIR}/${MY_P}-src"
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2019-03-07 4:40 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2019-03-07 4:40 UTC (permalink / raw
To: gentoo-commits
commit: 07d8596964275c4b0d5659c9ac33d50155058429
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 7 01:49:09 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Mar 7 04:40:33 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07d85969
dev-lang/rust: bump to 1.33.0
run build/install in verbose mode
Bug: https://bugs.gentoo.org/679098
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/Manifest | 14 ++
dev-lang/rust/files/1.33.0-clippy-sysroot.patch | 62 +++++
dev-lang/rust/rust-1.33.0.ebuild | 301 ++++++++++++++++++++++++
3 files changed, 377 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 06d59be0f30..dfb3caadbeb 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -50,8 +50,22 @@ DIST rust-1.31.1-powerpc64-unknown-linux-gnu.tar.xz 122297864 BLAKE2B 3cc4e867e3
DIST rust-1.31.1-powerpc64le-unknown-linux-gnu.tar.xz 125272712 BLAKE2B 5a1cb8226ac6209c451841b2ae40ecf452d14fefb7ce8f5f0e681a2f08954d643628b28ceae03e7a164f5fd5415a408843bb2ddcd86b9e3486b7ddbbd3b6bb99 SHA512 e64f586b632b85d07e18c61e5ce18a69404d89e302ecd8b4495e09e2b2f62bd3f32455b3d0d81cfa2d0031c003f23797421587cf6f314ce5b18b12157e1e9a3b
DIST rust-1.31.1-s390x-unknown-linux-gnu.tar.xz 127867704 BLAKE2B be4b097506561db4f84db4e8b6224dbcd104f15bb95f7ec56b5c0410b85cc8de8f8b559760d7c01d274b7d031354349eed7b49a816fe404ea319d238af64b932 SHA512 ce6999f7d27468143a9a288fd1bda9f3ec42475f8b8473518be41358a2144317abf8076ed9527a10db94b5b89cf920f04217ce7a78ec214aa3e073a8419675bc
DIST rust-1.31.1-x86_64-unknown-linux-gnu.tar.xz 148394364 BLAKE2B 92b1860f1d0e2da0fc1755a8ed3f6d351da84103220a8fb560e862375b8ad03485299b42ed4448e6f661bb61650480815f20267ffa3d999c2910bc27b80900ae SHA512 3bf37bc419acd7820c7e33d7b44e6cba7f3b556ca8880fee2f65b1648596f069e0bc590a3a7acc10c60a0328f83787a172650d9c26cf21aa14782dcd9a97ec3a
+DIST rust-1.32.0-aarch64-unknown-linux-gnu.tar.xz 116136352 BLAKE2B 5d5686f285be767a902553d725b59ebe9cf5f8001ea31bc19bee60e65c05d24246dd3f044f07113e37112dd8388e1ee58738aee7af7afbee94c9383c0592aee3 SHA512 b077c54bf38935a55a36fec39d1822562da760489ca924d48978e87b9ac5dc4b5107a7eb08dea0412a5a44c255428c649e31f07a5a67567c715de8644581018d
+DIST rust-1.32.0-arm-unknown-linux-gnueabi.tar.xz 117487960 BLAKE2B 29a92158b6c6fbb0c577e4093c4bfedda1467f0367976676f64e4366d937bd6ebdb7ecfa7ae3a55c4dca0b9f577aea7e1c9905f97f1e167d6b2af5f8b2196b3e SHA512 45d39548e74a22ac862197084e1ca7c4815fefbb49527356d4c7985ef320d2f8d1b0051a4db79503c967ad44df15d0f9ef673b44035f1d90d0383abfca8ef9d4
+DIST rust-1.32.0-arm-unknown-linux-gnueabihf.tar.xz 117758664 BLAKE2B 0ed842e03b8d29c1e5d0856f2498786298f02d4a82ce972e51e51711a5cfff8906ea5e607134edbe2997dc10db655d6cf5dc8ca27d8071c44e0fcbb2f97f6519 SHA512 7f6f1810aa29123d4fc13f4c15220db1cb3911c45c107d7cc5d63e2e04fab3a4b4202f94f2aa3d7f67f4301b77f9e231e6b73983c11b9dce3023918438e9e646
+DIST rust-1.32.0-armv7-unknown-linux-gnueabihf.tar.xz 119183916 BLAKE2B 47e766398ee35ae578a96390757b7e53500b94b1bcab5e17fc4718185e24936797c3b161f06a06aa8eb876726d3916aa3b6a51356fde2a719ff84c6b5996e6f0 SHA512 abadddae0a8de3ee326d1145e3bbe571d9ec0d80261569b6350dbc0fa38b9d31590933c318785f92b75c7add35d7b45e7713a3f1ef7dfd3de085b7255a855b2a
+DIST rust-1.32.0-i686-unknown-linux-gnu.tar.xz 146763596 BLAKE2B 47a8ade700db65eed2e0051a2094d730c22f650599d542951b63de58b6af7d2477d8be4b7a62836d85a4829b5f18bf41e33f50bdd169432583da87545c4c262a SHA512 bec62be3e9f5e37197c10357a386a7083941f44151eab28e7a1c8892c0e8e65d168e1220d5e807bb55b9c86ef046bad5cb23fad89def9cb51d22ff69fb436172
+DIST rust-1.32.0-mips-unknown-linux-gnu.tar.xz 110583680 BLAKE2B b8e95a09b752455b17eca4b7dcb98df60526cb9882b42436b92ba5f0b2478148faceebd88367b42dd98d3c62f7757e850361d1cf507e1008e5dbf5c25752d253 SHA512 6b0fd688535b8679a06384c321b87dc2c6990c799f5b6c14cf89806f46b517633a8a4c79133f4d7f528770fb2a7ba4623308a8c590d8525bd1cbdbdc3defbfad
+DIST rust-1.32.0-mips64-unknown-linux-gnuabi64.tar.xz 118818484 BLAKE2B 8b4adb0a87ca07f9f1e51f84f65a28e2eb98340efe06a70cca312e85b80a2dcf4a1098c981a880f35fdc27a854f41ba8f0de413668756cd6c47a7cad82ff473d SHA512 e8737ff2cb6421af437335c75a48df0d094e6749bb32ae0dc8d614548a2efd682dedb448790f72987332750378259e45cde59c1555a20cb9b78991c422d42b34
+DIST rust-1.32.0-mipsel-unknown-linux-gnu.tar.xz 112802132 BLAKE2B 8d44aa6e19cb2ac5e0e43fb40ab0b879c611481fd3b23750d3dec1c8ab646b8b3f948eccba0f20b583d411de5cc43317d433c49ca3b341cab08225d3688be668 SHA512 c32fa5cbf779c629d423f498f885cb528f2d5b3165f80c6415fc98e7b7fc4802ad893b7aa2c2dad810fbaa968687053b52b32fabe775ba4a1bb72ceabdaf733f
+DIST rust-1.32.0-powerpc-unknown-linux-gnu.tar.xz 111816220 BLAKE2B 7398c98d37589c307953d11a21866bf23a34806cbcb2316926a321f5407481e292645ba3425d9b7deeaad20da65096189b477deff6769fca856547343dde8146 SHA512 4155d662b3f7cfce376896792767132a4e9e1ecf4d4c1232a0f4c0a3765b5e736ee8b4e6f368b874146d94c809d61bd26680c4d7a3dd8ad0bcea819c5756feb2
+DIST rust-1.32.0-powerpc64-unknown-linux-gnu.tar.xz 120518816 BLAKE2B 9666c809b89d0c564b019fc4b7f6102dcb98fc53e88dfd553fe0274b8758c1ceec5c9c6df9e5e3886fb3cb6ea82322ec8d6e38663189336fdccc50ee10e033e6 SHA512 e4c70ab500feccb2ed67435857f584381be051ba7b2d70cea55b0c94b846e61ba10930a20ceceb67ec981daa5baa166fc6dea7c14ac9ac28270c30841d9c16a1
+DIST rust-1.32.0-powerpc64le-unknown-linux-gnu.tar.xz 124278796 BLAKE2B cee79918a210c34918cf183c918099cd2c246d881576f80e960492c7d5ae1920a43f2d4424700543a7cf50cc5f18618b6d4abfac1e856c9e8711fb73429571b7 SHA512 058c1ebe58bb22e8ff791a74edb058e7494e2673dd1d91ffad646ec71cfdc240e934b44fbae6e58639143b33161d314224e7d1c7b2cc35677bf9eab901e130eb
+DIST rust-1.32.0-s390x-unknown-linux-gnu.tar.xz 128857448 BLAKE2B ab0ce58315d116a0aaed007d03df7be4ecfeee01fd6e368173e8aa023b2ae1d922824e92b103aaf205ed2adf1f9da78abd229fff313c24e32ea3fad68f8bdda3 SHA512 4f32934472356d9b7e15abb0fa07be9eddccc7b9e0a1834bbee5ff279c6ece9174d942e2feed611f9b697613ee3b76f8a8ab68559b6d075e740aeab117223325
+DIST rust-1.32.0-x86_64-unknown-linux-gnu.tar.xz 147868652 BLAKE2B 616e69d80dd0e7de2ac86f2090825c8a991ad1b88155d21d0eef89b7aea418ba8bb0140eeb497c417c77afc770f51498020ee86cfd059533500c0cb88f0130b6 SHA512 5c5def0c415b0f34e1e7476841a0bd3f91fe4bde8321c7b06b1cd2a3d10a3d676ed16a26561929ce39c3c2cbcf7a16960c5decca9e385afe8295da32b4fb7a17
DIST rustc-1.29.1-src.tar.xz 61937676 BLAKE2B 6a60249538e1ec62471f4d0e3fc31c0a648433aa6f85ca7341657ea07772e338eb92a629941685808f4b80e84cb025d78aee9d0d6fa71c6635a1647c61bca9bc SHA512 1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7
DIST rustc-1.29.2-src.tar.xz 61888912 BLAKE2B f59b0bf45caa6f6136f92ffbaa612bbc6a340c8694ec69d75aadace9180c36753f985641915524388b52cc108f8f5b71840ee3a6c0b1fcff6decb61d2d8a161e SHA512 d8fa9501764348ace8f60f2069bcd016925abe56c8bbc2b87fb52ff796e4bc7284c1fccbb1671416437bb82fde7d9240eeae875d6099914e27e75cfe050e2d38
DIST rustc-1.30.1-src.tar.xz 96086232 BLAKE2B 170767b64efe670086e7c4e73838b489a155a72c703148f83cad29d401a825a94a1def3aa462ba527e1bd08181c7a9be0e404c25f012906541c3d739eb57e9e5 SHA512 e466db81b9a82239670c48b876dc7390fcdda28c6390308691ddf2e0c12a39b57bd5ddb18322d1b4cd58165f69a666c7d83bee6573049da3b94e401657459bf5
DIST rustc-1.31.1-src.tar.xz 96915864 BLAKE2B bedfe1d56e2f99bb43b4b652d540aedf0a86c47b8493f28fb29e5af3135ff469ed40775bc2ee25ac5bd28a264ecba0094d7c9b6aae25ea365ed3e6f354ffa40b SHA512 d6688711452295c41468af214f036499074d82fbeedc3f03560275219c2fae910e623e38e3210176d86f78ba5533ea098da5ff21532c8ad1a5aac132bb74ee02
DIST rustc-1.32.0-src.tar.xz 99602696 BLAKE2B ab26247e3ecb75dbe373254c1c49f46c00a5a4db2b9cedffccb30122ea3b7de2761d6995b5423d0105caf85cc9542b4c21d487385faa34c835398c3320ccbd3b SHA512 487c405fed6430f62d2d0c38b65f6223b1c5074c7a0d3734dc8b3bb72fca255f5727e49541749569713a0c3e9a67eff574ba5698e8dceca6f0ef20b50f99aa42
+DIST rustc-1.33.0-src.tar.xz 100635400 BLAKE2B 1fe8ffcfab8324a93a07b9b9ac9cd050fd9d660fb24884761e8ce5e5a67ce5b6df8513e1440090b39c3ced9cb5ced43f07cc9b0337d39625d2cf4aa9e083cfef SHA512 3291e4e19f75f44c81e6fcf4c01edc7c9d326eca43722381231abcf2e99f4314059ba59a29b79f5511ad9421c358c45e8fe18584d6954d17fe2aabad0f9d9147
diff --git a/dev-lang/rust/files/1.33.0-clippy-sysroot.patch b/dev-lang/rust/files/1.33.0-clippy-sysroot.patch
new file mode 100644
index 00000000000..c8dc7a8e90d
--- /dev/null
+++ b/dev-lang/rust/files/1.33.0-clippy-sysroot.patch
@@ -0,0 +1,62 @@
+--- a/src/tools/clippy/src/driver.rs 2019-03-01 20:52:40.685331653 +0300
++++ b/src/tools/clippy/src/driver.rs 2019-03-01 20:54:44.161327649 +0300
+@@ -31,54 +31,22 @@
+ exit(0);
+ }
+
+- let sys_root = option_env!("SYSROOT")
+- .map(String::from)
+- .or_else(|| std::env::var("SYSROOT").ok())
+- .or_else(|| {
+- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
+- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
+- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
+- })
+- .or_else(|| {
+- Command::new("rustc")
+- .arg("--print")
+- .arg("sysroot")
+- .output()
+- .ok()
+- .and_then(|out| String::from_utf8(out.stdout).ok())
+- .map(|s| s.trim().to_owned())
+- })
+- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
+-
+ // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
+ // We're invoking the compiler programmatically, so we ignore this/
+- let mut orig_args: Vec<String> = env::args().collect();
+- if orig_args.len() <= 1 {
++ let mut args: Vec<String> = env::args().collect();
++ if args.len() <= 1 {
+ std::process::exit(1);
+ }
+- if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
++ if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
+ // we still want to be able to invoke it normally though
+- orig_args.remove(1);
++ args.remove(1);
+ }
+- // this conditional check for the --sysroot flag is there so users can call
+- // `clippy_driver` directly
+- // without having to pass --sysroot or anything
+- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
+- orig_args.clone()
+- } else {
+- orig_args
+- .clone()
+- .into_iter()
+- .chain(Some("--sysroot".to_owned()))
+- .chain(Some(sys_root))
+- .collect()
+- };
+
+ // this check ensures that dependencies are built but not linted and the final
+ // crate is
+ // linted but not built
+ let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
+- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
++ || args.iter().any(|s| s == "--emit=dep-info,metadata");
+
+ if clippy_enabled {
+ args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
diff --git a/dev-lang/rust/rust-1.33.0.ebuild b/dev-lang/rust/rust-1.33.0.ebuild
new file mode 100644
index 00000000000..c853798a69d
--- /dev/null
+++ b/dev-lang/rust/rust-1.33.0.ebuild
@@ -0,0 +1,301 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
+
+LLVM_MAX_SLOT=8
+
+inherit check-reqs eapi7-ver estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
+
+COMMON_DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ sys-libs/zlib
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libssh2
+ net-libs/http-parser:=
+ net-misc/curl[ssl]
+ system-llvm? ( >=sys-devel/llvm-7:= )"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake"
+RDEPEND="${COMMON_DEPEND}
+ !dev-util/cargo
+ rustfmt? ( !dev-util/rustfmt )"
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ x86? ( cpu_flags_x86_sse2 )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+PATCHES=(
+ "${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch
+ "${FILESDIR}"/1.33.0-clippy-sysroot.patch
+)
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pre_build_checks() {
+ CHECKREQS_DISK_BUILD="7G"
+ CHECKREQS_MEMORY="4G"
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ CHECKREQS_DISK_BUILD="10G"
+ CHECKREQS_MEMORY="16G"
+ fi
+ eshopts_pop
+ check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+ if use system-llvm; then
+ llvm_pkg_setup
+ fi
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local extended="true" tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ rust_target="$(rust_abi)"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = "$(usex wasm WebAssembly '')"
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = ${extended}
+ tools = [${tools}]
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)/${P}"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ default-linker = "$(tc-getCC)"
+ channel = "stable"
+ rpath = false
+ lld = $(toml_usex wasm)
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ if use system-llvm; then
+ cat <<- EOF >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ EOF
+ fi
+ done
+
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "rust-lld"
+ EOF
+ fi
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env)\
+ "${EPYTHON}" ./x.py build -v --config="${S}"/config.toml -j$(makeopts_jobs) \
+ --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
+}
+
+src_install() {
+ local rust_target abi_libdir
+
+ env DESTDIR="${D}" "${EPYTHON}" ./x.py install -v || die
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+ mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
+ if use clippy; then
+ mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
+ mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
+ fi
+ if use rls; then
+ mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
+ fi
+ if use rustfmt; then
+ mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
+ mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
+ fi
+
+ # Copy shared library versions of standard libraries for all targets
+ # into the system's abi-dependent lib directories because the rust
+ # installer only does so for the native ABI.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+ continue
+ fi
+ abi_libdir=$(get_abi_LIBDIR ${v##*.})
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ mkdir -p "${D}/usr/${abi_libdir}"
+ cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
+ "${D}/usr/${abi_libdir}" || die
+ done
+
+ dodoc COPYRIGHT
+
+ # FIXME:
+ # Really not sure if that env is needed, specailly LDPATH
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-lldb
+ EOF
+ echo /usr/bin/cargo >> "${T}/provider-${P}"
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+
+ ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
+ ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
+ ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2019-01-26 3:50 Georgy Yakovlev
0 siblings, 0 replies; 33+ messages in thread
From: Georgy Yakovlev @ 2019-01-26 3:50 UTC (permalink / raw
To: gentoo-commits
commit: 34783cfa9869949d36d723bcdf0039f3308abee8
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 26 01:13:29 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Jan 26 02:58:35 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34783cfa
dev-lang/rust: fix segfaults with system llvm:7
Bug: https://bugs.gentoo.org/675752
Package-Manager: Portage-2.3.57, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../rust/files/1.32.0-system-llvm-7-SIGSEGV.patch | 33 ++++++++++++++++++++++
dev-lang/rust/rust-1.32.0.ebuild | 1 +
2 files changed, 34 insertions(+)
diff --git a/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch b/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch
new file mode 100644
index 00000000000..afc2cabde4b
--- /dev/null
+++ b/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch
@@ -0,0 +1,33 @@
+From 1c95f5a34c14f08d65cdd198827e3a2fcb63cf39 Mon Sep 17 00:00:00 2001
+From: Tom Tromey <tom@tromey.com>
+Date: Tue, 22 Jan 2019 11:13:53 -0700
+Subject: [PATCH] Fix issue 57762
+
+Issue 57762 points out a compiler crash when the compiler was built
+using a stock LLVM 7. LLVM 7 was released without a necessary fix for
+a bug in the DWARF discriminant code.
+
+This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.
+
+Closes #57762
+---
+ src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
+index 6deedd0b5ea3..a354eef6887a 100644
+--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
++++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
+@@ -1164,7 +1164,11 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
+ // On MSVC we have to use the fallback mode, because LLVM doesn't
+ // lower variant parts to PDB.
+ return cx.sess().target.target.options.is_like_msvc
+- || llvm_util::get_major_version() < 7;
++ || llvm_util::get_major_version() < 7
++ // LLVM version 7 did not release with an important bug fix;
++ // but the required patch is in the equivalent Rust LLVM.
++ // See https://github.com/rust-lang/rust/issues/57762.
++ || (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() });
+ }
+
+ // Describes the members of an enum value: An enum is described as a union of
diff --git a/dev-lang/rust/rust-1.32.0.ebuild b/dev-lang/rust/rust-1.32.0.ebuild
index d7262e896e2..bc2a6106b8a 100644
--- a/dev-lang/rust/rust-1.32.0.ebuild
+++ b/dev-lang/rust/rust-1.32.0.ebuild
@@ -64,6 +64,7 @@ S="${WORKDIR}/${MY_P}-src"
PATCHES=(
"${FILESDIR}"/1.30.1-clippy-sysroot.patch
"${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch
+ "${FILESDIR}"/1.32.0-system-llvm-7-SIGSEGV.patch
)
toml_usex() {
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2018-10-18 9:05 Dirkjan Ochtman
0 siblings, 0 replies; 33+ messages in thread
From: Dirkjan Ochtman @ 2018-10-18 9:05 UTC (permalink / raw
To: gentoo-commits
commit: aca73a89121af25876703d0ddcc5f08ddf277933
Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 09:02:33 2018 +0000
Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 09:05:13 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aca73a89
dev-lang/rust: version bump to 1.29.2 with fixes
Fixes: https://bugs.gentoo.org/667286
Fixes: https://bugs.gentoo.org/667966
Bug: https://bugs.gentoo.org/609654
Signed-off-by: Dirkjan Ochtman <djc <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11
dev-lang/rust/Manifest | 14 ++
dev-lang/rust/files/1.29.2-clippy-sysroot.patch | 62 +++++
dev-lang/rust/rust-1.29.2.ebuild | 289 ++++++++++++++++++++++++
3 files changed, 365 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 2cb3a292859..782386dff1b 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,4 +1,18 @@
+DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.gz 157164971 BLAKE2B 04b6e5d19762aac8137fc2cd4649721808302293a3171750a301a50cc0d51239d589138708ef836674cbc26fb08e5dc1f95a9b914078bfca1fbe3c31482865e6 SHA512 b5ee4eaf18d3c06e73440d2b74012e936f3c6e518f70d40735bf487436d81b4bceecfca08cd9d46e689fa73bc17bea27f6bfac257ff8e943a71fd3bf3f0550fc
DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.xz 98937652 BLAKE2B 836d3dd4e583fa50dd317c3bea56257e6ea19defdb38c16be6debb2854e147c8a92c4832263e4ac314136022a176526fe7d3774a3c5a84cd8d364cd2a1532860 SHA512 8d9acbc90ddaa1e0de0234a21798b19b5365ea371a12f9a143c6ebacbb48f57344da6e827e867513be502bce2801de27a0dbbacdf8618c653aeb58026b6c469c
+DIST rust-1.28.0-arm-unknown-linux-gnueabi.tar.gz 162495940 BLAKE2B 98f8a03326cdf006509fea62aa892033117c7f22d6b6e5961afb7229574e7193237d9e0f010bd2c47a88cd0a3cbbc698432fbe2f3d94354a2f783df858ff913e SHA512 f52f78933d4da8252676f480b298ece7bec788106abde4b2075070f3a74fd3a53f6497685e6f481f623a911d4b81dee727b085cddf466e394577bca22e907dd8
+DIST rust-1.28.0-arm-unknown-linux-gnueabihf.tar.gz 162818424 BLAKE2B 41769724609e6847ed6bea7fc246063eec418e36b939cd5aab7cb84aea214baf15cc208211aa432a937c3b263bfe3412e3076c565f85cf1d0e92164c15dfa87d SHA512 c779f168be3c69e612fe4bc597cb95889e43e6100be304e4157cf35ed5651601a8e5e6470671642566979a7c2c9cfbd0c6446e428a4606f7869d3c5f698c0a7b
+DIST rust-1.28.0-armv7-unknown-linux-gnueabihf.tar.gz 160016618 BLAKE2B 687d019803af7f6b891fe381eeea45d7cb009c78ae0e45b34ca6fdb91c03e27802de1578f0c0142aa17fbbe7bbf99c1a0a3b4ff32e39aaa3050f4e75019dd83f SHA512 1d26b31499462b5521f2ee798cfb6072516569077e5f9bcac21f9f0de06d1c9df0eec9735c5539048c0f8cb26b1a498eff8f3eed66f8e66bb937cc0e6e6c5c76
+DIST rust-1.28.0-i686-unknown-linux-gnu.tar.gz 223358542 BLAKE2B fa7b691bcfae4cd939848b5994d81efda99bc7482141faa4a557354d341dfbf0257e43d49e894de896947097987dba3df22c6783cd75f6c99d72f76c3226a899 SHA512 40fc0c6e347f60ab3809e95edabafd88e9160f8adaa217562a9c52fea42f540ca142eddd827ba16960bef8faa9401b37a963d29baa235aa84eb760c2a78a2c4f
DIST rust-1.28.0-i686-unknown-linux-gnu.tar.xz 136925948 BLAKE2B 85d9239533920c3f16d7c61bada0caeabceceade29032b70bb4562bfd04fa0158cdd85b8a0a1119506416fa5916ade8a0466bf6c10da457299a6319aa25f9dd6 SHA512 ffdfab46db14f07354b553e02fdb9dc6602c2c52b78d8f17c499f4ddb1e257aa53479df836eb3f06a2548d34296b0277cdb6b4c6f3cec57265823df22752c135
+DIST rust-1.28.0-mips-unknown-linux-gnu.tar.gz 165489073 BLAKE2B 14d5f01a02fdc87b508dd214271b5b1f0fde2cbf360faa65cac51f8d3658acb4f1388c894a1451c0a9626e3abffedef0b663caab845ed95573b5567244fd8ed7 SHA512 9663fae3c05e5a393002261a213f08d1efc1426ef06849343475abfef4fcf427ea987b69dee6bc8edb92313c7e31cff79a526948f0934fdbd8ced219cdfe8b25
+DIST rust-1.28.0-mips64-unknown-linux-gnuabi64.tar.gz 164335544 BLAKE2B da043943d2c9429c1626ff233728afacdc360c3705ac4bcafa94d145aef5ca91cdf7763c078cf63439bf6d0d126eabed4f107520a510c9f4cc58445b5b24d47e SHA512 863678828f59d14d83d68555d86ae2c765d227524cd2d0c3b38948cf6da78db3590c4a05c426c19eacdb041aec9d55b12469a0e2bd6a3b0eab6bec5fe12dbbf9
+DIST rust-1.28.0-mipsel-unknown-linux-gnu.tar.gz 163172396 BLAKE2B 3a8f4568d66d82709199b1bb40b53c345628897b4b272f9f86086309a87513ffdd11be3a18698790c1efd0fc879f6a6dffbcc618952f355b38d6d4d1d4ae6aa5 SHA512 cbb05bb0b5024d0d7d4ec7b3f2db8004bb84213fc2bd0be8d820a3224fcbbd4a8245906927353e56c9cc9f09f36d1b1baf026cba2caa22a5873f20dceae6feaf
+DIST rust-1.28.0-powerpc-unknown-linux-gnu.tar.gz 166220569 BLAKE2B 516340a78d3e7e52b0997b72d1767bb6481eb443c6ba9f7f52339a66b6b96c473e4023d66b104a147a8a580e54992b3aff81784314e03cc5a150a056b6504413 SHA512 71c10b5cab4b3a60d88c1d9a3463478379d5b5ff86c4c8a3f48da92354fc55490636128781ef71dbf5156f4f558077ffc161616ace614c32f8a43014435dd37f
+DIST rust-1.28.0-powerpc64-unknown-linux-gnu.tar.gz 172115039 BLAKE2B d4f808101fd0db3096b7dd69fd77d91111e69965b36cac7c23b7503ec6851f8868f3f00635b2a38a844e28b5e4a6490be50a29836db86d994933688e2ca8c8b7 SHA512 0c48cfefe93258641a5d0f33355719356095b7fc680edc768d7ce1b22cb437f80e99e302356ef00e6e39cd1fe9b042a0f8d60c9814458f9629a36822fea7faa6
+DIST rust-1.28.0-powerpc64le-unknown-linux-gnu.tar.gz 170244391 BLAKE2B 10c54895a9ce9077f2489d9a24f734deeb132227871d6ddf610557629892053b9473146319ca979e9ceb3d861a352dc1fa2e0f529c5675586ed2bb80aad9d0f8 SHA512 ec5e0e85a8a6124f5804e72293fde86e0dae0cd4d044831182610b185f1048cf0bec9b12cf3063a6fba3bac3fca273727364e86a3e5eb8ba0224b29ce2145d6b
+DIST rust-1.28.0-s390x-unknown-linux-gnu.tar.gz 159758899 BLAKE2B a692e77fb2538d539f403f7d39898d46160b56a389cee459861a743b4acde96cb48b6776a820c046b27a28ef9997c33d07154f36d70de7473d877ea2680b6ea4 SHA512 a9f0a84d6c80ee3d66a10214a0a229112d4594d849cf51081a722b2c66e5742a199c59215d258f86a7ab362659936a2dd8b6228c18f3065fd43d2edd7d7d6363
+DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.gz 220419012 BLAKE2B 9db1923cd9f82fe7e13684ff86af30592af2acb348358a27c956ec01e0391b2fae7cf89537a4b23159beb7202ec5349e701b2255e0d188b3894bd985bd1b24a2 SHA512 6bdcb8828e14069e099764b79671579bd24c90a102266fa5ebd9a5da3da7186b3e1d64b53c6c065d2d1a4d71b6c613513fddb38cd21c3d37a4a112b0393542a2
DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.xz 134120432 BLAKE2B 56fb79a98659d9c8e56b8eef87dea3302ee5901bc4507d1c204628370b20cf34b2875c9586faa0acc2bc2b1a5beedeb9b5ba199cfb85d52f268f084a02f04f27 SHA512 4f427c11a9cd22aedd01bd7ed5bee2ba5e00a27db25af4f596cf8627d88eff8e72625eb83729d2e6c6780aaffd44c0e7065a1c8fa22f4899349b72c726cf6a5f
DIST rustc-1.29.1-src.tar.xz 61937676 BLAKE2B 6a60249538e1ec62471f4d0e3fc31c0a648433aa6f85ca7341657ea07772e338eb92a629941685808f4b80e84cb025d78aee9d0d6fa71c6635a1647c61bca9bc SHA512 1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7
+DIST rustc-1.29.2-src.tar.xz 61888912 BLAKE2B f59b0bf45caa6f6136f92ffbaa612bbc6a340c8694ec69d75aadace9180c36753f985641915524388b52cc108f8f5b71840ee3a6c0b1fcff6decb61d2d8a161e SHA512 d8fa9501764348ace8f60f2069bcd016925abe56c8bbc2b87fb52ff796e4bc7284c1fccbb1671416437bb82fde7d9240eeae875d6099914e27e75cfe050e2d38
diff --git a/dev-lang/rust/files/1.29.2-clippy-sysroot.patch b/dev-lang/rust/files/1.29.2-clippy-sysroot.patch
new file mode 100644
index 00000000000..6a527e5a020
--- /dev/null
+++ b/dev-lang/rust/files/1.29.2-clippy-sysroot.patch
@@ -0,0 +1,62 @@
+--- a/src/tools/clippy/src/driver.rs 2018-10-04 16:30:42.438486058 +0300
++++ b/src/tools/clippy/src/driver.rs 2018-10-04 16:31:45.044484028 +0300
+@@ -20,54 +20,22 @@
+ return;
+ }
+
+- let sys_root = option_env!("SYSROOT")
+- .map(String::from)
+- .or_else(|| std::env::var("SYSROOT").ok())
+- .or_else(|| {
+- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
+- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
+- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
+- })
+- .or_else(|| {
+- Command::new("rustc")
+- .arg("--print")
+- .arg("sysroot")
+- .output()
+- .ok()
+- .and_then(|out| String::from_utf8(out.stdout).ok())
+- .map(|s| s.trim().to_owned())
+- })
+- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
+-
+ // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
+ // We're invoking the compiler programmatically, so we ignore this/
+- let mut orig_args: Vec<String> = env::args().collect();
+- if orig_args.len() <= 1 {
++ let mut args: Vec<String> = env::args().collect();
++ if args.len() <= 1 {
+ std::process::exit(1);
+ }
+- if orig_args[1] == "rustc" {
++ if args[1] == "rustc" {
+ // we still want to be able to invoke it normally though
+- orig_args.remove(1);
++ args.remove(1);
+ }
+- // this conditional check for the --sysroot flag is there so users can call
+- // `clippy_driver` directly
+- // without having to pass --sysroot or anything
+- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
+- orig_args.clone()
+- } else {
+- orig_args
+- .clone()
+- .into_iter()
+- .chain(Some("--sysroot".to_owned()))
+- .chain(Some(sys_root))
+- .collect()
+- };
+
+ // this check ensures that dependencies are built but not linted and the final
+ // crate is
+ // linted but not built
+ let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
+- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
++ || args.iter().any(|s| s == "--emit=dep-info,metadata");
+
+ if clippy_enabled {
+ args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
diff --git a/dev-lang/rust/rust-1.29.2.ebuild b/dev-lang/rust/rust-1.29.2.ebuild
new file mode 100644
index 00000000000..b1d1b8dd282
--- /dev/null
+++ b/dev-lang/rust/rust-1.29.2.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
+
+inherit eapi7-ver multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+CHOST_arm64=aarch64-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
+
+CARGO_DEPEND_VERSION="0.$(($(ver_cut 2) + 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="cargo clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )
+ cargo? (
+ sys-libs/zlib
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libssh2
+ net-libs/http-parser:=
+ net-misc/curl[ssl]
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ cargo? ( !dev-util/cargo )
+ rustfmt? ( !dev-util/rustfmt )
+ dev-util/cmake
+"
+PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ x86? ( cpu_flags_x86_sse2 )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
+
+toml_usex() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0_name="RUST_STAGE0_${ARCH}"
+ local rust_stage0="${!rust_stage0_name}"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" rust_target_name arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target_name="CHOST_${v##*.}"
+ rust_targets="${rust_targets},\"${!rust_target_name}\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local extended="false" tools=""
+ if use cargo; then
+ extended="true"
+ tools="\"cargo\","
+ fi
+ if use clippy; then
+ extended="true"
+ tools="\"clippy\",$tools"
+ fi
+ if use rls; then
+ extended="true"
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ extended="true"
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ rust_target_name="CHOST_${ARCH}"
+ rust_target="$(rust_abi)"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = ${extended}
+ tools = [${tools}]
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)/${P}"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ channel = "stable"
+ rpath = false
+ lld = $(toml_usex wasm)
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(get_abi_CHOST ${v##*.})
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ done
+
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "rust-lld"
+ EOF
+ fi
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env)\
+ "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
+ --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
+}
+
+src_install() {
+ local rust_target abi_libdir
+
+ env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+ if use cargo; then
+ mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
+ fi
+ if use clippy; then
+ mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
+ mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
+ fi
+ if use rls; then
+ mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
+ fi
+ if use rustfmt; then
+ mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
+ mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
+ fi
+
+ # Copy shared library versions of standard libraries for all targets
+ # into the system's abi-dependent lib directories because the rust
+ # installer only does so for the native ABI.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+ continue
+ fi
+ abi_libdir=$(get_abi_LIBDIR ${v##*.})
+ rust_target=$(get_abi_CHOST ${v##*.})
+ mkdir -p "${D}/usr/${abi_libdir}"
+ cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
+ "${D}/usr/${abi_libdir}" || die
+ done
+
+ dodoc COPYRIGHT
+
+ # FIXME:
+ # Really not sure if that env is needed, specailly LDPATH
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-lldb
+ EOF
+ if use cargo; then
+ echo /usr/bin/cargo >> "${T}/provider-${P}"
+ fi
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
@ 2016-10-24 5:27 Doug Goldstein
0 siblings, 0 replies; 33+ messages in thread
From: Doug Goldstein @ 2016-10-24 5:27 UTC (permalink / raw
To: gentoo-commits
commit: d63d593dfdc5fb7dd1256663daac7b978aa892af
Author: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 05:26:05 2016 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 05:27:17 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d63d593d
dev-lang/rust: fix network-less builds
When building without a network connection or FEATURES=network-sandbox
the build would fail due to the build process reaching out to the
internet to fetch down some files that the package manager already got
for it. This neuters that network access and uses the existing files.
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>
.../rust-1.12.0-disable-fetching-stage0.patch | 36 ++++++++++++++++++++++
dev-lang/rust/rust-1.12.0.ebuild | 2 ++
dev-lang/rust/rust-1.12.1.ebuild | 2 ++
3 files changed, 40 insertions(+)
diff --git a/dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch b/dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch
new file mode 100644
index 00000000..14d0b32
--- /dev/null
+++ b/dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch
@@ -0,0 +1,36 @@
+From b6a4c78ef7b4bc6c32145f27e8a679d5baf36f90 Mon Sep 17 00:00:00 2001
+From: Doug Goldstein <cardoe@cardoe.com>
+Date: Mon, 24 Oct 2016 00:01:37 -0500
+Subject: [PATCH] disable fetching stage0 and use whats there
+
+In Gentoo and Yocto alike we do not allow build environments network
+access and as a result the package manager is responsible for fetching
+down all the files necessary. In both they are configured to fetch down
+the compiler and unpack it and place the stage0 tarball inside of the
+'dl' directory for the build system to use. Unfortunately it
+unconditionally attempts to fetch down the files and ignores what is
+already available so this avoids that behavior and just uses what's in
+the 'dl' directory.
+
+Upstream-Status: Not upstreamable
+Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
+---
+ src/etc/get-stage0.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/etc/get-stage0.py b/src/etc/get-stage0.py
+index 127251c..2889c07 100644
+--- a/src/etc/get-stage0.py
++++ b/src/etc/get-stage0.py
+@@ -31,7 +31,7 @@ def main(triple):
+ filename = 'rustc-{}-{}.tar.gz'.format(channel, triple)
+ url = 'https://static.rust-lang.org/dist/{}/{}'.format(date, filename)
+ dst = dl_dir + '/' + filename
+- bootstrap.get(url, dst)
++ #bootstrap.get(url, dst)
+
+ stage0_dst = triple + '/stage0'
+ if os.path.exists(stage0_dst):
+--
+2.7.3
+
diff --git a/dev-lang/rust/rust-1.12.0.ebuild b/dev-lang/rust/rust-1.12.0.ebuild
index ca00a6b..e608fbd 100644
--- a/dev-lang/rust/rust-1.12.0.ebuild
+++ b/dev-lang/rust/rust-1.12.0.ebuild
@@ -55,6 +55,8 @@ PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425"
S="${WORKDIR}/${MY_P}"
+PATCHES=("${FILESDIR}/rust-1.12.0-disable-fetching-stage0.patch")
+
src_unpack() {
unpack "rustc-${PV}-src.tar.gz" || die
mkdir "${MY_P}/dl" || die
diff --git a/dev-lang/rust/rust-1.12.1.ebuild b/dev-lang/rust/rust-1.12.1.ebuild
index ca00a6b..e608fbd 100644
--- a/dev-lang/rust/rust-1.12.1.ebuild
+++ b/dev-lang/rust/rust-1.12.1.ebuild
@@ -55,6 +55,8 @@ PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425"
S="${WORKDIR}/${MY_P}"
+PATCHES=("${FILESDIR}/rust-1.12.0-disable-fetching-stage0.patch")
+
src_unpack() {
unpack "rustc-${PV}-src.tar.gz" || die
mkdir "${MY_P}/dl" || die
^ permalink raw reply related [flat|nested] 33+ messages in thread
end of thread, other threads:[~2024-10-12 4:04 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13 17:41 [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ Georgy Yakovlev
-- strict thread matches above, loose matches on Subject: below --
2024-10-12 4:04 Sam James
2024-02-11 6:01 Sam James
2023-10-02 8:13 WANG Xuerui
2023-08-04 12:30 WANG Xuerui
2023-07-20 18:48 Ionen Wolkens
2023-02-09 20:36 Georgy Yakovlev
2022-11-13 19:14 Georgy Yakovlev
2022-10-20 18:19 Georgy Yakovlev
2022-09-23 20:06 Georgy Yakovlev
2022-09-16 1:46 Georgy Yakovlev
2022-09-15 3:15 Georgy Yakovlev
2021-12-06 22:42 Georgy Yakovlev
2021-08-09 19:03 Georgy Yakovlev
2021-06-18 9:16 Georgy Yakovlev
2021-06-18 7:46 Georgy Yakovlev
2021-05-02 16:45 Georgy Yakovlev
2021-04-18 1:24 Georgy Yakovlev
2021-04-05 4:27 Georgy Yakovlev
2020-11-24 0:41 Georgy Yakovlev
2020-10-28 1:42 Georgy Yakovlev
2020-06-05 8:53 Stefan Strogin
2020-04-10 11:28 Stefan Strogin
2020-03-28 19:08 Georgy Yakovlev
2019-09-26 22:06 Georgy Yakovlev
2019-06-19 0:35 Georgy Yakovlev
2019-05-26 6:27 Georgy Yakovlev
2019-04-24 16:31 Georgy Yakovlev
2019-04-14 8:03 Georgy Yakovlev
2019-03-07 4:40 Georgy Yakovlev
2019-01-26 3:50 Georgy Yakovlev
2018-10-18 9:05 Dirkjan Ochtman
2016-10-24 5:27 Doug Goldstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox