COPTS+=-Oz -fno-stack-protector
COPTS+=-fno-unwind-tables -fno-asynchronous-unwind-tables
+
+.if ${MACHINE} == "amd64"
+COPTS+=-fcf-protection=none
+.endif
+.if ${MACHINE} == "arm64"
+COPTS+=-mbranch-protection=none
+.endif
+
MAN=
LDSTATIC=-static
NOPIE=
-/* $OpenBSD: crunchgen.c,v 1.25 2021/11/15 15:14:24 millert Exp $ */
+/* $OpenBSD: crunchgen.c,v 1.26 2023/04/16 19:57:01 deraadt Exp $ */
/*
* Copyright (c) 1994 University of Maryland
fprintf(outmk, "CFLAGS+=-Oz\n");
fprintf(outmk, "CFLAGS+=-fno-stack-protector\n");
fprintf(outmk, "CFLAGS+=-fno-unwind-tables\n");
+ fprintf(outmk, ".if ${MACHINE} == \"amd64\"\n");
+ fprintf(outmk, "CFLAGS+=-fcf-protection=none\n");
+ fprintf(outmk, ".endif\n");
+ fprintf(outmk, ".if ${MACHINE} == \"arm64\"\n");
+ fprintf(outmk, "CFLAGS+=-mbranch-protection=none\n");
+ fprintf(outmk, ".endif\n");
fprintf(outmk, "CFLAGS+=-fno-asynchronous-unwind-tables\n");
fprintf(outmk, "LDFLAGS+=$(NOPIE_LDFLAGS)\n");
fprintf(outmk, "STRIP?=strip\n");