summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-06-13 15:31:53 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-06-13 15:31:53 -0400
commitc331357a9d23982f0b6378e3e6c8476f66d1313c (patch)
treec991d276655a821fa23266b0ab8bd81505aef7cb
parent491dde55a5d153b567dc20b203b492f7c73b64c0 (diff)
downloadbfs-c331357a9d23982f0b6378e3e6c8476f66d1313c.tar.xz
build: Include CC in bfs --version output
-rw-r--r--build/header.mk1
-rw-r--r--src/parse.c1
-rw-r--r--src/prelude.h1
-rw-r--r--src/version.c4
4 files changed, 7 insertions, 0 deletions
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"
};