From cc309c3b12a5db715e2898aeb22cf565f504a1de Mon Sep 17 00:00:00 2001 From: James Bonfield Date: Thu, 18 Jul 2024 16:41:48 +0100 Subject: [PATCH] Report the compiler and version when building. Useful when diagnosing CI systems. --- .cirrus.yml | 1 + Makefile | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index d5d06bcff..c144e75b7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -40,6 +40,7 @@ compile_template: &COMPILE else MAKE_OPTS=-e fi + make cc-version if test "x$DO_MAINTAINER_CHECKS" = "xyes"; then make maintainer-check fi diff --git a/Makefile b/Makefile index 8cea55554..bb55ff034 100644 --- a/Makefile +++ b/Makefile @@ -113,8 +113,14 @@ BUILT_THRASH_PROGRAMS = \ test/thrash_threads6 \ test/thrash_threads7 -all: lib-static lib-shared $(BUILT_PROGRAMS) plugins $(BUILT_TEST_PROGRAMS) \ - htslib_static.mk htslib-uninstalled.pc +all: lib-static lib-shared $(BUILT_PROGRAMS) plugins \ + $(BUILT_TEST_PROGRAMS) htslib_static.mk htslib-uninstalled.pc + +# Report compiler and version +cc-version: + -@$(CC) --version 2>/dev/null || true + -@$(CC) --qversion 2>/dev/null || true + -@$(CC) -V 2>/dev/null || true ALL_CPPFLAGS = -I. $(CPPFLAGS) @@ -996,3 +1002,4 @@ force: .PHONY: clean-dylib install-dylib .PHONY: test_htscodecs_rans4x8 test_htscodecs_rans4x16 test_htscodecs_arith .PHONY: test_htscodecs_tok3 test_htscodecs_fqzcomp test_htscodecs_varint +.PHONY: cc-version