@@ -26,17 +26,20 @@ ARCHFLAGS=-march=armv8.4-a+sha3
2626# and the proofs checked against the object files (though you won't be able
2727# to run code without additional emulation infrastructure).
2828
29- ifeq ($(filter $(ARCHTYPE_RESULT ) ,aarch64 arm64) ,)
29+ ifeq ($(ARCHTYPE_RESULT ) -$(OSTYPE_RESULT ) ,x86_64-Darwin)
30+ ASSEMBLE =as -arch arm64
31+ OBJDUMP =otool -tvV
32+ else
33+ ifneq ($(filter $(ARCHTYPE_RESULT ) ,aarch64 arm64) ,)
3034CROSS_PREFIX =aarch64-unknown-linux-gnu-
3135# Check if cross-toolchain exists
3236ifeq ($(shell command -v $(ASSEMBLE ) >/dev/null 2>&1 && echo yes || echo no) ,no)
3337$(error Cross-toolchain not found. Please run in the 'hol_light' nix shell via : nix develop .# hol_light)
3438endif
3539endif
36-
3740ASSEMBLE =$(CROSS_PREFIX ) as $(ARCHFLAGS )
3841OBJDUMP =$(CROSS_PREFIX ) objdump -d
39- COMPILE = $( CROSS_PREFIX )$( CC )
42+ endif
4043
4144# Add explicit language input parameter to cpp, otherwise the use of #n for
4245# numeric literals in ARM code is a problem when used inside #define macros
@@ -46,9 +49,9 @@ COMPILE=$(CROSS_PREFIX)$(CC)
4649# by single-quote characters in comments, so we eliminate // comments first.
4750
4851ifeq ($(OSTYPE_RESULT ) ,Darwin)
49- PREPROCESS =sed -e 's/\/\/.*//' | $(COMPILE ) -E -xassembler-with-cpp -
52+ PREPROCESS =sed -e 's/\/\/.*//' | $(CC ) -E -xassembler-with-cpp -
5053else
51- PREPROCESS =$(COMPILE ) $( ARCHFLAGS ) -E -xassembler-with-cpp -
54+ PREPROCESS =$(CC ) -E -xassembler-with-cpp -
5255endif
5356
5457# Generally GNU-type assemblers are happy with multiple instructions on
0 commit comments