Skip to content

Commit

Permalink
Add feature for architecture.
Browse files Browse the repository at this point in the history
Issue #955.
  • Loading branch information
ashinn committed May 16, 2024
1 parent 47f7ab0 commit 017e4b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ include/chibi/install.h: Makefile.libs Makefile.detect
echo '#define sexp_so_extension "'$(SO)'"' > $@
echo '#define sexp_default_module_path "'$(MODDIR):$(BINMODDIR):$(SNOWMODDIR):$(SNOWBINMODDIR)'"' >> $@
echo '#define sexp_platform "'$(PLATFORM)'"' >> $@
echo '#define sexp_architecture "'$(ARCH)'"' >> $@
echo '#define sexp_version "'$(CHIBI_VERSION)'"' >> $@
echo '#define sexp_release_name "'`cat RELEASE`'"' >> $@

Expand Down
4 changes: 4 additions & 0 deletions Makefile.detect
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ endif
endif
endif

ifndef ARCH
ARCH = $(shell uname -m)
endif

########################################################################
# Set default variables for the platform.

Expand Down
1 change: 1 addition & 0 deletions sexp.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ sexp sexp_finalize_c_type (sexp ctx, sexp self, sexp_sint_t n, sexp obj) {
/****************************** contexts ******************************/

static const char* sexp_initial_features[] = {
sexp_architecture,
sexp_platform,
#if SEXP_BSD
"bsd",
Expand Down

0 comments on commit 017e4b6

Please sign in to comment.