From 59292dded6717cb59a1b7d76a6a38058ef0086e4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 26 Aug 2024 21:26:47 +0200 Subject: Add a sha1 for arm64 with crypto extensions --- make.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'make.c') diff --git a/make.c b/make.c index 82e3b0f..6d64b2b 100644 --- a/make.c +++ b/make.c @@ -50,7 +50,7 @@ static void usage(void) { fprintf(stderr, - "Usage: %s [-p generic|x64] [-fSr]\n" + "Usage: %s [-p generic|arm64|x64] [-fSr]\n" " %s clean\n", argv0, argv0); exit(EXIT_FAILURE); @@ -90,7 +90,10 @@ main(int argc, char **argv) assert(oflag != NULL); break; case 'p': - if (strcmp(optarg, "generic") == 0 || strcmp(optarg, "x64") == 0) { + if (strcmp(optarg, "generic") == 0 + || strcmp(optarg, "arm64") == 0 + || strcmp(optarg, "x64") == 0) + { pflag = strdup(optarg); assert(pflag != NULL); } else { @@ -164,6 +167,8 @@ cc(void *arg) if (strstr(arg, "-x64.c") != NULL) strspushl(&cmd, "-msha", "-mssse3"); } + if (strstr(arg, "-arm64.c") != NULL) + strspushl(&cmd, "-march=native+crypto"); if (!Sflag) strspushl(&cmd, "-fsanitize=address,undefined"); strspushl(&cmd, "-o", dst, "-c", src); -- cgit v1.2.3