From patchwork Mon Mar 14 10:55:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12780031 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66758C433EF for ; Mon, 14 Mar 2022 10:56:23 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.290137.492046 (Exim 4.92) (envelope-from ) id 1nTiMu-0008E0-4S; Mon, 14 Mar 2022 10:56:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 290137.492046; Mon, 14 Mar 2022 10:56:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nTiMu-0008Dt-1K; Mon, 14 Mar 2022 10:56:04 +0000 Received: by outflank-mailman (input) for mailman id 290137; Mon, 14 Mar 2022 10:56:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nTiMt-0008Dn-6C for xen-devel@lists.xenproject.org; Mon, 14 Mar 2022 10:56:03 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5114be56-a385-11ec-853b-5f4723681683; Mon, 14 Mar 2022 11:55:54 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5114be56-a385-11ec-853b-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1647255361; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=F08nsH28stFZOmUBv3c0cZFqPtgTIGzThzdk56xOyS0=; b=N6fhGOqlu5zRpTTKkWd5oMMFEEkUCPSi0oaVzB2w0MI8+BhSMn52qj0E lLac8grDhOjglnvtKv7SV2FGkRmdig3kFgvPgpAdoATa9QhI7rNJxW2bl VABGq24lW8TB1IlbwMxDhPQXeo+ChZ4H1pEX7n4bUowFy3oMNcVGBWejj M=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com X-SBRS: 5.1 X-MesageID: 66086948 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:SwUgR67r5fT/NzQSuq95cQxRtBLHchMFZxGqfqrLsTDasY5as4F+v mcYDD2AOv+ON2bzfdkgaNzjpxkCuZHcmIBlTAFv+31mHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YPgX1vU0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurSVRCJuOJ3ett8RDQtqMSFsB6J0xuTYdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsFvX5t13fBBOsOSpHfWaTao9Rf2V/cg+gQQ66OO ZtFOVKDajzQTzZ+GFQpGqkvkaChrHPGc2FaqV6K8P9fD2/7k1UqjemF3MDuUseRW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Pf9g4JoMx8+L gj5RPUi7NnSTf72Ajt7dnBUB9n0mCup2A5rOIVh3tDFaMDdb5qq5AF9k89KuZMIMvD0vFoLA BSNrCc2B4PGmnqL0wx/1MfiuBEZ05DUStvGSM5y4+oOzs/pgEN86JX/r1cop46zuNMd3B13Z W0Dk1WrsA8ciZvV9MHOA4ge7rBNoWfe2O7DIqtSW6XZp3vfUi97qLK3A== X-IronPort-AV: E=Sophos;i="5.90,180,1643691600"; d="scan'208";a="66086948" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+AMKrkilGHEoJjacGS5EncYb1y8R5Nqc2BjD6gRoFiOkwBJae2tH8ersShQV8agibMDnRhNI4Fs8vWyI6thgbsJjRP8brEGUtIL+LKdlBx9rGIG1794EImOzcUTYqOCCYSNHIJQC4dP9bjI0KZamOMJxMnru56znlQBbMhx09cp74cUHdg9yQQkIOSz9wn4narCy/7a1bg4maSuy5KwVnnvIDCl/S0s+OCJt9onmXDW0+hDp2PAPsYiXrSSh82kq3A7wC4h94NFmq1YbrRsxlgagcCBgzd5KXte6WFoCpkb/pStLt9B6ZlYcU7L0AljfLHO1szoicBBLX37cqWvDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=fB61Y6AkgCFoXtQB7EJYvUC5iJfNzDs4sVa702nQGcU=; b=eLKcOfYdv8nrGCa4hSXdClTieeMltVORki0Z/upuyrdnkejnQoay3AIgTQk85eGx95sBVdMjBVtK1/idmwLvzWnI2A6PixKbK/YNOMSZUJ/G/7rqv9xmn+z+OId2YxIwfNBrF5rA7mhxwVuOrZBQ7AUOzwGUAxZ4sn9oT1XFaGMk57O5oxtrfBqiP94nwBidg0rN4pblHopA7TGE5MNzu70sOSHT496P/v4LQZN1UaKWyG8Gy23Rgvi4NFAB3ZL6BY1aM2rUvbdNP/pV2N+P3EYg71m3qfL8N2lsVJVqu6yPNk3dtCqlao2U2KmH0aIcX/1Nq1blAwFZmSeFk+bcKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fB61Y6AkgCFoXtQB7EJYvUC5iJfNzDs4sVa702nQGcU=; b=UzB68vWhMKf98pG+vCEsuoXE41Oz8nmRz7tE/ulDpyqiOxl0vFjfOdtgCCC/45WISDf5NzNqOvbTkDjH9+PaJ4YDJ9a4ZJtCHlGpRrFEMRjcFFGMqFI5at1MRGt+8KkThVhCDc45blbXTRrH/nYyDbFCnrK7I847MZbjXijt6HM= From: Roger Pau Monne To: CC: Roger Pau Monne , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [PATCH] kconfig: detect LD implementation Date: Mon, 14 Mar 2022 11:55:35 +0100 Message-ID: <20220314105535.13518-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: MR2P264CA0100.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:33::16) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c55975ce-dbad-4f10-758f-08da05a92e34 X-MS-TrafficTypeDiagnostic: CY4PR03MB2725:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yVqOL20QnpqxKugPPNzdsFSY90DtJNd0vPd3fLVu1TkDwwYdgU5r84InYvO5RykyeLIFOkdabi7G63y03aDyX6LUaTy7YREHm48Phym91de+UHb8BMoFVXGpxMHtIdHFAOrbLvekbSOU55lgOGZSnKD3Zvw+0DNi9fwD02ibNbdbcPhRMn7IM0ZMFl7fStwueab0yVJqkOpUwyhLKDk1sIdOKJnBOUhtSczKwFkuT4d9eTu8FT9+n9RnwyaXC/zNGQmLT2vUeZd+4ciyQVSh16kQt7urwdPhL9otDLpeCfnoJ72Ab+s27VeBF0VT/ssA5usIi/pYPrbHcmJbp2wQymopK7Fa+d3PeU2VlUoQqtLlnDr0pbbmeiZEp5jkqDc4D1V58k1yEBcHcFOeDOGyx9Z9id7K2pgUFU1baFt/PLFsXMJ9kM6icobPYe3lqxfUL8bCsFOyanZ2IHLPAxVoA+aj0Te5S9PoqVABFYMhpr2Vy+G1BV4DaCx8tED3GPva1sYgkwCN2t3Kbq66QxjAEUwP6NwqSyhJM0ruu3ea0YK7MCqjAAfMsBGQpx1tFeMb8Xlt7QUTV1sGzDnfiA2w5k3umdORxr/KOwCVbkEHsVknaZ33n2uu0luzty+pdqJ2Oa/EmOh0kxaq/8lJjNwSlA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(316002)(83380400001)(2906002)(86362001)(4326008)(8676002)(66556008)(38100700002)(66476007)(66946007)(6506007)(508600001)(6666004)(8936002)(2616005)(1076003)(6916009)(6512007)(54906003)(6486002)(36756003)(5660300002)(26005)(186003)(82960400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CObqDp8PGQejnPocgsaLWzf/J444?= =?utf-8?q?0iVg9SNzSttl/8h30O2Gtsojh2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Xc/52KzTyF/TAC1hPofFFydYQ6KPG4g38TCwhtwU?= =?utf-8?q?WsygkKkzNMaCLVLSct//NkFup3mUoOoNOAlomJLDDnIyf+7KC3XZHSSteeuaoE6I3?= =?utf-8?q?qX+W+qpOrTADFTu6nRf7SDqcu/m/LvdSxZhDDrLD3I/5R+Uy7pBzel4Eg1O1ikaWW?= =?utf-8?q?rjDPFWW156ju81vqhflVHC41kdEA72PcLfIltlO1i206U5j/7stjFk3O9giscJddJ?= =?utf-8?q?u63HplZO2SI4zeAjm6RKkHrUXxi121pRmXyT0IB6gclAkiVp5iSLvAhE7JEXpn0uk?= =?utf-8?q?wQloHkuitWHfV9UyV9lw/2+YwJBnw/uXZ26RCKvxSue/TSyVQ5Nyp63zqDm/QuMMi?= =?utf-8?q?pQuzWIgYCPF7Zfn1FGBletv2VUoEzho+Qb1YHjtKMeQpeuo2RMdIwYkEuTkEH1r5e?= =?utf-8?q?AlJmwSs/OwUEjEku5vv/zkbXeievQx5+DwD3PjLYiwFIi6qvkgHQObUD1nx31Oavc?= =?utf-8?q?HTU10EqYwdgKq7vprnJQxNzInpLdMa2/AjZg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: c55975ce-dbad-4f10-758f-08da05a92e34 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2022 10:55:41.0866 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1WnZJ/rtvBDxwfmrTMcbCJIbutPbE68W3f5rxm2KkiZX/ZeeZk0q5OaVgYLQnw46xbpXKSGFx59Kp2frwFbSnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2725 X-OriginatorOrg: citrix.com Detect GNU and LLVM ld implementations. This is required for further patches that will introduce diverging behaviour depending on the linker implementation in use. Note that LLVM ld returns "compatible with GNU linkers" as part of the version string, so be on the safe side and use '^' to only match at the start of the line in case LLVM ever decides to change the text to use "compatible with GNU ld" instead. Signed-off-by: Roger Pau Monné Reviewed-by: Michal Orzel --- xen/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/Kconfig b/xen/Kconfig index d134397a0b..e8d5e70d46 100644 --- a/xen/Kconfig +++ b/xen/Kconfig @@ -23,6 +23,12 @@ config CLANG_VERSION int default $(shell,$(BASEDIR)/scripts/clang-version.sh $(CC)) +config LD_IS_GNU + def_bool $(success,$(LD) --version | head -n 1 | grep -q "^GNU ld") + +config LD_IS_LLVM + def_bool $(success,$(LD) --version | head -n 1 | grep -q "^LLD") + # -fvisibility=hidden reduces -fpic cost, if it's available config CC_HAS_VISIBILITY_ATTRIBUTE def_bool $(cc-option,-fvisibility=hidden)