From patchwork Wed Jun 16 01:36:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 461335 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp113952jae; Tue, 15 Jun 2021 18:45:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyszMic5/xbPGz3FxOfxXKDl18OHHphn/93iupHbBzAytXsOCD6a6OzBWOh9rzvs6nsFPeg X-Received: by 2002:ae9:e910:: with SMTP id x16mr2690196qkf.397.1623807956340; Tue, 15 Jun 2021 18:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623807956; cv=none; d=google.com; s=arc-20160816; b=KO6b88O3383V0lfpHYSfoh+PKoCjds8OSuZ+/MaUb4BV9RHGp+txcJHd86yaX6TlKx /96Z33XMovf4JZ0gJ2a7GVOSPUSSK4SEN2L926Inuz0jD8lveK9ZYMiXTkZKDZsvrErr GoM36ZFzbbH7R1U6+QyMsf/2QjkUSF7Am0AX4a+WwxgYzrLvVg10TBTdiXF0kvgQMDRn tNvuzb7XJYXSKf1k/oAq3DCdC1dSd2EbWoRm9eFoOOX/5kBY3RdPnrZjzWX4PlPhySpO TAkZU3su59fdVbsbBt+cj9nxYDIesKZzQYvtwZIw75vRtekAia9ukZQMwZPrNzASd3bd QIZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=GCKAdANmH1Xtpoehzhc4V1D5rmsyIp28yEK3SJRUGT4=; b=NIMF4rQGyvXM2mbQL75AVwJRBRlTYudoCak7dfwYO+rhgtLHz00qQptkh2LNIBsYnJ y1CDxZ1nWTF95L83sIl6d4VGnO1jqA7D236Pe4dAEDgnCZRFZTd0fAV7WAtw6GO6/pyH eMQZmOSeCpM4rOGhqiVI6CQ8W9ZcUlPKjMn8G0C9eOxJy2lVWr6eSaV9LPdUEoyuWZ7+ /doVC1WGnohIRptAygINi4MdiYlx/mhduSCgxEeUU0ahD7x1nXOhYtRHzTrDnJ2OirVl IwMAhLMw9SS3E4wyuVvypjQxUb0S/86CM4d4H6/MEZhyTFDNNEyplXbuLmmxTamqsiOa KWFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="lIsbNkz/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r25si725859qtf.275.2021.06.15.18.45.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Jun 2021 18:45:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="lIsbNkz/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltKct-0003Q2-O7 for patch@linaro.org; Tue, 15 Jun 2021 21:45:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltKTq-0008NU-FH for qemu-devel@nongnu.org; Tue, 15 Jun 2021 21:36:34 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:40493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltKTo-0005ak-KC for qemu-devel@nongnu.org; Tue, 15 Jun 2021 21:36:34 -0400 Received: by mail-pl1-x629.google.com with SMTP id e7so284979plj.7 for ; Tue, 15 Jun 2021 18:36:32 -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=GCKAdANmH1Xtpoehzhc4V1D5rmsyIp28yEK3SJRUGT4=; b=lIsbNkz/tbwdbAQAoD4l/RtJs/D5/pBwaQWAOHmAp44xMeNyC1MgNRfK+XToB64giW gfmWSRdb9HULUZCc/r3WU+6eQdMAvBuxZ6DkMP2I4VmYbLxBkP+c7Mg75UShcju80f3z QpZswWTuGH4Rp2qRnQrhz96O673+ZtosQYGFdJ2Ewmv/sNX1Sy6Z391W+PGaimE8zlHq Jj6FRtNNhUijG5kEOhYrtjmxyEiayd7BakE/HOmYGti3UUpegE7Ec9C/2ULAKsp3EzJE nEqlBQDGIVAi3C8RHuKbZrXY9FDLdFU44afeuKRcYJoCBJdVO9yb7GQIqlrNSbSS6Xo6 guLw== 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=GCKAdANmH1Xtpoehzhc4V1D5rmsyIp28yEK3SJRUGT4=; b=HgTFpBIR5U2sflXi1nGIXobePNuTR/tkSto6dFBonq00YQcXDlowJEROazfophC/15 RDM+ECIWWneNKo8a+tA27kucGSMZGqg+N6ekPUf8zuPqq5HD6NEPT12FHXePUMJsopML jZLRogiaK7Y84EVKcVnQMFHY19Q8v7B8yv6UsnUtFKPWqVofIf3CEErKe6ocOkJWL7Hs 23ZyDiUvNU1ev4f13qxHZKHiEz9zEn+65EXeHrPQdr2tVMD94Te+0vm8WfJZ+xNi/ivA 0uKpjVPYZQVRXlgZNJh9tbYIi5vG6txC94BbVwjuhvMI+/t6cBAritr5L1cNo1Cek78B c8Ag== X-Gm-Message-State: AOAM531JsJV0sUzbUTCgaNpVupcBv49Hpb1DB/bvAB3VeAgQ8wTI6ggN m6TCPhEZV6j2xe4z78svW0zpuGnCOgQGVg== X-Received: by 2002:a17:903:2311:b029:115:29a9:a3ee with SMTP id d17-20020a1709032311b029011529a9a3eemr6799238plh.46.1623807391361; Tue, 15 Jun 2021 18:36:31 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id o1sm321595pjf.56.2021.06.15.18.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 18:36:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 1/8] configure: Use -std=gnu11 Date: Tue, 15 Jun 2021 18:36:22 -0700 Message-Id: <20210616013629.1458790-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210616013629.1458790-1-richard.henderson@linaro.org> References: <20210616013629.1458790-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.com 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=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: =?utf-8?q?Alex_Benn=C3=A9e?= , peter.maydell@linaro.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now that the minimum gcc version is 7.5, we can use C11. This will allow lots of cleanups to the code, currently hidden behind macros in include/qemu/compiler.h. Signed-off-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-Id: <20210614233143.1221879-2-richard.henderson@linaro.org> --- configure | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/configure b/configure index 8dcb9965b2..0489864667 100755 --- a/configure +++ b/configure @@ -159,7 +159,7 @@ update_cxxflags() { # options which some versions of GCC's C++ compiler complain about # because they only make sense for C programs. QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" - CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS" | sed s/-std=gnu99/-std=gnu++11/) + CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS" | sed s/-std=gnu11/-std=gnu++11/) for arg in $QEMU_CFLAGS; do case $arg in -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\ @@ -538,7 +538,7 @@ QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" # Flags that are needed during configure but later taken care of by Meson -CONFIGURE_CFLAGS="-std=gnu99 -Wall" +CONFIGURE_CFLAGS="-std=gnu11 -Wall" CONFIGURE_LDFLAGS= diff --git a/meson.build b/meson.build index a2311eda6e..d8a92666fb 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('qemu', ['c'], meson_version: '>=0.55.0', - default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'] + + default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11', 'b_colorout=auto'] + (meson.version().version_compare('>=0.56.0') ? [ 'b_staticpic=false' ] : []), version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())