From b592dd734e42c42b2d6b5bbf76c4cf95b6784722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 10 Mar 2023 20:06:26 +0200 Subject: [PATCH] tests: Consistently use -gcc instead of -clang for cross compilation While -clang is more specific, using -gcc allows testing GCC based toolchains (somewhat) with the same scripts/makefiles too. --- run-tests.sh | 2 +- test/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 57f09f8..0c4b677 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -58,7 +58,7 @@ if ! $ANY_ARCH-w64-mingw32-gcc$TOOLEXT -E is-ucrt.c > /dev/null 2>&1; then fi rm -f is-ucrt.c -if (echo "int main(){}" | $ANY_ARCH-w64-mingw32-clang$TOOLEXT -x c++ - -o has-cfguard-test.exe -mguard=cf); then +if (echo "int main(){}" | $ANY_ARCH-w64-mingw32-gcc$TOOLEXT -x c++ - -o has-cfguard-test.exe -mguard=cf); then if llvm-readobj$TOOLEXT --coff-load-config has-cfguard-test.exe | grep -q 'CF_INSTRUMENTED (0x100)'; then HAVE_CFGUARD=1 elif [ -n "$HAVE_CFGUARD" ]; then diff --git a/test/Makefile b/test/Makefile index c068a52..0d0215d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -37,8 +37,8 @@ ifneq ($(ARCH),) CROSS = $(ARCH)-w64-mingw32- CROSS_UWP = $(ARCH)-w64-mingw32uwp- endif -CC = $(CROSS)clang$(TOOLEXT) -CXX = $(CROSS)clang++$(TOOLEXT) +CC = $(CROSS)gcc$(TOOLEXT) +CXX = $(CROSS)g++$(TOOLEXT) WIDL = $(CROSS)widl$(TOOLEXT) CC_UWP = $(CROSS_UWP)clang$(TOOLEXT)