From patchwork Sun Jun 30 19:00:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 808693 Delivered-To: patch@linaro.org Received: by 2002:adf:fe0a:0:b0:362:4979:7f74 with SMTP id n10csp1271018wrr; Sun, 30 Jun 2024 12:02:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX+pkflrOW81l2HnP3EScfJWGmqxp+cGxX3WZoOkerkeVHxh70tHgtWh2ZcuHj2aHPRYbKWlaByJSqA0acLhW/g X-Google-Smtp-Source: AGHT+IGCwJhgMnCxaJ1shdwACSUdyx9fGS4Hm0KbkTVSea1Bil3/m7dGXnbaLmeZ7EpHgGqoAd/6 X-Received: by 2002:a05:620a:e10:b0:79d:5c93:4bd with SMTP id af79cd13be357-79d7bac3fd2mr439316085a.74.1719774127202; Sun, 30 Jun 2024 12:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719774127; cv=none; d=google.com; s=arc-20160816; b=PyGAXFL/c913Tlj+JWCaW9kWaVn+RziWCHc+K684ALjEY0ZPbzRmfjOi87bk0utshm G5aGkqL2jAAQ3vGYeNzIHJ7VASfYQbJ5H/UfaI5n1UhuvkBWpgGfqLxNchhLLepL99CE 7V/6T0zdBA+Yd6uTKpLNskI0n4qHgMEKCKFz2qjejce3FqhbVm0wVwAiI5idnnAC2454 nom4cknlchBKGwR6Eeuv3bQIywDilq/f9cKA4SLfHz0ihj/dMMlSfX92csu8k7FRzLGI RC7geE4HPyPHd3cENNv9/RgMn18HyyxRPV/MlSpPQpEQfzIdQeVS2YhTQ7I3gPSKguaW SOjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=FTAXIrXnB/PD2XabsVpOCoLz7F3reaebPtysv0EnFvo=; fh=m75Mm+Gv5Bbap8d+kXNEQQV4hpb219dTdfnHt9ctQLQ=; b=MIwx9xEcBs+kqlTQa74lH10kBlwxfkSHpoowUkHdfEBRHQDO8wpGQNzO6nBoF+VnCc yKpHflV2t7iVP2Kg7mE/tx8NTTL3XiD319tWYOLT+iZ5fCybg+gLkEf5Q5IkJsKRSauy VNg33XJCAI75VsgQWt6KHwL7kR763rvO6bo5raZIM5QPqGKcBlqseoR3wqddMesL8ASE qRXkgST6PVprqEnVKhvGERrKlAo9fbDn/PmYDFm6kEApIx7QpOr2V7GsgRRTmLsSRXJ+ 9jJRtK8Oe4GFSHoyDEiJIe/5qMVeSiz4k4KqikvMGUDFDXaSA8fpytRPWZqPUnpsSpMd zW1Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qPEoS6Rk; 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=pass (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 af79cd13be357-79d6934b71asi633904885a.709.2024.06.30.12.02.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Jun 2024 12:02:07 -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=pass header.i=@linaro.org header.s=google header.b=qPEoS6Rk; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNznQ-0004t4-QJ; Sun, 30 Jun 2024 15:01:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNznJ-0004n7-RR for qemu-devel@nongnu.org; Sun, 30 Jun 2024 15:01:04 -0400 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNznF-0007UN-Rj for qemu-devel@nongnu.org; Sun, 30 Jun 2024 15:01:01 -0400 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7f38f5584ebso97649339f.3 for ; Sun, 30 Jun 2024 12:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719774054; x=1720378854; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FTAXIrXnB/PD2XabsVpOCoLz7F3reaebPtysv0EnFvo=; b=qPEoS6RkxQQV9fyG/6S181JzXMlrTVWcj5ySqbfkeTcbzxhBPVImFb08PGgqQ7ce4G RchZIIlUdQe+suP95Dz+QsGwWyIvmRdeNnYyfOIY0aRGbYy3RHXPiHSn2LhRjvQsVTMB Az9VbBw+q6DJgXoklXhBNi1ZeUNO8JYA4dAahTmWwiWfViO3Lj61GC6HbhDtR+gCG3pp v+IfOBDPVjjGk3BlmWGZvy7jAr3+LWPhQEWrbB3aIMJHNQzjTF/L2ASrZN5kDiq5/Ms6 PNqlEH7udGLqesf7ll3wh5Zn0Uz1go1mPA5PreaFhAzw4+5ktOhWuXAJ8HKPy+fveuIv 8D6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719774054; x=1720378854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FTAXIrXnB/PD2XabsVpOCoLz7F3reaebPtysv0EnFvo=; b=Q0n2dCz6Ez182vJ8afKlDbWMM4BzFUD41AhKKIb7azZL3LETobYvgSLsq7DRUy98K7 gmg4pvqOHyIyEoKyHAhDZhaZERqXH8F+kYyuUf6jqLuAlTFnqhKIK2DpyKJWa/7PP6Ir rPBuVUw1n0hSxQeLSTn4AyWtuEWkOz3EMt3u+5DKoXzYKCGgvWpWxwJfK17YooXXNu04 5OOwIzeWaqFHkSkcUTbObVwsLifdX+aqSQjGADqVKbs12U738elFcqMglvGmyRR6uwWv uxFWC6e1bVEEilsZR8uqrno8T8sv7iYpfAT2b2Ll5A6ejdnL+VcUqtNwUWSYt1vVxDF+ dD4A== X-Gm-Message-State: AOJu0YzJltX+pn9TWlDr0M3pFN3vITt/TRPFViV0FRU2kXyD+elXhBrQ 953FYj38LjtGqnWyltqnXZpfCpDm2wyjmU3ynTOUO2+afP3X6ebslVGChbrokQLZMiAHR4folQI f X-Received: by 2002:a6b:ce01:0:b0:7eb:7887:a496 with SMTP id ca18e2360f4ac-7f62ee118a2mr450992939f.4.1719774054553; Sun, 30 Jun 2024 12:00:54 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91d3e7e4bsm5115641a91.52.2024.06.30.12.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 12:00:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: akihiko.odaki@daynix.com, alex.bennee@linaro.org, qemu-arm@nongnu.org Subject: [PATCH v4 02/14] tests/tcg: Adjust variable defintion from cc-option Date: Sun, 30 Jun 2024 12:00:38 -0700 Message-Id: <20240630190050.160642-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240630190050.160642-1-richard.henderson@linaro.org> References: <20240630190050.160642-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d2c; envelope-from=richard.henderson@linaro.org; helo=mail-io1-xd2c.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=unavailable 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Define the variable to the compiler flag used, not "y". This avoids replication of the compiler flag itself. Signed-off-by: Richard Henderson --- tests/tcg/Makefile.target | 2 +- tests/tcg/aarch64/Makefile.softmmu-target | 2 +- tests/tcg/aarch64/Makefile.target | 15 ++++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index f21be50d3b..cb8cfeb6da 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -49,7 +49,7 @@ quiet-command = $(call quiet-@,$2,$3)$1 cc-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 cc-option = if $(call cc-test, $1); then \ - echo "$(TARGET_PREFIX)$1 detected" && echo "$(strip $2)=y" >&3; else \ + echo "$(TARGET_PREFIX)$1 detected" && echo "$(strip $2)=$(strip $1)" >&3; else \ echo "$(TARGET_PREFIX)$1 not detected"; fi # $1 = test name, $2 = cmd, $3 = desc diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index 4b03ef602e..39d3f961c5 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -81,7 +81,7 @@ run-memory-replay: memory-replay run-memory-record EXTRA_RUNS+=run-memory-replay ifneq ($(CROSS_CC_HAS_ARMV8_3),) -pauth-3: CFLAGS += -march=armv8.3-a +pauth-3: CFLAGS += $(CROSS_CC_HAS_ARMV8_3) else pauth-3: $(call skip-test, "BUILD of $@", "missing compiler support") diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 70d728ae9a..e6d5e008a8 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -32,17 +32,17 @@ config-cc.mak: Makefile ifneq ($(CROSS_CC_HAS_ARMV8_2),) AARCH64_TESTS += dcpop -dcpop: CFLAGS += -march=armv8.2-a +dcpop: CFLAGS += $(CROSS_CC_HAS_ARMV8_2) endif ifneq ($(CROSS_CC_HAS_ARMV8_5),) AARCH64_TESTS += dcpodp -dcpodp: CFLAGS += -march=armv8.5-a +dcpodp: CFLAGS += $(CROSS_CC_HAS_ARMV8_5) endif # Pauth Tests ifneq ($(CROSS_CC_HAS_ARMV8_3),) AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 -pauth-%: CFLAGS += -march=armv8.3-a +pauth-%: CFLAGS += $(CROSS_CC_HAS_ARMV8_3) run-pauth-1: QEMU_OPTS += -cpu max run-pauth-2: QEMU_OPTS += -cpu max # Choose a cpu with FEAT_Pauth but without FEAT_FPAC for pauth-[45]. @@ -54,7 +54,7 @@ endif # bti-1 tests the elf notes, so we require special compiler support. ifneq ($(CROSS_CC_HAS_ARMV8_BTI),) AARCH64_TESTS += bti-1 bti-3 -bti-1 bti-3: CFLAGS += -fno-stack-protector -mbranch-protection=standard +bti-1 bti-3: CFLAGS += -fno-stack-protector $(CROSS_CC_HAS_ARMV8_BTI) bti-1 bti-3: LDFLAGS += -nostdlib endif # bti-2 tests PROT_BTI, so no special compiler support required. @@ -63,12 +63,13 @@ AARCH64_TESTS += bti-2 # MTE Tests ifneq ($(CROSS_CC_HAS_ARMV8_MTE),) AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 mte-5 mte-6 mte-7 -mte-%: CFLAGS += -march=armv8.5-a+memtag +mte-%: CFLAGS += $(CROSS_CC_HAS_ARMV8_MTE) endif # SME Tests ifneq ($(CROSS_AS_HAS_ARMV9_SME),) AARCH64_TESTS += sme-outprod1 sme-smopa-1 sme-smopa-2 +sme-outprod1 sme-smopa-1 sme-smopa-2: CFLAGS += $(CROSS_AS_HAS_ARMV9_SME) endif # System Registers Tests @@ -98,7 +99,7 @@ TESTS += sha512-vector ifneq ($(CROSS_CC_HAS_SVE),) # SVE ioctl test AARCH64_TESTS += sve-ioctls -sve-ioctls: CFLAGS+=-march=armv8.1-a+sve +sve-ioctls: CFLAGS += $(CROSS_CC_HAS_SVE) sha512-sve: CFLAGS=-O3 -march=armv8.1-a+sve sha512-sve: sha512.c @@ -133,7 +134,7 @@ endif ifneq ($(CROSS_CC_HAS_SVE2),) AARCH64_TESTS += test-826 -test-826: CFLAGS+=-march=armv8.1-a+sve2 +test-826: CFLAGS += $(CROSS_CC_HAS_SVE2) endif TESTS += $(AARCH64_TESTS)