$NetBSD: patch-me,v 1.5 2019/12/03 14:29:21 ryoon Exp $

Add DragonFly support.
Always include GCM for aarch64.

--- nss/lib/freebl/Makefile.orig	2019-11-19 19:55:30.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)
     ifdef CC_IS_CLANG
@@ -318,7 +321,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
 
@@ -470,7 +473,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
