From nobody Mon Feb 9 21:24:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1648026644; cv=none; d=zohomail.com; s=zohoarc; b=dLuIxA/C8fOISCxlqEIr6Jpnwt/21pmKGk9kfq/tR1KRSC0xGjQHSWAUqKDEyJpcJHNOXZ50OMLcTayXMhqWIkU3mbMhSd8K/1dyOB0h8aTDJVS0nXr2OaeiaI8324AoyKqGwVT89xo1C8sH+nc1VUWSuu2AZMc/GT+9gyVgz1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648026644; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Wn0wAuNZ1fZs2kBz84E3oz947GK9dHWSMOnXkU3gI4o=; b=LBTRyFt1UHXW6syyug/zvcQqpYArjWs9mJ2k0yVixHIERDsHZPC50BhyyoAsb5ER0KF5VCjp6F9o3C305xQYQhJG+mJZVvh6eFkuqMiua35xetpPl8w7IatPOZyergEktXqPRhqIyP+G8VMmCcJystZBem+EJApB3FKGwFdfJlo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648026644385223.92489144145122; Wed, 23 Mar 2022 02:10:44 -0700 (PDT) Received: from localhost ([::1]:35782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWx0s-00078J-RV for importer@patchew.org; Wed, 23 Mar 2022 05:10:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWwxg-0005on-4N for qemu-devel@nongnu.org; Wed, 23 Mar 2022 05:07:24 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:41760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWwxd-0008AN-VH for qemu-devel@nongnu.org; Wed, 23 Mar 2022 05:07:23 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 7CBCD3F1B6 for ; Wed, 23 Mar 2022 09:07:17 +0000 (UTC) Received: by mail-ed1-f70.google.com with SMTP id x5-20020a50ba85000000b00418e8ce90ffso642614ede.14 for ; Wed, 23 Mar 2022 02:07:17 -0700 (PDT) Received: from localhost.localdomain (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id m17-20020a17090672d100b006df98bb199dsm7917103ejl.129.2022.03.23.02.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 02:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1648026437; bh=Wn0wAuNZ1fZs2kBz84E3oz947GK9dHWSMOnXkU3gI4o=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=RBar9ZflIfahmRaptZpUIX6hhZ/0nRT7JAYk6RagImyPWYwvqKl/FnKdxamt+gLXl JZZYaCBpHWXiU+E9y6cTcdeB5kV54mBrRQwLx9PLCmJ8CDx36P2fE4X7NFT7HeC0Yk uvmr8WosK0caTsPyLMzlpSiPb78YyKX1MbxX4nJOHKqK1JNnkhC7ANcXfmRYlRLRDB 3kMYBJvMgQnpX0SuVdIDX30fxTzRaafBH5uzOcglVNgVp1zFoIvFX7HMVzPQWryFbj KojAJEgftd6+NLXa9OFHnvTE/S114sIgA47zU9xBelqBLzwFuWVCdv1oJS5T8odF6F IQvzPo34R+lZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wn0wAuNZ1fZs2kBz84E3oz947GK9dHWSMOnXkU3gI4o=; b=zMxa/rY0U4qrNIh5oxySRp6vDH0SLt1E27FJQDdwukaPz5l+1VeS7hZZyS7CdhugWk 0ZsL8kGATqUPCy4fw+hivAnXOEfN67vT7xhEjPV5P7a4KYOp6T1LTNKlKE0zlKlXyQtg b84/QjwIOfqEVp7q4kNwI8FwWOKv4iK99bNxrVIgT9ah/x0tW6E2jNJEgTO/3bRYdF4d /uECzoaf0vDlogYIBGi/QyH/voB2vkYspVjogGPucTzpblve0WWS9HDtVF9WwbPQg4Iq UO0t+HQMU7n5v2OxOVzpXqxxfrqXitxV36ZvNmY/7NHhiGBs2Eoc0OVc1QHMAbW3HBuF Uf8A== X-Gm-Message-State: AOAM531VIQqgAR3DytNmg64j7LOC0E1WKAD1Xi6nTg3+5g7S+8ovSE7F mnX6P+X2hOStYSe1n83Bol6ktqTydj7XyZ7n4kJE5mXCWAszC8KIjR9Cknu+/edCGP4pa5yzM2g /5qeA8w3GdFvScQh0dEhKJeo+EGetN1LR X-Received: by 2002:a17:906:a398:b0:6ce:71b:deff with SMTP id k24-20020a170906a39800b006ce071bdeffmr30435594ejz.204.1648026436622; Wed, 23 Mar 2022 02:07:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSNaJM3pOmXS9oGIi2yJdReRSdSgIPE/2seD6VZzaOSi9Eu7YwROCPqfm9xQsBmSR+N+NlwQ== X-Received: by 2002:a17:906:a398:b0:6ce:71b:deff with SMTP id k24-20020a170906a39800b006ce071bdeffmr30435566ejz.204.1648026436292; Wed, 23 Mar 2022 02:07:16 -0700 (PDT) From: christian.ehrhardt@canonical.com To: qemu-devel Subject: [PATCH] build: disable fcf-protection on -march=486 -m16 Date: Wed, 23 Mar 2022 10:07:13 +0100 Message-Id: <20220323090713.1002588-1-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.125.188.122; envelope-from=christian.ehrhardt@canonical.com; helo=smtp-relay-internal-0.canonical.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Christian Ehrhardt Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @canonical.com) X-ZM-MESSAGEID: 1648026646418100001 From: Christian Ehrhardt Some of the roms build with -march=3Di486 -m16 which is incompatible with -fcf-protection. That in turn is can be set by default, for example in Ubuntu [1]. That causes: cc1: error: =E2=80=98-fcf-protection=E2=80=99 is not compatible with this = target This won't work on -march=3Di486 -m16 and no matter if set or not we can override it to "none" if the option is known to the compiler to be able to build reliably. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/889 [1]: https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-fcf-protection Signed-off-by: Christian Ehrhardt Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- pc-bios/optionrom/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index 5d55d25acc..f1ef898073 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -14,6 +14,10 @@ cc-option =3D $(if $(shell $(CC) $1 -c -o /dev/null -xc = /dev/null >/dev/null 2>&1 =20 override CFLAGS +=3D -march=3Di486 -Wall =20 +# If -fcf-protection is enabled in flags or compiler defaults that will +# conflict with -march=3Di486 +override CFLAGS +=3D $(call cc-option, -fcf-protection=3Dnone) + # Flags for dependency generation override CPPFLAGS +=3D -MMD -MP -MT $@ -MF $(@D)/$(*F).d =20 --=20 2.35.1