Add feature for architecture.

Issue #955.
This commit is contained in:
Alex Shinn 2024-05-16 23:28:29 +09:00
parent 47f7ab01cf
commit 017e4b6990
3 changed files with 6 additions and 0 deletions

View file

@ -94,6 +94,7 @@ include/chibi/install.h: Makefile.libs Makefile.detect
echo '#define sexp_so_extension "'$(SO)'"' > $@ echo '#define sexp_so_extension "'$(SO)'"' > $@
echo '#define sexp_default_module_path "'$(MODDIR):$(BINMODDIR):$(SNOWMODDIR):$(SNOWBINMODDIR)'"' >> $@ echo '#define sexp_default_module_path "'$(MODDIR):$(BINMODDIR):$(SNOWMODDIR):$(SNOWBINMODDIR)'"' >> $@
echo '#define sexp_platform "'$(PLATFORM)'"' >> $@ echo '#define sexp_platform "'$(PLATFORM)'"' >> $@
echo '#define sexp_architecture "'$(ARCH)'"' >> $@
echo '#define sexp_version "'$(CHIBI_VERSION)'"' >> $@ echo '#define sexp_version "'$(CHIBI_VERSION)'"' >> $@
echo '#define sexp_release_name "'`cat RELEASE`'"' >> $@ echo '#define sexp_release_name "'`cat RELEASE`'"' >> $@

View file

@ -52,6 +52,10 @@ endif
endif endif
endif endif
ifndef ARCH
ARCH = $(shell uname -m)
endif
######################################################################## ########################################################################
# Set default variables for the platform. # Set default variables for the platform.

1
sexp.c
View file

@ -460,6 +460,7 @@ sexp sexp_finalize_c_type (sexp ctx, sexp self, sexp_sint_t n, sexp obj) {
/****************************** contexts ******************************/ /****************************** contexts ******************************/
static const char* sexp_initial_features[] = { static const char* sexp_initial_features[] = {
sexp_architecture,
sexp_platform, sexp_platform,
#if SEXP_BSD #if SEXP_BSD
"bsd", "bsd",