diff -ur misc/openssl-1.0.2u/Configure misc/build/openssl-1.0.2u/Configure
--- misc/openssl-1.0.2u/Configure	2018-08-14 05:49:04.000000000 -0700
+++ misc/build/openssl-1.0.2u/Configure	2018-08-26 13:35:54.485021000 -0700
@@ -493,6 +493,9 @@
 
 "bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 
+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+
 "nextstep",	"cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 "nextstep3.3",	"cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 
diff -ur misc/openssl-1.0.2u/Makefile.org misc/build/openssl-1.0.2u/Makefile.org
--- misc/openssl-1.0.2u/Makefile.org	2018-08-14 05:48:56.000000000 -0700
+++ misc/build/openssl-1.0.2u/Makefile.org	2018-08-26 13:35:54.485813000 -0700
@@ -208,7 +208,7 @@
 # same language for uniform treatment.
 BUILDENV=	LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
 		CC='$(CC)' CFLAG='$(CFLAG)' 			\
-		AS='$(CC)' ASFLAG='$(CFLAG) -c'			\
+		AS='$(CC)' ASFLAG='$(CFLAG) -c -Wa,--noexecstack'	\
 		AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'	\
 		RC='$(RC)'              			\
 		CROSS_COMPILE='$(CROSS_COMPILE)'	\
