CHECK_STRUCTS = @CHECK_STRUCTS@
HAVE_PDUMPER = @HAVE_PDUMPER@
+## ARM Macs require that all code have a valid signature. Since pump
+## invalidates the signature, we must re-sign to fix it.
+DO_CODESIGN=$(patsubst aarch64-apple-darwin%,yes,@configuration@)
+
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
$(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)
ifeq ($(HAVE_PDUMPER),yes)
$(AM_V_at)$(MAKE_PDUMPER_FINGERPRINT) $@.tmp
+ifeq ($(DO_CODESIGN),yes)
+ codesign -s - -f $@.tmp
+endif
endif
$(AM_V_at)mv $@.tmp $@
$(MKDIR_P) $(etc)