--- lib/freebl/Makefile~
+++ lib/freebl/Makefile
@@ -201,7 +201,7 @@ ifeq ($(USE_N32),1)
 endif
 endif
 
-ifeq ($(OS_TARGET),Linux)
+ifeq (,$(filter-out Linux MidnightBSD, $(OS_TARGET)))
 ifeq ($(CPU_ARCH),x86_64)
     ASFILES  = arcfour-amd64-gas.s mpi_amd64_gas.s
     ASFLAGS += -march=opteron -m64 -fPIC -Wa,--noexecstack
