From patchwork Wed Jun 17 04:37:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1310913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DMpKxujj; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mslG3x7Dz9sTH for ; Wed, 17 Jun 2020 14:38:32 +1000 (AEST) Received: from localhost ([::1]:60678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlPqI-0006kk-KY for incoming@patchwork.ozlabs.org; Wed, 17 Jun 2020 00:38:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlPps-0006jx-KR for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:04 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:45155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlPpq-0001So-J6 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:04 -0400 Received: by mail-pl1-x644.google.com with SMTP id d8so344177plo.12 for ; Tue, 16 Jun 2020 21:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ChL+mQvp08NHZYyarb1xR9uQbyNLWA/IcQ/TYqhGDbM=; b=DMpKxujj0SseX0+Ey1b0vCw54IbS46m0Xjp5+1N6c7q4+0oEKYFZPGRIjPEDATVAXY tW4CAI8Rjtu5ncfO+zQvkXZN2j0K4IpJJ38VmpxvSL7v+ZjXgoIQ06P8IPSAqvg9KnKV YHzqEpDzymiMDKauiJAFo1CCbU5GgOdU7sSIa3TW+aZW1WdYnWbi2THus8z5rl0CvE7p zTkmNE7/6pSldnVLlS5g9sGflasVJzPyimUn5zJfjrhbCDmRJERx3KO7LE+e649xRosx WceL+miR6y2H58B73XIsDl3bgBot7fEIEgZu7Q/YWi0jopAEtkYRFgo6GT4Hwhpw2H1H W5zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ChL+mQvp08NHZYyarb1xR9uQbyNLWA/IcQ/TYqhGDbM=; b=mbkIIYVrVTkIwcC3FZznxUpWPYqB7Zp/9gD9jJ8J57hiagzDNJekPrwF7tqXi2XRzX 8eKR/s0/DWtnmq9QoQRCjxCOCfzm0JxDkDiSwaseVh1Rs0q1yXyZXKT/Gn2cLDjNZNNd mH4wds1TfcqYPf6/DtAc7ldQmk1TSnJPN6Um69/pHVopuf42OeoXJnqz/+6zV3nVLwEh c28jQ0MJL2I9RTUa//gmD7REmGIvixjhv77Dag9xbC+90/yIKkXIhSNOAWqNE/yQWczM OH2qVMGmgtBuwFdkEujYCOGDM5iTvG2sF8KbaX6Qe0Hsi5zXF5V+QLrdIsAyYFANxE8S YfJw== X-Gm-Message-State: AOAM533L95XYyUBeEDDxDoXMZ4wnGE5Hlg7bzZwyUanZ8E7B/LPrlPLq Mdn8U9KgX/h+swGn09M6Rs2Nps0oc1k= X-Google-Smtp-Source: ABdhPJxg6gSs6a6VP4vcDfL6b7jOhDmF/lQ/8qtpix64YHiYhcoX9zw6cOu4YJpkTCtFSR9IFANUVQ== X-Received: by 2002:a17:90a:4fc7:: with SMTP id q65mr5905335pjh.25.1592368680624; Tue, 16 Jun 2020 21:38:00 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id x3sm18585808pfi.57.2020.06.16.21.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 21:37:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 1/5] fpu/softfloat: Silence 'bitwise negation of boolean expression' warning Date: Tue, 16 Jun 2020 21:37:53 -0700 Message-Id: <20200617043757.1623337-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617043757.1623337-1-richard.henderson@linaro.org> References: <20200617043757.1623337-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x644.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , alex.bennee@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé When building with clang version 10.0.0-4ubuntu1, we get: CC lm32-softmmu/fpu/softfloat.o fpu/softfloat.c:3365:13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation] absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fpu/softfloat.c:3423:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation] absZ0 &= ~ ( ( (uint64_t) ( absZ1<<1 ) == 0 ) & roundNearestEven ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... fpu/softfloat.c:4273:18: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror,-Wbool-operation] zSig1 &= ~ ( ( zSig2 + zSig2 == 0 ) & roundNearestEven ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix by rewriting the fishy bitwise AND of two bools as an int. Suggested-by: Eric Blake Buglink: https://bugs.launchpad.net/bugs/1881004 Reviewed-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200528155420.9802-1-philmd@redhat.com> Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- fpu/softfloat.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 6c8f2d597a..5e9746c287 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -3362,7 +3362,9 @@ static int32_t roundAndPackInt32(bool zSign, uint64_t absZ, } roundBits = absZ & 0x7F; absZ = ( absZ + roundIncrement )>>7; - absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); + if (!(roundBits ^ 0x40) && roundNearestEven) { + absZ &= ~1; + } z = absZ; if ( zSign ) z = - z; if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) { @@ -3420,7 +3422,9 @@ static int64_t roundAndPackInt64(bool zSign, uint64_t absZ0, uint64_t absZ1, if ( increment ) { ++absZ0; if ( absZ0 == 0 ) goto overflow; - absZ0 &= ~ ( ( (uint64_t) ( absZ1<<1 ) == 0 ) & roundNearestEven ); + if (!(absZ1 << 1) && roundNearestEven) { + absZ0 &= ~1; + } } z = absZ0; if ( zSign ) z = - z; @@ -3480,7 +3484,9 @@ static int64_t roundAndPackUint64(bool zSign, uint64_t absZ0, float_raise(float_flag_invalid, status); return UINT64_MAX; } - absZ0 &= ~(((uint64_t)(absZ1<<1) == 0) & roundNearestEven); + if (!(absZ1 << 1) && roundNearestEven) { + absZ0 &= ~1; + } } if (zSign && absZ0) { @@ -3603,7 +3609,9 @@ static float32 roundAndPackFloat32(bool zSign, int zExp, uint32_t zSig, status->float_exception_flags |= float_flag_inexact; } zSig = ( zSig + roundIncrement )>>7; - zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); + if (!(roundBits ^ 0x40) && roundNearestEven) { + zSig &= ~1; + } if ( zSig == 0 ) zExp = 0; return packFloat32( zSign, zExp, zSig ); @@ -3757,7 +3765,9 @@ static float64 roundAndPackFloat64(bool zSign, int zExp, uint64_t zSig, status->float_exception_flags |= float_flag_inexact; } zSig = ( zSig + roundIncrement )>>10; - zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven ); + if (!(roundBits ^ 0x200) && roundNearestEven) { + zSig &= ~1; + } if ( zSig == 0 ) zExp = 0; return packFloat64( zSign, zExp, zSig ); @@ -3983,8 +3993,9 @@ floatx80 roundAndPackFloatx80(int8_t roundingPrecision, bool zSign, } if ( increment ) { ++zSig0; - zSig0 &= - ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven ); + if (!(zSig1 << 1) && roundNearestEven) { + zSig0 &= ~1; + } if ( (int64_t) zSig0 < 0 ) zExp = 1; } return packFloatx80( zSign, zExp, zSig0 ); @@ -4000,7 +4011,9 @@ floatx80 roundAndPackFloatx80(int8_t roundingPrecision, bool zSign, zSig0 = UINT64_C(0x8000000000000000); } else { - zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven ); + if (!(zSig1 << 1) && roundNearestEven) { + zSig0 &= ~1; + } } } else { @@ -4270,7 +4283,9 @@ static float128 roundAndPackFloat128(bool zSign, int32_t zExp, } if ( increment ) { add128( zSig0, zSig1, 0, 1, &zSig0, &zSig1 ); - zSig1 &= ~ ( ( zSig2 + zSig2 == 0 ) & roundNearestEven ); + if ((zSig2 + zSig2 == 0) && roundNearestEven) { + zSig1 &= ~1; + } } else { if ( ( zSig0 | zSig1 ) == 0 ) zExp = 0; From patchwork Wed Jun 17 04:37:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1310916 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=UEM4xrSf; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49msmz4lRdz9sTF for ; Wed, 17 Jun 2020 14:40:03 +1000 (AEST) Received: from localhost ([::1]:38860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlPrl-0000vt-D2 for incoming@patchwork.ozlabs.org; Wed, 17 Jun 2020 00:40:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlPpt-0006kh-7E for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:05 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:46415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlPpr-0001T1-Gk for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:04 -0400 Received: by mail-pg1-x543.google.com with SMTP id u128so633530pgu.13 for ; Tue, 16 Jun 2020 21:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/1VQEyGIT5SioB6kHr1I24ND+09JThHqu5Yl+UsE9Vk=; b=UEM4xrSfOR2sim6xTGwBYqO7P8+vDB/HVhPbjwZHUS5AaoSrdSSFSgYIKnPWagC2WW 9043tBu3dnEBLRnlcMyvknpG7gHzWjxfu2nrQTCwSuQfmzdRwM4BV2c9yjn2Bo4fQnWU F+eUyHEuNKEAibMVtM3/Kb83XMSOMPWvxCb6Pe+OynU9kVWmVv2czYRLFYjDH+yQx+mI 6QzsfXsVWyeZYeGZgGSVNQg4NlHsJ1e2ugGl0aXoRxp3/LoiraiF1mcf9I7syewIDXWl GJKhEBBfFBt4UxmZqTJ3lJoRDBWtPuYV3Ftmk25es80CD3Z6OD9/Eglem3m1HVFxENWw NDqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/1VQEyGIT5SioB6kHr1I24ND+09JThHqu5Yl+UsE9Vk=; b=JDs1wJbRxkg5yQ1CQD771UCGnxYLVKnJZbR8rRPPtKoE34+mUzbOlghFMmH3vbei/o WUVaSk+werjnLwig1jJSl6DC5E1nT/gr3T4+P+TGHkrhcgBuIpZqvTEbxrUk6GOzvPDk XzfW+icfh2qmFGuzjUaF124/nPta1+iaribZQZnKyYZMFIrYcGPFzGAa9T3I5ndKslc4 fntUlicv7rnALMkqmNRQ2wws2wuIUFnwbk5Lg9wU6AYrXhJWn3QYxpTLq7AaiHbIEBoz KMIGKFAyTKgMPpuJkExUsVt5EAmiuF5ldtqZUe4FVDOAGX/jBgTgoe+NE+p3enO2eLhv KBNw== X-Gm-Message-State: AOAM531uobXrVFYJhV5ZzA2of3gSEnVEFh1Lex9cojGYXaPytMaRS+P9 +rA8Yz48xq0/YYCuOtTV5nq+0xfWc9A= X-Google-Smtp-Source: ABdhPJyhUJNKS35OSdDyVmmDpqYAgSZjCHCx6iEPJETPHuVObDqM2hxDuPNUg3l621UzBweeBGVT5Q== X-Received: by 2002:a63:1515:: with SMTP id v21mr2735712pgl.185.1592368681845; Tue, 16 Jun 2020 21:38:01 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id x3sm18585808pfi.57.2020.06.16.21.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 21:38:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 2/5] migration: fix xbzrle encoding rate calculation Date: Tue, 16 Jun 2020 21:37:54 -0700 Message-Id: <20200617043757.1623337-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617043757.1623337-1-richard.henderson@linaro.org> References: <20200617043757.1623337-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::543; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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: Wei Wang , alex.bennee@linaro.org, "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Wei Wang It's reported an error of implicit conversion from "unsigned long" to "double" when compiling with Clang 10. Simply make the encoding rate 0 when the encoded_size is 0. Fixes: e460a4b1a4 Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Richard Henderson Reported-by: Richard Henderson Signed-off-by: Wei Wang Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- migration/ram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 41cc530d9d..069b6e30bc 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -913,10 +913,8 @@ static void migration_update_rates(RAMState *rs, int64_t end_time) unencoded_size = (xbzrle_counters.pages - rs->xbzrle_pages_prev) * TARGET_PAGE_SIZE; encoded_size = xbzrle_counters.bytes - rs->xbzrle_bytes_prev; - if (xbzrle_counters.pages == rs->xbzrle_pages_prev) { + if (xbzrle_counters.pages == rs->xbzrle_pages_prev || !encoded_size) { xbzrle_counters.encoding_rate = 0; - } else if (!encoded_size) { - xbzrle_counters.encoding_rate = UINT64_MAX; } else { xbzrle_counters.encoding_rate = unencoded_size / encoded_size; } From patchwork Wed Jun 17 04:37:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1310914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=J1Wq3Lkm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mslL4wZ4z9sTF for ; Wed, 17 Jun 2020 14:38:38 +1000 (AEST) Received: from localhost ([::1]:60858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlPqO-0006q3-Dw for incoming@patchwork.ozlabs.org; Wed, 17 Jun 2020 00:38:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlPpu-0006ml-GG for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:06 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:35791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlPps-0001TK-PC for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:06 -0400 Received: by mail-pg1-x541.google.com with SMTP id s135so666286pgs.2 for ; Tue, 16 Jun 2020 21:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kaW8P+svDRMLkdL4p/i5g0Y7teIr71hNo2cIxCcePk4=; b=J1Wq3Lkmyr8GkiYUSAzwY17jqQdCsba1fHo/hT4atUgo177CYGxQx0ExSOYcZ4j63L e6ZrVPSCR5PrJtneZ+kE+GdCKeaHnPPJgTlsqTw0fFuMFsgwE18zp3aL+LCLykw2yjJ0 kvNWdU6ujbM6ZXxKfqI7ilbXg2ULH/axFtnZLms8VsNoMgkpkigvGWQk89iwxFfPTDEQ bSmVFvJno3amnO1mZ/BX28WYtH1NJRpTW1ptk/BK0aP+JlMn3B9KsM8syD6KKGCbG3/h KwISR/A8FSu0CckjFezySDxd75WRAvOMjToWYLyY7/zu/nPUwn/yVQfjCTuSqppEddn0 +A8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kaW8P+svDRMLkdL4p/i5g0Y7teIr71hNo2cIxCcePk4=; b=H3XVVWG0eZdb6MonTY94zuhHXSr13Tct0CbAZ2v3uzCv13ykp6wrDA8SdxzbkmmaiX 14mDzN3HGrZdAmM6lcHJV4y+WKsC/hmIulKRANDqMH7Y+0sYTGIjzbJwSe3GVWG2Ac5F Ib5AnjvWq+fZs7i+HBt5xtKQ984chmbWN/v+s5CqIoSdaIQ9EpRLcrEWPKB5p6JR5LZy ED1XX9wTZsohKgvrs69okJpSlS2oStb2FJo1mD+6Ms+Hp6A9r9AIOapriotWA4XJMuOD 3sQYysntjXidqzV6y+IjHruS29D9cuvfbpG93M6SiEZQt7al0uCaHYM5038M/qxGQkR9 jtRg== X-Gm-Message-State: AOAM532f0x4Fh5r7fFbq54Y0dRPaF9BIfC8Xdyw8yE+7tC1G45J73A+f y5xobnrtQy42w9EuTTcWkRSt+6ytGGQ= X-Google-Smtp-Source: ABdhPJyelP3N+IuzHzQ8rhrAbamMe9dR4nlPiumqhwOSsKD+UCPsCDiWNKqSKhNo0mVn70ZwK0COyA== X-Received: by 2002:a62:7f58:: with SMTP id a85mr5185003pfd.89.1592368682954; Tue, 16 Jun 2020 21:38:02 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id x3sm18585808pfi.57.2020.06.16.21.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 21:38:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 3/5] configure: Clean up warning flag lists Date: Tue, 16 Jun 2020 21:37:55 -0700 Message-Id: <20200617043757.1623337-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617043757.1623337-1-richard.henderson@linaro.org> References: <20200617043757.1623337-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Use a helper function to tidy the assembly of gcc_flags. Separate flags that disable warnings from those that enable, and sort the disable warnings to the end. Suggested-by: Eric Blake Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- configure | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/configure b/configure index b01b5e3bed..a8bef95282 100755 --- a/configure +++ b/configure @@ -97,6 +97,11 @@ do_cxx() { do_compiler "$cxx" "$@" } +# Append $2 to the variable named $1, with space separation +add_to() { + eval $1=\${$1:+\"\$$1 \"}\$2 +} + update_cxxflags() { # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those # options which some versions of GCC's C++ compiler complain about @@ -2024,16 +2029,33 @@ if ! compile_prog "" "" ; then error_exit "You need at least GCC v4.8 or Clang v3.4 (or XCode Clang v5.1)" fi -gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits" -gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags" -gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" -gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags" -gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags" -gcc_flags="-Wno-string-plus-int -Wno-typedef-redefinition $gcc_flags" -# Note that we do not add -Werror to gcc_flags here, because that would -# enable it for all configure tests. If a configure test failed due -# to -Werror this would just silently disable some features, -# so it's too error prone. +# Accumulate -Wfoo and -Wno-bar separately. +# We will list all of the enable flags first, and the disable flags second. +# Note that we do not add -Werror, because that would enable it for all +# configure tests. If a configure test failed due to -Werror this would +# just silently disable some features, so it's too error prone. + +warn_flags= +add_to warn_flags -Wold-style-declaration +add_to warn_flags -Wold-style-definition +add_to warn_flags -Wtype-limits +add_to warn_flags -Wformat-security +add_to warn_flags -Wformat-y2k +add_to warn_flags -Winit-self +add_to warn_flags -Wignored-qualifiers +add_to warn_flags -Wempty-body +add_to warn_flags -Wnested-externs +add_to warn_flags -Wendif-labels +add_to warn_flags -Wexpansion-to-defined + +nowarn_flags= +add_to nowarn_flags -Wno-initializer-overrides +add_to nowarn_flags -Wno-missing-include-dirs +add_to nowarn_flags -Wno-shift-negative-value +add_to nowarn_flags -Wno-string-plus-int +add_to nowarn_flags -Wno-typedef-redefinition + +gcc_flags="$warn_flags $nowarn_flags" cc_has_warning_flag() { write_c_skeleton; From patchwork Wed Jun 17 04:37:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1310915 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=EjVDRpzO; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49msmy1V6lz9sTF for ; Wed, 17 Jun 2020 14:40:02 +1000 (AEST) Received: from localhost ([::1]:38678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlPrj-0000rg-V2 for incoming@patchwork.ozlabs.org; Wed, 17 Jun 2020 00:39:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlPpv-0006p5-U1 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:07 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:43167) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlPpu-0001Te-4J for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:07 -0400 Received: by mail-pg1-x542.google.com with SMTP id h10so640624pgq.10 for ; Tue, 16 Jun 2020 21:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U2OhPh1mOGrVWInaZNwiPEgVVlC79KKQnsD/xgS7OZI=; b=EjVDRpzOtBEADaOdZfYBlVrrf4zOQbwJmXHEaS7CS+RmV+e7Ux9wIaH91zTTFhTlMY bkgnNwjb6cZ7W2dt46Uu0nkxpLzGVowXBgqw1/2y6Y1wKXUearzXR2lQXHJB+ucULWgz 9jHo2Yl9/bb/UvyGs7tXlUJFTGmtlZVKeqbGmrN8Y1eH8UjpuidZSrLYM8x1xAuyCiTg Ti5eOfYRJw7kM2GHAz9tHUTPG4E0ANvCOfKGOVjbv9bDLTXEJJPQ0xHhL7rfwChIYFmW ALqls/5Z2+3KUstJD/T13m+71hGuUIp8B8SWu3TtghlMSHzrE9qu+2raN3kORMktuf69 rL8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U2OhPh1mOGrVWInaZNwiPEgVVlC79KKQnsD/xgS7OZI=; b=EalNUAm4toG1byNCuXFUpSpcr4lI6gX1eFGPMb0LEfE/XdvP0H1ZzaBBfcrKYNe51B GoUs/Z61Fc0kqB4gepgWbr0MgVEGZ0fy/EndH3AgcEG8PKax2Xez+wkh3xMaDq0wHoy4 yiO4idn7ZzGEIbwPoTzyfTPSQ+Kvv4nAdSu01QwYRbbWpYigoOrEr0ew3yA4MG2G37vA f7KMQgOyTldGwtgUapAZEgJb73H2P7FfD566TMYJNE6gXgQv4n+azTeGNeWNQBgtlOMz HnI5ZqvBggRQrOTMgRiYDOdsT4lxmHgb4eYSD+vjpeV3C+ur+VtMuX69wL+RKal2Vvkz iPUw== X-Gm-Message-State: AOAM532+IIyB8IOpVUKmY6MYrqQQ+279cXQvBonrzgJvaruuTggpZzMu +bXsPP+MP9YTh2c/MwVuwP9q+jhzot0= X-Google-Smtp-Source: ABdhPJydTKviR5eJuaiBmOC0DsuxAbF3eYDe1gxkRhQOkDGl1ORDKIdAKBOwZP830+x9d4zt9QbZXg== X-Received: by 2002:a63:e004:: with SMTP id e4mr4532828pgh.44.1592368684253; Tue, 16 Jun 2020 21:38:04 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id x3sm18585808pfi.57.2020.06.16.21.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 21:38:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 4/5] configure: Disable -Wtautological-type-limit-compare Date: Tue, 16 Jun 2020 21:37:56 -0700 Message-Id: <20200617043757.1623337-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617043757.1623337-1-richard.henderson@linaro.org> References: <20200617043757.1623337-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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: Thomas Huth , alex.bennee@linaro.org, =?utf-8?q?Philip?= =?utf-8?q?pe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Clang 10 enables this by default with -Wtype-limit. All of the instances flagged by this Werror so far have been cases in which we really do want the compiler to optimize away the test completely. Disabling the warning will avoid having to add ifdefs to work around this. Cc: Eric Blake Fixes: https://bugs.launchpad.net/qemu/+bug/1878628 Acked-by: Thomas Huth Reviewed-by: Eric Blake Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- v2: Use the new add_to function. --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index a8bef95282..5e27229f58 100755 --- a/configure +++ b/configure @@ -2054,6 +2054,7 @@ add_to nowarn_flags -Wno-missing-include-dirs add_to nowarn_flags -Wno-shift-negative-value add_to nowarn_flags -Wno-string-plus-int add_to nowarn_flags -Wno-typedef-redefinition +add_to nowarn_flags -Wno-tautological-type-limit-compare gcc_flags="$warn_flags $nowarn_flags" From patchwork Wed Jun 17 04:37:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1310918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kTOYkSuU; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mspq6dFRz9sTF for ; Wed, 17 Jun 2020 14:41:39 +1000 (AEST) Received: from localhost ([::1]:43108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlPtI-0002lT-T5 for incoming@patchwork.ozlabs.org; Wed, 17 Jun 2020 00:41:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlPpw-0006qi-Lb for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:08 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:39291) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlPpv-0001Tp-21 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 00:38:08 -0400 Received: by mail-pg1-x541.google.com with SMTP id v11so651632pgb.6 for ; Tue, 16 Jun 2020 21:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jYIhlgGCq1UUdx/JfqZRUcnP+U2PpbQCAFcsCH7XqwQ=; b=kTOYkSuUXu11HGclWCRwxe8yk9zLjb/6dA69WXkVzq8xZNIM38v8qzwUTxktClD4HV df6A1LUGS5L3whi1S8/LX3q7wOK/b67wJYhzj18zCcozNpiUOPgN2CStJyb+qek/ztoz 5YSktlpXZ6Ee8tSHlSZH6K0Rie2cMVCk+VCXJOoLX9Ha5g55NpCAfh56Tt0KAfbNTDzw 0J6bX/jm4OOD6Juw1o06stXIYZu5zOo17tSYlR9koxNkRLhOfRNipZyQpF2RiQ1uzlgw kTmFSEBgL7HMAPFQM/k4z2vGzK+67XQ55RIDN5/JlBPbWUFpH7dXMEjuIDzVjO6SfV9V ++gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jYIhlgGCq1UUdx/JfqZRUcnP+U2PpbQCAFcsCH7XqwQ=; b=mNuQoBRISmHx4i7S21vcwRxawwhPYi1PhgvCb32+sDI4bDVBnf6LiVCwMfAlDEevRZ pMztnLE0o/xYy7Ox0/o80liplXNpnPVdwyThI1pfto5uwfUDV0bKp033PT//I56CGLeN 3JGuUXEuSUqImHZTN3eaTMnkpAZiUu0oSbSRNqi4BGniT2XfOt7o8BkT1EljHNQG6LID 8CCj2cLD9P4cvkvmuVoRAkm4FhFe17BcL2ha1W33y8RaWj1O6vwfUWDzyXf/xwWkxp2n RHKkxJBFCZHwGvjrIlO/L17Tk1G+AHFFe3sBsPI9l7E7bQ8cMOOqP7EZ1ylD+xcCcXdD 4qnQ== X-Gm-Message-State: AOAM531yMPQELYIB+/a+Q0lI/LSSQJplk+er4PS5HXmalqPWn6O/zF7n X10lmB41wQYXBlCjFor1RTvUEE8zOHQ= X-Google-Smtp-Source: ABdhPJxPYez1C36KmAlYobL7dvQyuHcIpHem7WI00m9MjQckpk3q6JLoqgg/Ja9NveEdnACjqHSRSw== X-Received: by 2002:a63:63c6:: with SMTP id x189mr4723224pgb.36.1592368685518; Tue, 16 Jun 2020 21:38:05 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id x3sm18585808pfi.57.2020.06.16.21.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 21:38:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 5/5] configure: Add -Wno-psabi Date: Tue, 16 Jun 2020 21:37:57 -0700 Message-Id: <20200617043757.1623337-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617043757.1623337-1-richard.henderson@linaro.org> References: <20200617043757.1623337-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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: Peter Maydell , alex.bennee@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" On aarch64, gcc 9.3 is generating qemu/exec.c: In function ‘address_space_translate_iommu’: qemu/exec.c:431:28: note: parameter passing for argument of type \ ‘MemTxAttrs’ {aka ‘struct MemTxAttrs’} changed in GCC 9.1 and many other reptitions. This structure, and the functions amongst which it is passed, are not part of a QEMU public API. Therefore we do not care how the compiler passes the argument, so long as the compiler is self-consistent. The only portion of QEMU which does have a public api, and so must have a stable abi, is "qemu/plugin.h". We test this by forcing -Wpsabi in tests/plugin/Makefile. Cc: Alex Bennée Cc: Peter Maydell Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- configure | 1 + tests/plugin/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 5e27229f58..ba88fd1824 100755 --- a/configure +++ b/configure @@ -2055,6 +2055,7 @@ add_to nowarn_flags -Wno-shift-negative-value add_to nowarn_flags -Wno-string-plus-int add_to nowarn_flags -Wno-typedef-redefinition add_to nowarn_flags -Wno-tautological-type-limit-compare +add_to nowarn_flags -Wno-psabi gcc_flags="$warn_flags $nowarn_flags" diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index b3250e2504..3a50451428 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -17,7 +17,7 @@ NAMES += lockstep SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) -QEMU_CFLAGS += -fPIC +QEMU_CFLAGS += -fPIC -Wpsabi QEMU_CFLAGS += -I$(SRC_PATH)/include/qemu all: $(SONAMES)