]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/conf/Makefile.arm64
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / conf / Makefile.arm64
index 78235b8be2547f2fe353f91acbbe8ab8dc105355..7daa433291771211604f8b4aecb67fe27d6263f2 100644 (file)
@@ -5,9 +5,42 @@
 CWARNFLAGS = $(CWARNFLAGS_STD) -Wshorten-64-to-32
 
 # Files that must go in the __HIB segment:
-HIB_FILES=
+UNCONFIGURED_HIB_FILES=                                        \
+           hibernate_restore.o          \
+           bcopy.o                     \
+           bzero.o                     \
+           cc_clear.o                  \
+           ccdigest_init.o             \
+           ccdigest_update.o           \
+           ccdigest_final_64be.o       \
+           cchmac.o                    \
+           cchmac_init.o               \
+           cchmac_update.o             \
+           cchmac_final.o              \
+           ccsha256_K.o                        \
+           ccsha256_initial_state.o    \
+           sha256_compress_arm64.o     \
+           memset_s.o
+
+
+HIB_FILES=$(filter $(UNCONFIGURED_HIB_FILES),$(OBJS))
+
+define ADD_HIB_CFLAGS
+# Unconfigured __HIB files must be Mach-O for "setsegname"
+$(1)_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG)
+# KASAN must be disabled for unconfigured __HIB files
+# because the kasan runtime isn't available during hibernation resume
+$(1)_CFLAGS_ADD += -fno-sanitize=address -UKASAN
+# Stack protector and stack check must be disabled because the stack protector runtime isn't available
+$(1)_CFLAGS_ADD += -fno-stack-protector -fno-stack-check
+endef
+
+$(foreach FILE,$(UNCONFIGURED_HIB_FILES),$(eval $(call ADD_HIB_CFLAGS,$(FILE))))
 
 lz4.o_CFLAGS_ADD += -fbuiltin -O3
+vfp_state_test.o_CFLAGS_ADD += -mno-implicit-float
+
+
 ######################################################################
 #END   Machine dependent Makefile fragment for arm64
 ######################################################################