From patchwork Mon Apr 4 10:40:43 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: 12800104 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 2FC44C433F5 for ; Mon, 4 Apr 2022 10:41:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.298243.508000 (Exim 4.92) (envelope-from ) id 1nbK9a-0006Ap-F4; Mon, 04 Apr 2022 10:41:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 298243.508000; Mon, 04 Apr 2022 10:41:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nbK9a-0006Ag-Bs; Mon, 04 Apr 2022 10:41:46 +0000 Received: by outflank-mailman (input) for mailman id 298243; Mon, 04 Apr 2022 10:41:45 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nbK9Z-00069z-4B for xen-devel@lists.xenproject.org; Mon, 04 Apr 2022 10:41:45 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id cfe990f5-b403-11ec-a405-831a346695d4; Mon, 04 Apr 2022 12:41:42 +0200 (CEST) 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: cfe990f5-b403-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1649068902; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=T3IUeHOAUwH5jnaWVMPVxz4AYqEm6BYtGI9yr57oZZE=; b=CxEzMaD2pLnzPUIgOja4HjndXuK4WjiSNaLMRzV7gD3j5xmWW6DUeaxk 2CuOSR4Sw+cwiEeKa4ldxyqC+F3+Iev/eDKxna0WpS3iE+skgLu4uG9jI NXHy2M3H/a2hErVUlrJuItygfKCM3jrrZnwoR4sD2Au1hCXvRBVA6pSeH s=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com X-SBRS: 5.1 X-MesageID: 67825388 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:1qSQLKIYmf8AP2L+FE+Rq5UlxSXFcZb7ZxGr2PjKsXjdYENS1jxSn DROXGuGPPncZ2DxLtl/Odzn8EgAuJbXzd9nSFRlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA148IMsdoUg7wbRh3tY02YHR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 NJNicCyYBU5BbPJk78HShRcQjolbKITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBNPsM44F/Glp0BnSDOo8QICFSKLPjTNd9Glv1poTRqaOD yYfQRlkMyziUjRPBmUOIrcSvNyj11bEbhQN/Tp5ooJ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Tb7dXsMg24F5VKpEdByj3gbpXXN WGNPuspcq+TGnqL0ww5gJUsZ+RtzUIb1q7q3E5y4KoO2M8pgE686MarPZv6kvouqhNDqWs3N 60QZiApIs+PvP+UpgNdtvpOfHHclAlYSi8Rl56cm6XXZ3uBRr22uvKCfMOlaWXRKA= X-IronPort-AV: E=Sophos;i="5.90,234,1643691600"; d="scan'208";a="67825388" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jFegkCdlijiqo34ncNwKI5oXINDJkEsts2JJyVvW98pqe2NawqCAExqLpPPIdrGVhL/2vIgMeTav9yWYMXTh2g5qLKIV7UV7JqzYn3TOSXAdW8R9x0kWPUfijMIrZ6DZy4VnBoJdtDHJIZxZou2rSDkDPm+3gsZRC2WQyJjZtrwSiXTzeGTER0KbKsH1AN1GA2nmQQ1A6SYsrlX5jmhLqlKCaRZLE3tenfvbLCGAKY8hJyPetnXNBGxrXAmu/BtnsFkdYPac3qRbnmeYehjQPcUzpv0pSHF7fL+5MTcfeV04pxTzcLZ8KLYU+6Wrwp0meb1lTO1BkoUQJmQ7RPGQJQ== 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=OyBbGihEUGhAAN4xDkKaoxTfhhCkzCzAGn/Ff7r7+o4=; b=TPdjwmq2KC/9WWMCwZjdT7KfvXfz/1JzpKuaqv2duImQKy+7Uyn/634bK+rmZ1Ml7EC+sHvYvOmajWBo512S6P/0V43EFrHh2CibYDD1fLXQzvfdb+mAIXQgay4fZ6KL+PjKGLU7e8l447deAv5TIH4FOUBVrTrSOs9zAXpxZvgp6QF5yHw6fuf69a1N16Xeal0hTC9sx8atxmI5pu7S2+hxrR8USFe4MLaAkro5+yqCJ0qtAYdzFCfghZcl4bjDsJzeZBNIP7eHl2FAfQGM9PFFlYG99zZP1n9KhuLijPXi7vrC3TezYU/msfrmjykc1S90btjtpskCiLnqQ4aDtw== 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=OyBbGihEUGhAAN4xDkKaoxTfhhCkzCzAGn/Ff7r7+o4=; b=gdP4XWAj5gKaMoSJRdsZY6Rn7xOkWglVsj+Jy0l+E8uAwGsCP2EjtnrV1AjimEzb1csrnIQ6utW8nvW1g759yMAj7uGk8Q0aNCQaC3UycH0o2j1gJmNwoh5R2SoWClzvF8QRR/6a+1pKC+I9m3D6WB1Ln99n/HMg619c4/J6xGQ= From: Roger Pau Monne To: CC: Roger Pau Monne , Wei Liu , Anthony PERARD Subject: [PATCH v2 1/2] tools/firmware: fix setting of fcf-protection=none Date: Mon, 4 Apr 2022 12:40:43 +0200 Message-ID: <20220404104044.37652-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220404104044.37652-1-roger.pau@citrix.com> References: <20220404104044.37652-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P123CA0125.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:192::22) 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: af3af710-203d-4ec2-ffbc-08da1627af39 X-MS-TrafficTypeDiagnostic: MN2PR03MB4669: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: gcB+Dd4si7tr1z1e3wMAhJ70hzi3vDMxwOtZaHeHGIkA4lrWLnseRfGWHh1EidvcNq7343KLUQgujj1/BOSFgSFbYJf/lgi4DfABFyIR0DvIDt2hN1TahkSeIWQd9fxV/hxa/bL1qAr+fSNd0Pq4z1pWyM9WlJ/VNxIMeIzuFiPCHc7GXTmJy8XN/gACoaBuZ5Ah9OtjtkiRVeW/PLctgZJNTKcz20iqTT0UgnIRnGtZRkdGEyJg1l8aRDQ7Uy4vNeHNvCZqpnFrlKXubVVbZ2LL4UBmkRyFg6ayIno/zHKHGGvhRIM4UW383jwASkTJRPZmWxUPgUNX78b4/tiHdP9wqp65BbJFPuUmPzUOY1dOx08VtkBvzRifIlmXjOSvIQoXw/5OOoNA4fvbr/Ik/6AzSUlZvV+zco7rnkcJYjBpBdXXIaebdfgRoy6pRrXoayZGuBmbCIxHi1m5bzn+vuxNDqr79G09nzUqDQKxx1YKrkTx7kzfxbNfgCV073vpP5tdmCVsnadIWB8P1j2zY5IC/LMpVF+Pi5tZrZSjCwDT8FJGkG87Fwtb4viVGM7bmXyAaqaPakPRd6lVNa4NBgC50Rctqigzi7gPx1oHPk9BaLFZnyqxgjjfFkYu4bV/N20Xd0fqZb09d8GAXgIjbQ== 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)(6486002)(36756003)(2906002)(6512007)(66556008)(8676002)(4326008)(38100700002)(54906003)(508600001)(5660300002)(66946007)(66476007)(316002)(6916009)(6506007)(107886003)(6666004)(8936002)(1076003)(86362001)(2616005)(83380400001)(186003)(26005)(82960400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Ov/X+EgVqz5Q7PqwAyLaUFWGcE3A?= =?utf-8?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fc63QdMDYw50QkWGYEFqmS4z1bqDd5dsJlH2w5uQpuBcCb2j3STv?= =?utf-8?q?85k42WMhXSrdQ3b5KyCogKe28diQ/VlQkSd4tBpcggToBA/3kbE7ivT1I3QQsUIUE?= =?utf-8?q?KySU64mqAt06YmFO5R5gQuhDM1C6fk11jpDa9nddFbk+s0atK7tpBien7Bz3RAitV?= =?utf-8?q?yRuqjmI32yEBvuY8Ev8ZOQUbw7nh6pGlgoAWkBJ7s5YvRtsSuwdSNos9rvXkFKnsk?= =?utf-8?q?sKml1UouDaj4sc6tcIh7B4h1n9j0wf4YbLZap8JL2XNllRZft8IjuwdVg5D7mZxCf?= =?utf-8?q?8KqEyJqwHqjUBiGdFjM1yfWx/sEGXaE+vcHIIcAsdNtq0LYgWKS7wXo2hlQEuyVOy?= =?utf-8?q?Oy4NhtjEjCY5e11ibGQ9zqhXm0dgmujTCFMJbGyISZby54aJ59+Vnpp4iDm+dHoVA?= =?utf-8?q?PKU6nuGs6zpRtwPLYQ6RvXCS6a8/ASxPLZUXbLVzniYIjUJtHA22HpP5MsFjINHql?= =?utf-8?q?YrJ5A+SnqtftTLeb43ukpfxYnG3is1JfGmzKG3ainNWknAvxbKV4fcGcUB2wZGg6N?= =?utf-8?q?NGdGk1Ney280ON5IpJzqs3xb6/q5oKEHRud+cjQfKf2CQr4JAuIwgttHk14508dUl?= =?utf-8?q?wFB1akszNlXmsOcQ2YkgSLGs5AcDkGzUt/E1FnqRiPMXaMtDKdM/mKUcNrbJsc9zb?= =?utf-8?q?9kcPgVV6jvOyXnkh5rKRMLcQJjtuRWdhQO7VPmoZe1jcSw33XlwykuDrTRsZZ8zm4?= =?utf-8?q?zMMP2azsWQutdnWfDISio9ilTVol11qK/QzSv47sDNqNf7RkcTi14=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: af3af710-203d-4ec2-ffbc-08da1627af39 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2022 10:41:32.7257 (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: QJc3ASUxZoHqCTH1k+lHgtxityfP0FsoAUKpaGprDT+HRHNjqCGHWNF96zfcdWgvm5Oy0c0N6stY7N7Znuz1LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR03MB4669 X-OriginatorOrg: citrix.com Setting the fcf-protection=none option in EMBEDDED_EXTRA_CFLAGS in the Makefile doesn't get it propagated to the subdirectories, so instead set the flag in firmware/Rules.mk, like it's done for other compiler flags. Fixes: 3667f7f8f7 ('x86: Introduce support for CET-IBT') Signed-off-by: Roger Pau Monné Reviewed-by: Anthony PERARD --- Changes since v1: - Add the option directly to CFLAGS using cc-option-add. --- tools/firmware/Makefile | 2 -- tools/firmware/Rules.mk | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile index 53ed4f161e..345037b93b 100644 --- a/tools/firmware/Makefile +++ b/tools/firmware/Makefile @@ -6,8 +6,6 @@ TARGET := hvmloader/hvmloader INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR) DEBG_DIR := $(DESTDIR)$(DEBUG_DIR)$(XENFIRMWAREDIR) -EMBEDDED_EXTRA_CFLAGS += -fcf-protection=none - SUBDIRS-y := SUBDIRS-$(CONFIG_OVMF) += ovmf-dir SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk index 9f78a7dec9..c227fe2524 100644 --- a/tools/firmware/Rules.mk +++ b/tools/firmware/Rules.mk @@ -15,6 +15,8 @@ CFLAGS += -Werror $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-option-add,CFLAGS,CC,-fcf-protection=none) + # Extra CFLAGS suitable for an embedded type of environment. CFLAGS += -ffreestanding -msoft-float From patchwork Mon Apr 4 10:40:44 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: 12800105 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 B570FC433EF for ; Mon, 4 Apr 2022 10:41:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.298244.508012 (Exim 4.92) (envelope-from ) id 1nbK9b-0006RN-OI; Mon, 04 Apr 2022 10:41:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 298244.508012; Mon, 04 Apr 2022 10:41:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nbK9b-0006R1-KZ; Mon, 04 Apr 2022 10:41:47 +0000 Received: by outflank-mailman (input) for mailman id 298244; Mon, 04 Apr 2022 10:41:46 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nbK9Z-00069z-St for xen-devel@lists.xenproject.org; Mon, 04 Apr 2022 10:41:46 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d0cd22be-b403-11ec-a405-831a346695d4; Mon, 04 Apr 2022 12:41:43 +0200 (CEST) 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: d0cd22be-b403-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1649068903; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=o1g3NtJRr/7LMB+Lp/Uv15Zh/4bOG2IVjPXu7yZ4VpI=; b=bs9iEoZuO3OphIcoltzx+pPyn3SSKUnUkRsipULGSimNe/YHj4BioXeB UUyL8qv+Kj5ECeftS39xJn4xa5zCJQRaOOvo4Ft196E08z7CHksIdOY7W Seqvby9ZS9NvMMHRbC5/dSp0G7Oded2N5wkgx8/4vZ4hNF7sm3A8N4Mzm g=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com X-SBRS: 5.1 X-MesageID: 67942405 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:EI5KJ69JniOtPiSklmR2DrUDv36TJUtcMsCJ2f8bNWPcYEJGY0x3y GsZXGqHb/2ONjf8fNEjOt60oU8EvseEz982S1M6rHg8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ54f5fs7Rh2NQw3YDlW1rlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCncXqYAl4PIOTou4mYRdxEC90Z4pr/6CSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex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an'208";a="67942405" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AOJPakCu2Bj0j+8C0O1aJ+vPtqQvyeMsPi+btR7FlwG2eZR2awSuUKjS27rX73fXPGAwXhgQGLHM1UhDkz3HIkXjabrx5v4f72T35seklbvefWrCfo2AEldCBWB4l+pd+aLo95b/jeekIIDe9eFL4/uyfIOIpFcz8GsIz9rSJpPI94ZDOSztri4mSygJ2CugoKW0dYuRU89bwGObMLxXOgtXWekVVM6kKSUG29LiU4pPDRNCf9n7VhYkA3+1J6GEiGGSDHrMQRjEp/0vobaxNZ1cvqsXhYHMnfX6JyGQFPHiR4uJ7PjssmbWbDx0YdVlIdO8NGX6iM5+2cMVOU2hWA== 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=TrO0NN/XdxEk/kybKpxTDcn096Mdh/YZekVSRdkq44c=; b=DVp4izW/EOEMmDayCcfwOQvhEF074lHa6eEKT70LHJzjCVolk0sFO9sAdPOM/cym66OJ99Mp1RH91SI+W3M6H7UoSebv0W6MqSR4J2EllLf7HW2q1S4D/pEgM4fDd5KLGXw2jdr+a/XCgJRD6GUxkpZkrByLtk/xzYi7kT9GSCaPcT6S+2+zKdrDG69npJlfWmzt1+wv9wE4Emglp4NlokTIUkjZxJoM2hCKDn7VVpGsHwVUY59qvI7EAFf1u7PjWlCsnREr89Nzg+o3j11xKcXKUQP4HUzbFt21oUIqHwpgXYUIJYn55Hv6Z2toInK6epFpoTuqYLbimpwrxsUBPA== 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=TrO0NN/XdxEk/kybKpxTDcn096Mdh/YZekVSRdkq44c=; b=gri2DVB7XH/wNkcO+ejUgwI+zJWzO52KiP0bMVn83inQw3K3RAaHdmgBTiDmWJvbFPXRqLMfwAanlaBmovpzh85BFCghDRxL2lmQGGQjHU8Du/VUma8U9GvtUX15GGfvEQ6iMXij9PzqPNEm/MYL+NmtC6YQ1Q8EoCsm3MtkPIU= From: Roger Pau Monne To: CC: Roger Pau Monne , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Anthony PERARD Subject: [PATCH v2 2/2] tools/firmware: do not add a .note.gnu.property section Date: Mon, 4 Apr 2022 12:40:44 +0200 Message-ID: <20220404104044.37652-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220404104044.37652-1-roger.pau@citrix.com> References: <20220404104044.37652-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P123CA0219.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::8) 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: 9e165241-ae3f-4fae-7a80-08da1627b20c X-MS-TrafficTypeDiagnostic: MN2PR03MB4669: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: mWVignJRv1EZsK1YZ0gnQdC8wMNEn3j/Q2MoTWHmjBhdbTYMiw4/OiQi/J1tWeRk2n7qveDMgIJCoaxwHRPDhRgEgpVfRdG7MuqwXHB1IjpI7uIqBd2D6eYxYBqzBgxohNHqJ0lxy8EX6xCaU9nIRPI1UlcboOnKIXVM2+DnQuZ0Lx3IGUjcu76aylwoFQfKJttMlY0aOlYQ6/waA3FAm3p2z4bj7pumeAfdZwf2rcFQdjvuJdPq68zwJe8/vNdUWnWCHmVexHL0/wHqNYsF9Yu8HQmcR70up79CCPcTG53WK1AsDQbMCFZemY1wNMyEvYqYiL6S2OgRTM2///uBpDTEBRUBlI22fhAppmPidB1pm3vyfSLaelVJpHelezKhO2TTNQjdL4Dd1XEj5NQfUR5dyIZWYJbnx+3gnse/e87No2VvOBpJE38HShwd00dPB2U/xRjt7igWyaO95Jo5YdtaIAVPfoq/Oj+0gAyI1BattCzGw88+ZdUZvwAbN/E8w4otTIbIo0UkZRHww00g/rfx5ng+iViR3KwD+20t0bOmjJYqs38kOU0c8P7xINyIZVrJhD3uv+fp8CcJZm4cGTqFyZnFjuJkwfx4ea9687vuzP/IzUoUomWRSNAErsJOFDgH5LNH9Ro0PLLY9lINw43nj284ArftpzsC1qiuveP/MYuTYTSlngTMnCQoVsVYwyJqCM5DryvDUvHbIpUrXQ== 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)(6486002)(36756003)(2906002)(6512007)(66556008)(8676002)(4326008)(38100700002)(54906003)(508600001)(5660300002)(66946007)(66476007)(316002)(6916009)(6506007)(107886003)(6666004)(8936002)(1076003)(86362001)(2616005)(83380400001)(186003)(26005)(82960400001)(142923001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2Nf1pbp8w0Io1XIo+R/jgWG4m1bA?= =?utf-8?q?ofTBPv5rSPk7pcPaP4ftzVIEMK8HzkWYstWyyzIPQYcvXO/cHGXyJF22XWUsywpRR?= =?utf-8?q?3Qjyv7KNlPWSJRZmgY7IjKEODLnsLXedxqs+tji0G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xC8wnjoWP6CHGlu++OUT?= =?utf-8?q?nG9N1BOVFE2QkyfX4PbZ/in97MqeHwGVBR0obxRMkiaYRZIlYB3qcLYeNHlDKCFjK?= =?utf-8?q?FvQnFxcUMnuS8JNVgrnnPZOTJaaAMJD2ZhGIDioyf56dDZHMTCBbgXjIQaD1owZD0?= =?utf-8?q?Dzq8YVorC2IYEqJxbszOLVHw87A9BnQDsjrZr+XLWMp3ODe9FwuQaFSup05cIpfuQ?= =?utf-8?q?GpoziLk5XHv9gwzXjFAZkxTwYljGu5fyGmvlb3CjosxSsyH590gbn2NixF1MeyvQt?= =?utf-8?q?YSs9S+TVRvC+fC70dasPoTzsqrw3Ni+yLqqvav2a9/P8W7Htf/1dMe9aOxJnbfReU?= =?utf-8?q?jKHZsrcWlZnB2zNTmUswsnfH1eoMFbk/9AGAyWiSXhSi22b5NwABHeKAOGvGyKuWN?= =?utf-8?q?yJVNyXukiryBzWASKeJhQHINk0evtIZwBYWmkShymzmPl51V0okttHmypS0zZR+KT?= =?utf-8?q?s4yIe6kZ8qjmNgiLK1VbnXTWX/YuC4pvEvA6Fnk5uxJHRG2YffEFD9E8uFyln9AT1?= =?utf-8?q?Pyub/OP4bNXUbgOjzUArnYI4yMBvivmX5WQWTgQSIV2ltgpC8J1PzrQ2vWGIGSXJM?= =?utf-8?q?0Zlt2Bvc+A3rsZqsD4RFeaZYPbmrmqW7T29RvO5nP/iBIGgvmkP7W5kpQE7reXKhn?= =?utf-8?q?zI4QPX/0TbUnGnDdRH5FoALoGN21LOGlIFRAWqpCTsHbfl7ezr7kE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9e165241-ae3f-4fae-7a80-08da1627b20c X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2022 10:41:37.4606 (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: YVThAmDEYlrplitSsNTNHgagvpsPPjLRDZnkrgqQS7z5dL3sozZq6krIuS0fiLTi6qdvx/8lhOJQS+BA8w4FQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR03MB4669 X-OriginatorOrg: citrix.com Prevent the assembler from creating a .note.gnu.property section on the output objects, as it's not useful for firmware related binaries, and breaks the resulting rombios image. This requires modifying the cc-option Makefile macro so it can test assembler options (by replacing the usage of the -S flag with -c) and also stripping the -Wa, prefix if present when checking for the test output. Signed-off-by: Roger Pau Monné Acked-by: Anthony PERARD --- Changes since v1: - Add the option to CFLAGS. --- Config.mk | 2 +- tools/firmware/Rules.mk | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index f56f7dc334..82832945e5 100644 --- a/Config.mk +++ b/Config.mk @@ -91,7 +91,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(prefix)" # # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586) cc-option = $(shell if test -z "`echo 'void*p=1;' | \ - $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \ + $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep -- $(2:-Wa$(comma)%=%) -`"; \ then echo "$(2)"; else echo "$(3)"; fi ;) # cc-option-add: Add an option to compilation flags, but only if supported. diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk index c227fe2524..278cca01e4 100644 --- a/tools/firmware/Rules.mk +++ b/tools/firmware/Rules.mk @@ -17,6 +17,10 @@ $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-fcf-protection=none) +# Do not add the .note.gnu.property section to any of the firmware objects: it +# breaks the rombios binary and is not useful for firmware anyway. +$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)-mx86-used-note=no) + # Extra CFLAGS suitable for an embedded type of environment. CFLAGS += -ffreestanding -msoft-float