From patchwork Mon Aug 19 09:47:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varatharajan, Deepesh" X-Patchwork-Id: 47933 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB46FC5320E for ; Mon, 19 Aug 2024 10:51:46 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.web10.206823.1724060841648631571 for ; Mon, 19 Aug 2024 02:47:21 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=8961a927c4=deepesh.varatharajan@windriver.com) Received: from pps.filterd (m0250810.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47J5sKCX010636 for ; Mon, 19 Aug 2024 02:47:21 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2171.outbound.protection.outlook.com [104.47.56.171]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 412q541f4p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 19 Aug 2024 02:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SIkXgGD3lYbwOgClWTxz+OYWRl87mWDvrbrP4OcrV1vk+fDGFuSwfxJj61j7mvsuLkGOrMdAil8X6PNgx/DuaJZxC7mneuUuqI8uWtanp+gGtyNPYhgceeaFh7MEeelfEh5+RdWNSO6zY/XCnG4fSP0SAs29lj8jOC+SgjENNokCUPhLY/gUUuFmXYEhyn54p8EGaURt7IDU4QB/ZdmpE21ybiK7iV2dt1s3DSu6Ul2+4b/jyHuP5YDBJJof98WZjpnmPHe4gfgn5QgiCuaBNzrL+Ow3PZ1LY7bRwM4bdr0qI54lnGVVgmoqzvvOcFNUCdAfmXcwRCT/yl/QaObabA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G3cERt940K4AREvJiuT+kNCwp+wdSATFtXF5x0XLVD0=; b=YIj7Ml6MvFv8hc88okphSVwlqmgcc9xpGL/4lyy7O2anYKf0OX77/6BB6pES2rGTT/Q6NtfDMqOz0xK0YZb5U5Et0AQtCAffntnPfVGOCFQyj0r6z0lhs86LFxA7O5ymNA0ofn3I6N92TAYPqtICLsFsW4bqrtZ4nmEd3HNHl6CjzmCTpRTCP/WMC2m2uOOHdjwCJkSFRmc/7+X8wFwbyni5yLRBiHehpzsbhq9B5kxsejaWES4M29IL1Hm5iEZqn2+VV/upfe46CLKIO/JK5O/ygW76e1et59pdTdRlIuOTwR0C925Lomicb9fsf8ZJ8jJKEElhvIBHfoQ8Dgb6Ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from IA1PR11MB7320.namprd11.prod.outlook.com (2603:10b6:208:424::14) by MN0PR11MB6160.namprd11.prod.outlook.com (2603:10b6:208:3c8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.17; Mon, 19 Aug 2024 09:47:17 +0000 Received: from IA1PR11MB7320.namprd11.prod.outlook.com ([fe80::5547:934e:1997:835c]) by IA1PR11MB7320.namprd11.prod.outlook.com ([fe80::5547:934e:1997:835c%7]) with mapi id 15.20.7875.019; Mon, 19 Aug 2024 09:47:17 +0000 From: deepesh.varatharajan@windriver.com To: openembedded-core@lists.openembedded.org Cc: Randy.MacLeod@windriver.com, Naveen.Gowda@windriver.com, Shivaprasad.Moodalappa@windriver.com, Sundeep.Kokkonda@windriver.com Subject: [scarthgap][PATCH] rust: rustdoc reproducibility issue fix Date: Mon, 19 Aug 2024 02:47:01 -0700 Message-ID: <20240819094701.27210-1-Deepesh.Varatharajan@windriver.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: BYAPR07CA0025.namprd07.prod.outlook.com (2603:10b6:a02:bc::38) To IA1PR11MB7320.namprd11.prod.outlook.com (2603:10b6:208:424::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB7320:EE_|MN0PR11MB6160:EE_ X-MS-Office365-Filtering-Correlation-Id: 462fdea1-f68a-413a-c9fc-08dcc033e971 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: IxS0iDk2DxnUD4/L9j1a2PlZwYlRXvsgIyI59ctnggntkoms78wg8OxXfHpVdJV/wYTkjSsPptFfTbx8gMTCa44+mx35GH4MBCjIlL7ukd3zsR3U5uXyLSU0DXAf9cxyR/69Cv38cLYkTA2nKH5CgpO8Utt6ZmRuTEF42JVPLIRJGmpCnRGRW/pLedkeSqce2rYhUrN3WDM83d5wA9YfI42NMXQE3YdNsrj7zQ6dajvfL95+8zWntsAAyoV1X+mJDHTACKP/JwYVYgb5nNciPPtZ+cMDMuUIrvizrvAU/6hApGZ3UW68eW6RdExkzeusPYFHPptRbgNJj9TIaE8wmCFQ0GBXWD0Z2tH0sIJCl4CtMZswirwbn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M;H:IA1PR11MB7320.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: msjcnNcFHoUGva0c6pU4Cl48K0vIWFeOQmc2LIKIxSuuHRRLFhnriqSWGeW+9Eu4dTp7wBxHI21o2vcoLWJcw0xJq9G/PQLAk+56H6LvUVLE7gFGnMNMO19I/6+XAg0hB0+VpXaf+DfFEehcNlFXNemaOPdiKf75b/1MCh5R7wpQKlvUthTXabitJhnQ9xZy2cE+zXjwyHBHZxRs4mb9YjIolQTStih2l9wq2M/wQzANrFDSUDGIHf/hpi++PjHwz5nlxvl5KbNjrgPQ42+4EjTe9E/mpTE6sOTwvRo6umaikPecyqEfZLNY9blOKXATQUhpc1OrwqQUzz2UiOxO+5d4PGlNnPeYzuO15FDm2HfcXWFObEDfsqMaIbt/qzn0wiHcY/EH6gKNKs80HAjQ3kUXS+pbGKu1r45uHlaJGiyK9z1WMzyW1erks/2YKsenJspIl39gZcP/SCfrIoZQw5xebmv2F86OzAoMwNGilRQppdxbBS7dyJDy/aoHj31dvlTV9Kx/9IB9KOLU/lV/9yu5MiuIXu6UVlGZ7P6gZvrYYRP2mQZrtWeN91BaJp7gfpMTZ18XKtZxFxf1hkjHwDZQRJjZylUaymttGuubtlCo0mJ3so2/0h/QF6kQG+doWzjXaptaernCjiJNeXp9b8mdO4YeFUuTTXHqo1ep86QE1IV6F1xkY3wl9KixHlBQHEAgqRxXhmCwF2nz2KN77g+IdhAguWTeeA2PX7A45MUtapOgsPFhOdciO4udlWAmgCyD/zOeLqd8AW3Znapml20vVWG3E3lpPNFqQRU9urg3Gqns3WpFg3u81XOKBDu26YP3UCIzd+byndUxW6G64H8oOpj5Hir9ZCmyU6/L2djoDoELfVllR9T57MSwM9UgJmAJlfhEB/9dEBDncQp3uyfNfcImGzWJueEIwnC4pMqhpTbmww8pUZ2OD99epaAdEpKIhenjEvQGj576wZMEmV5edB03iGgcTlWyOEsk2/xiK8QJ6k+y5tuC8CoK6/e4cEodxB00G+TCEAsCa1kOQxPiIoKU9O45xPE95LhiE+wZR5OB7QoExGgXg/dQnNB154jiA0WXBJfMsnhDiGiDbXNWKrlAgqMbMgKAf2sR9KCLdmMKWL5SBLUrcqWMHCyAJQduEyyxh/BuNFihrqo2P4u1q6zbWfsX1NT5ll9int3K0AYVh+QA3rsKga6nRQV112f85AR+MWCwHV5g7oXTfs+4Kksgev7mZeuEqYFCLTMoDX6YedRPeY5VrTXv9FNoBiB9cCuzTjf204wsWYyxZ63RCMa8J2wrDe32+qbdAkUXHnSp06Ho7x9+wxvqS46REcq+vyyFyU8CDELBZQbT9RzofYdfB5XXiDfqq8I2pWfM0egb8NG+0gDwik9ivIia3HcW9bLVk6u7bYuL5bikOTH9oRKW6hg/wOXGeXh66amYO5YZsOm9ncnjnmoeB7sLo3katgE5+ls80ACBcnp9PSe9dY9cEKJpy6lY1tw0GJV3lTzjdrOo/C552zGu+dOy0vF1j92idZ0i+Pel2XzIfJL1cC+tYH2TInlDSRr9h2LbEGq+qOh74Bd/mMCLAJuiYSxHUfOlSOK0tmERy9/Jz3Z0aKHwE/Pr5OXW8Kma3UU= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 462fdea1-f68a-413a-c9fc-08dcc033e971 X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB7320.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 09:47:17.3479 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BoL1Ky8D/276bMdjRPbMb4GmxbGMPFQcVYh1lfviD1tMo65fntbCxWPXJ0SNNJOYuaLIWmzxQTDuZp/0RpCO60YjvMx4bu8jcPmwBmLj9WFCMuVUS9Hj9py/qt+CWZa6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR11MB6160 X-Proofpoint-GUID: BHSd2_HRKdUQjGpSLztR_BE5SvMh2sKf X-Proofpoint-ORIG-GUID: BHSd2_HRKdUQjGpSLztR_BE5SvMh2sKf X-Authority-Analysis: v=2.4 cv=b+3g4cGx c=1 sm=1 tr=0 ts=66c314a9 cx=c_pps a=vIBLTX18KUGM0ea88UIWow==:117 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=yoJbH4e0A30A:10 a=bRTqI5nwn0kA:10 a=t7CeM3EgAAAA:8 a=ei4SEBeUAAAA:8 a=X30zvtXajfbtiY8q2AoA:9 a=m5Prkr60LOIA:10 a=FdTzh2GWekK77mhwV6Dw:22 a=8zIOOLb7Ym0NljyPXbuS:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-19_08,2024-08-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 phishscore=0 mlxlogscore=855 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.21.0-2407110000 definitions=main-2408190065 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 19 Aug 2024 10:51:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203501 From: Deepesh Varatharajan The 'codegen-units' option split the crate into multiple compilation units for parallel compilation. Currently, this split is causing the rustdoc to generate differnt binary between the builds. To fix this the codegen-units & the lto options are disabled. More info about options: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units https://doc.rust-lang.org/rustc/codegen-options/index.html#lto Signed-off-by: Sundeep KOKKONDA Signed-off-by: Deepesh Varatharajan --- ...ue-fix-cargo-config-for-codegenunits.patch | 29 +++++++++++++++++++ meta/recipes-devtools/rust/rust-source.inc | 1 + meta/recipes-devtools/rust/rust_1.75.0.bb | 1 + 3 files changed, 31 insertions(+) create mode 100644 meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch diff --git a/meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch b/meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch new file mode 100644 index 0000000000..fdb2a4a498 --- /dev/null +++ b/meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch @@ -0,0 +1,29 @@ +commit e2e7017350d0b5324811fef3b841f98b00273887 +Author: Sundeep KOKKONDA +Date: Fri Jul 26 06:35:59 2024 -0700 + + rust: rustdoc reproducibility issue fix + + The 'codegen-units' option split the crate into multiple compilation units for parallel compilation. + Currently, this split is causing the rustdoc to generate differnt binary between the builds. + To fix this the codegen-units & the lto options are disabled. + + More info about options: + https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units + https://doc.rust-lang.org/rustc/codegen-options/index.html#lto + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Deepesh Varatharajan +--- +--- a/.cargo/config.toml ++++ b/.cargo/config.toml +@@ -3,3 +3,7 @@ + + [source.vendored-sources] + directory = "vendor" ++ ++[profile.release] ++codegen-units = 1 ++ + diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index b14221b6cb..4ffc9faf18 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc @@ -13,6 +13,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://target-build-value.patch;patchdir=${RUSTSRC} \ file://0001-Handle-vendored-sources-when-remapping-paths.patch;patchdir=${RUSTSRC} \ file://repro-issue-fix-with-v175.patch;patchdir=${RUSTSRC} \ + file://rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch;patchdir=${RUSTSRC} \ " SRC_URI[rust.sha256sum] = "4526f786d673e4859ff2afa0bab2ba13c918b796519a25c1acce06dba9542340" diff --git a/meta/recipes-devtools/rust/rust_1.75.0.bb b/meta/recipes-devtools/rust/rust_1.75.0.bb index c33f31d261..7cd34a61c3 100644 --- a/meta/recipes-devtools/rust/rust_1.75.0.bb +++ b/meta/recipes-devtools/rust/rust_1.75.0.bb @@ -132,6 +132,7 @@ python do_configure() { config.add_section("rust") config.set("rust", "rpath", e(True)) config.set("rust", "remap-debuginfo", e(True)) + config.set("rust", "lto", "\"off\"") config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}"))) # Whether or not to optimize the compiler and standard library