From nobody Fri May 17 11:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619977806; cv=none; d=zohomail.com; s=zohoarc; b=I7qjP21SMA1MLF4z/N+do9la1fGVhpR5aI/N4Mhe73B+XXPKfKnQw5/OIHkHd1AbspNnH/hispA/bCEUIytRxVjsQaFZ4AQxzIx3SaEigv7+x92A4y2nIIg3AkyrdK5STKwdW3Gkd2Sf/lOa6SnTIAc7b6jq7lGP1SFbsFbglvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619977806; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cIenFbRhZMpK6YdxR8zf9g5ensesv34yiFjAOFUW3Ko=; b=cH+/IBRkvMJ+xgOgbbph3j04BziI7BMluq+hlzeHK/nN454S8VUoKjDIsuwbThoCB/rXR+flk60WCnVu6ZrkjG+lbTgaBY7XKKQtaIOUm/OQ9X/yb6fk2B+OvDPTzDs7/P1oLq1iObo2ZbyPJCQrQgewDh9bfPi5DAdwtKnP9n8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1619977806452528.9248994490781; Sun, 2 May 2021 10:50:06 -0700 (PDT) Received: from localhost ([::1]:43366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldGEH-0001Sb-9J for importer@patchew.org; Sun, 02 May 2021 13:50:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD2-00008O-4y for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53886) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD0-0000RR-JW for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:47 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-0TZ-St5IMuC_-ozLjZ6gCw-1; Sun, 02 May 2021 13:48:42 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7C68218397BB; Sun, 2 May 2021 17:48:41 +0000 (UTC) Received: from thuth.com (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40963189B6; Sun, 2 May 2021 17:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619977726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cIenFbRhZMpK6YdxR8zf9g5ensesv34yiFjAOFUW3Ko=; b=iSG0XhMIUpbeItWEGvby7/yxDJ2zCmhy2Bs8pTwc/hdXG/6g7ktBQlHbr9Vwy63QIT4C0Y NMm3Qh6eLT2HI63r7Gma0HbCQqMwwbZX6fYtOqqtQ7GMPWx4lfYYyv9lg+obLs0NXzZHFl lwvAl4Vau6huKBEqgbxCFXUPkwgNyUs= X-MC-Unique: 0TZ-St5IMuC_-ozLjZ6gCw-1 From: Thomas Huth To: qemu-s390x@nongnu.org, Christian Borntraeger Subject: [PATCH 1/4] pc-bios/s390-ccw: Silence warning from Clang by marking panic() as noreturn Date: Sun, 2 May 2021 19:48:33 +0200 Message-Id: <20210502174836.838816-2-thuth@redhat.com> In-Reply-To: <20210502174836.838816-1-thuth@redhat.com> References: <20210502174836.838816-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.697, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When compiling the s390-ccw bios with Clang, the compiler emits a warning: pc-bios/s390-ccw/main.c:210:5: warning: variable 'found' is used uninitial= ized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ pc-bios/s390-ccw/main.c:214:16: note: uninitialized use occurs here IPL_assert(found, "Boot device not found\n"); ^~~~~ It's a false positive, it only happens because Clang is not smart enough to see that the panic() function in the "default:" case can never return. Anyway, let's explicitely mark panic() with "noreturn" to shut up the warning. Signed-off-by: Thomas Huth Reviewed-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- pc-bios/s390-ccw/s390-ccw.h | 1 + 1 file changed, 1 insertion(+) diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h index 6cd92669e9..79db69ff54 100644 --- a/pc-bios/s390-ccw/s390-ccw.h +++ b/pc-bios/s390-ccw/s390-ccw.h @@ -89,6 +89,7 @@ bool menu_is_enabled_enum(void); =20 #define MAX_BOOT_ENTRIES 31 =20 +__attribute__ ((__noreturn__)) static inline void panic(const char *string) { sclp_print(string); --=20 2.27.0 From nobody Fri May 17 11:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619977900; cv=none; d=zohomail.com; s=zohoarc; b=Z9f7Ob3hmkHF4EXPAr4GR6S1QknLGXI24YAdKLDsYH7pEPVWmuKQ7Keoio31edAyMNg+ewNC+yu+A8IIqojQ/IqoAxOoL7zp+m0GsJIeOsETgNBQMl8lyQBDg+gLxaB1asF79KLZKInMUCQ7YdjWM64yVEkLtK2reJSSlU9FaF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619977900; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LVk+fG4w5nyrUJ4lzn/Q6WMwvBj9Qk8SmhJuacim5+I=; b=HsVAMwi8UdbuOJkgUyUpZKJjo5DWinPKZ8/caFcHpO/HYgnkmwXeRY3yT++YvcGTBbSro1Q6AIrROaXgaeJgD7NZvT8Kr7X/IQlpcnV2fZ3IbhpDEyYGjyD05avJyANAn0rycs2lf+0OkTeulc4L+t92TAvz6JwY5lerHrGYt/c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1619977900627310.9288611692217; Sun, 2 May 2021 10:51:40 -0700 (PDT) Received: from localhost ([::1]:49434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldGFn-0003uL-Me for importer@patchew.org; Sun, 02 May 2021 13:51:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD2-00008e-Sa for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD1-0000S2-En for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:48 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-216-jODCFgMMPX2fhHBHeAY4gg-1; Sun, 02 May 2021 13:48:44 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 257DD10066E6; Sun, 2 May 2021 17:48:43 +0000 (UTC) Received: from thuth.com (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBB3A189B6; Sun, 2 May 2021 17:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619977726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LVk+fG4w5nyrUJ4lzn/Q6WMwvBj9Qk8SmhJuacim5+I=; b=JA5dYp/NB5tvK2CUddXvx8VKyJOpRQCrIJKLRaKsoAIPo5wzhaMu++mJranTAL2mEcDqCD 4BmXewg0EEVMVQo4tdmezjnFaIAbssMPRn1p2y1Qm9Ysb0OwIROZtt5ozAFCae0cL61VPp yPtxUrjauDtbT2NCQJYopdlJpA/W+SQ= X-MC-Unique: jODCFgMMPX2fhHBHeAY4gg-1 From: Thomas Huth To: qemu-s390x@nongnu.org, Christian Borntraeger Subject: [PATCH 2/4] pc-bios/s390-ccw: Fix the cc-option macro in the Makefile Date: Sun, 2 May 2021 19:48:34 +0200 Message-Id: <20210502174836.838816-3-thuth@redhat.com> In-Reply-To: <20210502174836.838816-1-thuth@redhat.com> References: <20210502174836.838816-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.697, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The cc-option macro is not doing what it should - compared with the original from the rules.mak file that got removed with commit 660f793093 ("Makefile: inline the relevant parts of rules.mak"), the arguments got changed and thus the macro is rather doubling the QEMU_CFLAGS than adding the flag that should be tested. Fixes: 22fb2ab096 ("pc-bios/s390-ccw: do not use rules.mak") Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 29fd9019b8..f0fe84c9eb 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -6,8 +6,8 @@ include ../../config-host.mak CFLAGS =3D -O2 -g =20 quiet-command =3D $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1= , @$1)) -cc-option =3D $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null > /dev/n= ull \ - 2>&1 && echo OK), $1, $2) +cc-option =3D $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \ + >/dev/null 2>&1 && echo OK),$2,$3) =20 VPATH_SUFFIXES =3D %.c %.h %.S %.m %.mak %.sh %.rc Kconfig% %.json.in set-vpath =3D $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(P= ATTERN) $1))) --=20 2.27.0 From nobody Fri May 17 11:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619977897; cv=none; d=zohomail.com; s=zohoarc; b=Ellr8yEELZSbDtkNlD/f8M7VEldYfSPlgvMC9KTu8qir2+pHAWpmdWHqqRKJVj6di+AVB7oSmEONrZMXf62En6HMhPvXEYw/xiitxurdbSbvTD4TpXHGMNHYSWsYQ/JMZN92h007Uy9cuw4ky417ZtRJEoheC7HSykMjul47J+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619977897; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t65MeeZAzptBIeI41RhzkY73pzinSJ6z0ZbTAjGpghw=; b=c0DMn/uEPV9RhlEflEJdE0+iLntYTrSfqG5aqKHs21G74pkUug3p2yipiy7SCl8pL33iscVGxP22SDz/FgfWwOPunHt5nv5538wpY45XW+MpqPoh+YUZMFThNVX/MQUBhj9/1J+QIqcODCd5c8ibVtWLWBeo8jLfCIh9PkcMCzY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1619977897646672.442754202423; Sun, 2 May 2021 10:51:37 -0700 (PDT) Received: from localhost ([::1]:49328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldGFk-0003rj-L7 for importer@patchew.org; Sun, 02 May 2021 13:51:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD7-0000Ie-8g for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD4-0000TP-78 for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:52 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-viya5MnoPjqtF2BosMzBYg-1; Sun, 02 May 2021 13:48:45 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C065250200; Sun, 2 May 2021 17:48:44 +0000 (UTC) Received: from thuth.com (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8351250F70; Sun, 2 May 2021 17:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619977729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t65MeeZAzptBIeI41RhzkY73pzinSJ6z0ZbTAjGpghw=; b=d5FW6KiebO6XYaA3ZmnS9lg2ryvO4n39G5JXYGHrhlXCctCQfpEShdf0quzo6BFKkfsdz7 DXgFcPrQRxmIYQd1ZF35bR5GWasYsMKVWSq7UcTmlToftae1GVM+xX/qCyxEzozLrtzJQ7 AlxMmdEiOar7Zb9WfP/OmlQr0ydmhZQ= X-MC-Unique: viya5MnoPjqtF2BosMzBYg-1 From: Thomas Huth To: qemu-s390x@nongnu.org, Christian Borntraeger Subject: [PATCH 3/4] pc-bios/s390-ccw: Silence GCC 11 stringop-overflow warning Date: Sun, 2 May 2021 19:48:35 +0200 Message-Id: <20210502174836.838816-4-thuth@redhat.com> In-Reply-To: <20210502174836.838816-1-thuth@redhat.com> References: <20210502174836.838816-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.697, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 When building on Fedora 34 (gcc version 11.0.0 20210210) we get: In file included from pc-bios/s390-ccw/main.c:11: In function =E2=80=98memset=E2=80=99, inlined from =E2=80=98boot_setup=E2=80=99 at pc-bios/s390-ccw/main.c:= 185:5, inlined from =E2=80=98main=E2=80=99 at pc-bios/s390-ccw/main.c:288:5: pc-bios/s390-ccw/libc.h:28:14: warning: writing 1 byte into a region of s= ize 0 [-Wstringop-overflow=3D] 28 | p[i] =3D c; | ~~~~~^~~ The offending code is: memset((char *)S390EP, 0, 6); where S390EP is a const address: #define S390EP 0x10008 The compiler doesn't now how big that pointed area is, so assume its length is zero. This has been reported as BZ#99578 to GCC: "gcc-11 -Warray-bounds or -Wstringop-overread warning when accessing a pointer from integer literal" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99578 As this warning does us more harm than good in the BIOS code (where lot of direct accesses to low memory are done), silence this warning for all BIOS objects. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210422145911.2513980-1-philmd@redhat.com> Acked-by: Christian Borntraeger [thuth: Use the pre-existing cc-option macro instead of adding a new one] Signed-off-by: Thomas Huth Reviewed-by: Cornelia Huck --- pc-bios/s390-ccw/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index f0fe84c9eb..83fb1afb73 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -30,6 +30,7 @@ OBJECTS =3D start.o main.o bootmap.o jump2ipl.o sclp.o me= nu.o \ virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o =20 QEMU_CFLAGS :=3D -Wall $(filter -W%, $(QEMU_CFLAGS)) +QEMU_CFLAGS +=3D $(call cc-option,-Werror $(QEMU_CFLAGS),-Wno-stringop-ove= rflow) QEMU_CFLAGS +=3D -ffreestanding -fno-delete-null-pointer-checks -fno-commo= n -fPIE QEMU_CFLAGS +=3D -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tab= les QEMU_CFLAGS +=3D $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) --=20 2.27.0 From nobody Fri May 17 11:05:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619977809; cv=none; d=zohomail.com; s=zohoarc; b=mVHtn6BedN/+X/+VZY6ltPu53Rl7696v08Sm9ktXXtkqFa323I1fw1u/t6CFUgxWvNy78AgUPz8Jy1+oPv0vEFcx4cLHa7+Y+a7bbOf10UStZbMYX36y6SbcU0m0PdY99eDIfAJzFuIVmRVE+G7F9F6qTBYk79IyhlHtftfwukc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619977809; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BTzB/niq2+KOl6V7uzrJ3GhYtimVeLGPZmrQmgIikm8=; b=nzcnXG+og52vfY6PGoG4zEvOdMz2qQbsEupo7l0z/ug/al1x6lseDnQTXcmhqfA3KDGebMWiJclj7afTyc9Rs/m3v7radbYG1vSgS3/fgDMfjmdb7/FRXQjOPcWL3WeaUMK+ER8f3z2g+4/MRWEhT+yWQfSurv4SxumieGohB7Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1619977809208995.2488026584559; Sun, 2 May 2021 10:50:09 -0700 (PDT) Received: from localhost ([::1]:43546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldGEJ-0001Wz-Ut for importer@patchew.org; Sun, 02 May 2021 13:50:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD6-0000Fh-4w for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23757) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldGD4-0000TG-07 for qemu-devel@nongnu.org; Sun, 02 May 2021 13:48:51 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-393-XxpKV5EMPvGk4kyZUt6Pjw-1; Sun, 02 May 2021 13:48:47 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 682FD801817; Sun, 2 May 2021 17:48:46 +0000 (UTC) Received: from thuth.com (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B2F7189B6; Sun, 2 May 2021 17:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619977729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BTzB/niq2+KOl6V7uzrJ3GhYtimVeLGPZmrQmgIikm8=; b=ZWy8ERDhXfoNKDfkooySfmYlD9Lzfxe5DPtv8TAQsTmpoeuJlrOgXzObhI/SM6WSA8hI5k CtF2bkkD19VAirwpwee+EdAdSaA3S+fsNHz4i1vb9ae4hi6Jgoc+sLh0bcm8hhInfY3+fY v4XeRSEM5w1eaniMxOcZO90FaHMOvZ0= X-MC-Unique: XxpKV5EMPvGk4kyZUt6Pjw-1 From: Thomas Huth To: qemu-s390x@nongnu.org, Christian Borntraeger Subject: [PATCH 4/4] pc-bios/s390-ccw: Allow building with Clang, too Date: Sun, 2 May 2021 19:48:36 +0200 Message-Id: <20210502174836.838816-5-thuth@redhat.com> In-Reply-To: <20210502174836.838816-1-thuth@redhat.com> References: <20210502174836.838816-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.697, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Clang unfortunately does not support generating code for the z900 architecture level and starts with the z10 instead. Thus to be able to support compiling with Clang, we have to check for the supported compiler flags. The disadvantage is of course that the bios image will only run with z10 guest CPUs upwards (which is what most people use anyway), so just in case let's also emit a warning in that case. Signed-off-by: Thomas Huth Reviewed-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 9 ++++++++- pc-bios/s390-ccw/Makefile | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4f374b4889..5ebc937746 100755 --- a/configure +++ b/configure @@ -5417,9 +5417,16 @@ if { test "$cpu" =3D "i386" || test "$cpu" =3D "x86_= 64"; } && \ fi =20 # Only build s390-ccw bios if we're on s390x and the compiler has -march= =3Dz900 +# or -march=3Dz10 (which is the lowest architecture level that Clang suppo= rts) if test "$cpu" =3D "s390x" ; then write_c_skeleton - if compile_prog "-march=3Dz900" ""; then + compile_prog "-march=3Dz900" "" + has_z900=3D$? + if [ $has_z900 =3D 0 ] || compile_prog "-march=3Dz10" ""; then + if [ $has_z900 !=3D 0 ]; then + echo "WARNING: Your compiler does not support the z900!" + echo " The s390-ccw bios will only work with guest CPUs >=3D= z10." + fi roms=3D"$roms s390-ccw" # SLOF is required for building the s390-ccw firmware on s390x, # since it is using the libnet code from SLOF for network booting. diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 83fb1afb73..cee9d2c63b 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -34,7 +34,8 @@ QEMU_CFLAGS +=3D $(call cc-option,-Werror $(QEMU_CFLAGS),= -Wno-stringop-overflow) QEMU_CFLAGS +=3D -ffreestanding -fno-delete-null-pointer-checks -fno-commo= n -fPIE QEMU_CFLAGS +=3D -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tab= les QEMU_CFLAGS +=3D $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -QEMU_CFLAGS +=3D -msoft-float -march=3Dz900 +QEMU_CFLAGS +=3D -msoft-float +QEMU_CFLAGS +=3D $(call cc-option, $(QEMU_CFLAGS),-march=3Dz900,-march=3Dz= 10) QEMU_CFLAGS +=3D -std=3Dgnu99 LDFLAGS +=3D -Wl,-pie -nostdlib =20 --=20 2.27.0