From c331357a9d23982f0b6378e3e6c8476f66d1313c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 13 Jun 2024 15:31:53 -0400 Subject: build: Include CC in bfs --version output --- build/header.mk | 1 + src/parse.c | 1 + src/prelude.h | 1 + src/version.c | 4 ++++ 4 files changed, 7 insertions(+) diff --git a/build/header.mk b/build/header.mk index 8b28346..75fda41 100644 --- a/build/header.mk +++ b/build/header.mk @@ -64,6 +64,7 @@ gen/config.h: ${PKG_HEADERS} ${HEADERS} @cat ${.ALLSRC:%=%.log} >gen/config.log ${VCAT} $@ @printf '%s' "$$CONFIG" | build/embed.sh >gen/config.i + @printf '%s' "$$XCC" | build/embed.sh >gen/cc.i @printf '%s' "$$XCPPFLAGS" | build/embed.sh >gen/cppflags.i @printf '%s' "$$XCFLAGS" | build/embed.sh >gen/cflags.i @printf '%s' "$$XLDFLAGS" | build/embed.sh >gen/ldflags.i diff --git a/src/parse.c b/src/parse.c index a626391..9035344 100644 --- a/src/parse.c +++ b/src/parse.c @@ -2962,6 +2962,7 @@ static struct bfs_expr *parse_version(struct bfs_parser *parser, int arg1, int a printf("No rights reserved (https://opensource.org/license/0BSD)\n\n"); printf("CONFIG := %s\n", bfs_config); + printf("CC := %s\n", bfs_cc); printf("CPPFLAGS := %s\n", bfs_cppflags); printf("CFLAGS := %s\n", bfs_cflags); printf("LDFLAGS := %s\n", bfs_ldflags); diff --git a/src/prelude.h b/src/prelude.h index faa84ec..bca16b2 100644 --- a/src/prelude.h +++ b/src/prelude.h @@ -41,6 +41,7 @@ extern const char bfs_version[]; extern const char bfs_config[]; +extern const char bfs_cc[]; extern const char bfs_cppflags[]; extern const char bfs_cflags[]; extern const char bfs_ldflags[]; diff --git a/src/version.c b/src/version.c index e2d4c87..9e5c82f 100644 --- a/src/version.c +++ b/src/version.c @@ -11,6 +11,10 @@ const char bfs_config[] = { #include "config.i" }; +const char bfs_cc[] = { +#include "cc.i" +}; + const char bfs_cppflags[] = { #include "cppflags.i" }; -- cgit v1.2.3