mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 22:11:53 -06:00
tests/tcg: Adjust variable defintion from cc-option
Define the variable to the compiler flag used, not "y". This avoids replication of the compiler flag itself. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-Id: <20240630190050.160642-3-richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240705084047.857176-8-alex.bennee@linaro.org>
This commit is contained in:
parent
7e3798eddd
commit
546215d38a
3 changed files with 10 additions and 9 deletions
|
@ -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-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1
|
||||||
cc-option = if $(call cc-test, $1); then \
|
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
|
echo "$(TARGET_PREFIX)$1 not detected"; fi
|
||||||
|
|
||||||
# $1 = test name, $2 = cmd, $3 = desc
|
# $1 = test name, $2 = cmd, $3 = desc
|
||||||
|
|
|
@ -81,7 +81,7 @@ run-memory-replay: memory-replay run-memory-record
|
||||||
EXTRA_RUNS+=run-memory-replay
|
EXTRA_RUNS+=run-memory-replay
|
||||||
|
|
||||||
ifneq ($(CROSS_CC_HAS_ARMV8_3),)
|
ifneq ($(CROSS_CC_HAS_ARMV8_3),)
|
||||||
pauth-3: CFLAGS += -march=armv8.3-a
|
pauth-3: CFLAGS += $(CROSS_CC_HAS_ARMV8_3)
|
||||||
else
|
else
|
||||||
pauth-3:
|
pauth-3:
|
||||||
$(call skip-test, "BUILD of $@", "missing compiler support")
|
$(call skip-test, "BUILD of $@", "missing compiler support")
|
||||||
|
|
|
@ -32,17 +32,17 @@ config-cc.mak: Makefile
|
||||||
|
|
||||||
ifneq ($(CROSS_CC_HAS_ARMV8_2),)
|
ifneq ($(CROSS_CC_HAS_ARMV8_2),)
|
||||||
AARCH64_TESTS += dcpop
|
AARCH64_TESTS += dcpop
|
||||||
dcpop: CFLAGS += -march=armv8.2-a
|
dcpop: CFLAGS += $(CROSS_CC_HAS_ARMV8_2)
|
||||||
endif
|
endif
|
||||||
ifneq ($(CROSS_CC_HAS_ARMV8_5),)
|
ifneq ($(CROSS_CC_HAS_ARMV8_5),)
|
||||||
AARCH64_TESTS += dcpodp
|
AARCH64_TESTS += dcpodp
|
||||||
dcpodp: CFLAGS += -march=armv8.5-a
|
dcpodp: CFLAGS += $(CROSS_CC_HAS_ARMV8_5)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Pauth Tests
|
# Pauth Tests
|
||||||
ifneq ($(CROSS_CC_HAS_ARMV8_3),)
|
ifneq ($(CROSS_CC_HAS_ARMV8_3),)
|
||||||
AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 test-2375
|
AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 test-2375
|
||||||
pauth-%: CFLAGS += -march=armv8.3-a
|
pauth-%: CFLAGS += $(CROSS_CC_HAS_ARMV8_3)
|
||||||
test-2375: CFLAGS += -march=armv8.3-a
|
test-2375: CFLAGS += -march=armv8.3-a
|
||||||
run-pauth-1: QEMU_OPTS += -cpu max
|
run-pauth-1: QEMU_OPTS += -cpu max
|
||||||
run-pauth-2: QEMU_OPTS += -cpu max
|
run-pauth-2: QEMU_OPTS += -cpu max
|
||||||
|
@ -55,7 +55,7 @@ endif
|
||||||
# bti-1 tests the elf notes, so we require special compiler support.
|
# bti-1 tests the elf notes, so we require special compiler support.
|
||||||
ifneq ($(CROSS_CC_HAS_ARMV8_BTI),)
|
ifneq ($(CROSS_CC_HAS_ARMV8_BTI),)
|
||||||
AARCH64_TESTS += bti-1 bti-3
|
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
|
bti-1 bti-3: LDFLAGS += -nostdlib
|
||||||
endif
|
endif
|
||||||
# bti-2 tests PROT_BTI, so no special compiler support required.
|
# bti-2 tests PROT_BTI, so no special compiler support required.
|
||||||
|
@ -64,12 +64,13 @@ AARCH64_TESTS += bti-2
|
||||||
# MTE Tests
|
# MTE Tests
|
||||||
ifneq ($(CROSS_CC_HAS_ARMV8_MTE),)
|
ifneq ($(CROSS_CC_HAS_ARMV8_MTE),)
|
||||||
AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 mte-5 mte-6 mte-7
|
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
|
endif
|
||||||
|
|
||||||
# SME Tests
|
# SME Tests
|
||||||
ifneq ($(CROSS_AS_HAS_ARMV9_SME),)
|
ifneq ($(CROSS_AS_HAS_ARMV9_SME),)
|
||||||
AARCH64_TESTS += sme-outprod1 sme-smopa-1 sme-smopa-2
|
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
|
endif
|
||||||
|
|
||||||
# System Registers Tests
|
# System Registers Tests
|
||||||
|
@ -99,7 +100,7 @@ TESTS += sha512-vector
|
||||||
ifneq ($(CROSS_CC_HAS_SVE),)
|
ifneq ($(CROSS_CC_HAS_SVE),)
|
||||||
# SVE ioctl test
|
# SVE ioctl test
|
||||||
AARCH64_TESTS += sve-ioctls
|
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: CFLAGS=-O3 -march=armv8.1-a+sve
|
||||||
sha512-sve: sha512.c
|
sha512-sve: sha512.c
|
||||||
|
@ -134,7 +135,7 @@ endif
|
||||||
|
|
||||||
ifneq ($(CROSS_CC_HAS_SVE2),)
|
ifneq ($(CROSS_CC_HAS_SVE2),)
|
||||||
AARCH64_TESTS += test-826
|
AARCH64_TESTS += test-826
|
||||||
test-826: CFLAGS+=-march=armv8.1-a+sve2
|
test-826: CFLAGS += $(CROSS_CC_HAS_SVE2)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TESTS += $(AARCH64_TESTS)
|
TESTS += $(AARCH64_TESTS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue