From nobody Sat Nov 15 11:54:35 2025 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1594670899; cv=none; d=zohomail.com; s=zohoarc; b=NvsZYNH/QOzhyxGGxZvhKdnOEuFn93qlTsj5Kp/SQmTJABusZRy9IeSDvQHuKfQhJO3wSJ2aNdg3M0BdF7ArPffF1kvjkZeo31affUcxOKkY6UfzkOWdePvhA2jVsTmvWvU2M8qD2WfIn8W+Hsy+2wGTTutLIx0uoBC2xqSpvgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594670899; 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=qFhIz7yTIzhv4ZECtrkYR3FRhbXI50/mJD1JravnOmY=; b=C/vsJiyayNh30rSkFmtlAwJ/U2MPeC+bQ9mHnAwXGiMOgt/I7WHIaUGLFTT+V5bqLthVVoxLq2oAqUirSOTZXcFhLH2RNMQW6MLz7HAh2+uptlZfeYuPFc4QJq2suXd6hwRGUR3/3quq4XAMaP4VZVLmAM2R5ZLPFhdkszG6IcQ= 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 1594670899067896.3046705226425; Mon, 13 Jul 2020 13:08:19 -0700 (PDT) Received: from localhost ([::1]:55154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jv4kL-0006ka-PF for importer@patchew.org; Mon, 13 Jul 2020 16:08:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv4ge-000879-Va for qemu-devel@nongnu.org; Mon, 13 Jul 2020 16:04:29 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:37542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jv4gd-0006IX-8A for qemu-devel@nongnu.org; Mon, 13 Jul 2020 16:04:28 -0400 Received: by mail-wm1-x32a.google.com with SMTP id o2so1076464wmh.2 for ; Mon, 13 Jul 2020 13:04:26 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f17sm1010645wme.14.2020.07.13.13.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 13:04:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1254D1FF91; Mon, 13 Jul 2020 21:04:16 +0100 (BST) 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=qFhIz7yTIzhv4ZECtrkYR3FRhbXI50/mJD1JravnOmY=; b=cKldk/6OJ9BpdVjh3uNLWqHfBSd6Niir92rdbxswNP6nDmR9QnWrzBg9GDexEHeGbp cuwBOZN4l9ZDGb3IVGDYL/DQ/1iLT2/4JF71A4Dlno12IOXOO5E2XiNZWLCSw8f5ba68 lN1EtjT25fdp1Sahr+Sdwl/Igx+0hYbZ8bxxj7OQhB+zPNdzyjzRMA2nLBVgiJsqfq+b SQS2Rfc1kEOyHFQsGhHyhIOWH872mQD8sZnaVhraomgGYlh1AJ6MdHmf960SeLhQVIVF 399lbJ41szLAMILnEI+scbxvptUXbp//E35HmT+7TFXymW4vb9uMOD+7Slno7gf5RGhE xZFg== 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=qFhIz7yTIzhv4ZECtrkYR3FRhbXI50/mJD1JravnOmY=; b=RKeOyAmNoTgUvPfTvPcjlsoOlVbZhpmHa8eeY9kGo0WcIK1fMaq8ZSbBx/SAKAVT2p 3NdInwXfFA5fFsNsKri4en9yAMtZSH0sxyI2hpc4XceJDd8kSehv+lQcLLBu7JHFgUzt Lj1TdKChc/xVOybfXDt6T35sN/v0+CxMCHft1ixlJ8OCXQ+x+QX/jCqKIy0tRTsTuyy9 uDjj4KEmnc1EQF/cAtCwx3hWeNoGrzp+fbur38he8DCzn62cGV9OcLq9R8dbD7+pgus9 xfr/nVoIG7sjit/y5QihaC0TCys8LDio9Ldr8/xN59F2IQzVNR1LcLo/YQatcHLUm4BR mC0w== X-Gm-Message-State: AOAM532s9IcQx5weRzBrqhu3KsTcXudXHmoCcbYJnadHrBREocIcKkw0 xe4ePEGIxSh6YiqgGChbLWe68w== X-Google-Smtp-Source: ABdhPJwxlSKhMU/Vz84Uop3ctb505hTVWJy+k+9QzaLpygNwy/Dh+IOOVEeGCGURh7QmoHOjdYcnIQ== X-Received: by 2002:a05:600c:2f88:: with SMTP id t8mr1030337wmn.186.1594670665891; Mon, 13 Jul 2020 13:04:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 05/11] tests/plugins: don't unconditionally add -Wpsabi Date: Mon, 13 Jul 2020 21:04:09 +0100 Message-Id: <20200713200415.26214-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200713200415.26214-1-alex.bennee@linaro.org> References: <20200713200415.26214-1-alex.bennee@linaro.org> 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=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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=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: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Not all compilers support the -Wpsabi (clang-9 in my case). To handle this gracefully we pare back the shared build machinery so the Makefile is relatively "standalone". We still take advantage of config-host.mak as configure has done a bunch of probing for us but that is it. Fixes: bac8d222a Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- v2 - separate from main build system and check probe --- configure | 3 +++ tests/plugin/Makefile | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/configure b/configure index e1de2f5b24..08eaa99d19 100755 --- a/configure +++ b/configure @@ -7112,6 +7112,9 @@ echo "GIT_UPDATE=3D$git_update" >> $config_host_mak =20 echo "ARCH=3D$ARCH" >> $config_host_mak =20 +echo "GLIB_CFLAGS=3D$glib_cflags" >> $config_host_mak +echo "GLIB_LDFLAGS=3D$glib_ldflags" >> $config_host_mak + if test "$default_devices" =3D "yes" ; then echo "CONFIG_MINIKCONF_MODE=3D--defconfig" >> $config_host_mak else diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index 3a50451428..e9348fde4a 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -1,9 +1,16 @@ +# -*- Mode: makefile -*- +# +# This Makefile example is fairly independent from the main makefile +# so users can take and adapt it for their build. We only really +# include config-host.mak so we don't have to repeat probing for +# cflags that the main configure has already done for us. +# + BUILD_DIR :=3D $(CURDIR)/../.. =20 include $(BUILD_DIR)/config-host.mak -include $(SRC_PATH)/rules.mak =20 -$(call set-vpath, $(SRC_PATH)/tests/plugin) +VPATH +=3D $(SRC_PATH)/tests/plugin =20 NAMES :=3D NAMES +=3D bb @@ -17,11 +24,18 @@ NAMES +=3D lockstep =20 SONAMES :=3D $(addsuffix .so,$(addprefix lib,$(NAMES))) =20 -QEMU_CFLAGS +=3D -fPIC -Wpsabi -QEMU_CFLAGS +=3D -I$(SRC_PATH)/include/qemu +# The main QEMU uses Glib extensively so it's perfectly fine to use it +# in plugins (which many example do). +CFLAGS =3D $(GLIB_CFLAGS) +CFLAGS +=3D -fPIC +CFLAGS +=3D $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi) +CFLAGS +=3D -I$(SRC_PATH)/include/qemu =20 all: $(SONAMES) =20 +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + lib%.so: %.o $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS) =20 --=20 2.20.1