$NetBSD: patch-me,v 1.5.4.1 2020/01/18 22:29:05 bsiegert Exp $

Add DragonFly support.
Always include GCM for aarch64.

--- nss/lib/freebl/Makefile.orig	2020-01-03 20:27:43.000000000 +0000
+++ nss/lib/freebl/Makefile
@@ -101,6 +101,9 @@ endif
 ifdef NSS_NO_INIT_SUPPORT
     DEFINES += -DNSS_NO_INIT_SUPPORT
 endif
+ifeq ($(CPU_ARCH),aarch64)
+    EXTRA_SRCS += gcm-aarch64.c
+endif
 
 ifdef FREEBL_PRELINK_COMMAND
 	DEFINES +=-DFREEBL_PRELINK_COMMAND=\"$(FREEBL_PRELINK_COMMAND)\"
@@ -121,7 +124,7 @@ endif
 endif
 ifeq ($(CPU_ARCH),aarch64)
     DEFINES += -DUSE_HW_AES
-    EXTRA_SRCS += aes-armv8.c gcm-aarch64.c
+    EXTRA_SRCS += aes-armv8.c
 endif
 ifeq ($(CPU_ARCH),arm)
     EXTRA_SRCS += gcm-arm32-neon.c
@@ -320,7 +323,7 @@ endif
 # to bind the blapi function references in FREEBLVector vector
 # (ldvector.c) to the blapi functions defined in the freebl
 # shared libraries.
-ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
+ifeq (,$(filter-out BSD_OS DragonFly FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
     MKSHLIB += -Wl,-Bsymbolic
 endif
 
@@ -472,7 +475,11 @@ else
     ifdef NS_USE_GCC
 	LD = gcc
 	AS = gcc
+        ifdef CC_IS_CLANG
+	ASFLAGS = -no-integrated-as
+        else
 	ASFLAGS = -x assembler-with-cpp
+        endif
     endif
     ifeq ($(USE_64),1)
 	# Solaris for AMD64
