mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
build: show the compiler and the toolchain in the version banner
The boot banner and the version command print the SDCC release and revision from the compiler's own macros, and the name of the in-tree toolchain the Makefile built, which is the checksum of sdcc/ and so changes with every patch in it. A build with CC given on the command line says "system" instead, since that compiler need not carry the patches. A plain release and the same release with the patches report the same revision, so the toolchain line is what tells them apart. Costs 66 bytes of BANK2.
This commit is contained in:
1 parent
26c420d26a
commit
1d158d21d1
3 files changed
+9
-1
No files matched your search
@@ -4,11 +4,14 @@ DEFAULT_CONFIG_LOCATION = 454656
|
||||
CONFIG_LOCATION = 458752
|
||||
HTML_LOCATION = 262144
|
||||
|
||||
SDCC_PREFIX = toolchain/sdcc-$(shell cat sdcc/* | cksum | cut -d' ' -f1)
|
||||
SDCC_TOOLCHAIN = sdcc-$(shell cat sdcc/* | cksum | cut -d' ' -f1)
|
||||
SDCC_PREFIX = toolchain/$(SDCC_TOOLCHAIN)
|
||||
ifeq ($(origin CC),default)
|
||||
SDCC = $(SDCC_PREFIX)/bin/sdcc
|
||||
CC = $(SDCC)
|
||||
ASM = $(SDCC_PREFIX)/bin/sdas8051
|
||||
else
|
||||
SDCC_TOOLCHAIN = system
|
||||
endif
|
||||
CC_FLAGS = -mmcs51 -I. -Imachine -Ihttpd -Iuip
|
||||
ASM ?= sdas8051
|
||||
@@ -172,6 +175,7 @@ $(VERSION_HEADER): FORCE
|
||||
@printf '%s\n' "#ifndef VERSION_H" "#define VERSION_H" \
|
||||
"#define VERSION_SW \"$(VERSION_EXTENSION)\"" \
|
||||
"#define BUILD_DATE \"$(BUILD_DATE)\"" \
|
||||
"#define SDCC_TOOLCHAIN \"$(SDCC_TOOLCHAIN)\"" \
|
||||
"#endif" > $(VERSION_HEADER).tmp
|
||||
@cmp -s $(VERSION_HEADER).tmp $(VERSION_HEADER) \
|
||||
&& rm -f $(VERSION_HEADER).tmp \
|
||||
|
||||
Reference in new issue
Block a user