$NetBSD: patch-GNUmakefile,v 1.1 2017/05/18 21:20:23 adam Exp $

Avoid -march=native compiler flag.
On Darwin, use absolute path to avoid conflict with devel/libtool.

--- GNUmakefile.orig	2016-10-10 23:49:54.000000000 +0000
+++ GNUmakefile
@@ -125,12 +125,6 @@ ifeq ($(IS_X86)$(IS_X32)$(IS_CYGWIN)$(IS
  endif
 endif
 
-# Guard use of -march=native
-ifeq ($(GCC42_OR_LATER)$(IS_NETBSD),10)
-   CXXFLAGS += -march=native
-else ifneq ($(CLANG_COMPILER)$(INTEL_COMPILER),00)
-   CXXFLAGS += -march=native
-else
   # GCC 3.3 and "unknown option -march="
   # Ubuntu GCC 4.1 compiler crash with -march=native
   # NetBSD GCC 4.8 compiler and "bad value (native) for -march= switch"
@@ -140,7 +134,6 @@ else
   else ifeq ($(SUN_COMPILER)$(IS_X86),01)
     CXXFLAGS += -m32
   endif # X86/X32/X64
-endif
 
 # Aligned access required for -O3 and above due to vectorization
 UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
@@ -271,7 +264,7 @@ endif # OpenMP
 endif # IS_LINUX
 
 ifneq ($(IS_DARWIN),0)
-AR = libtool
+AR = /usr/bin/libtool
 ARFLAGS = -static -o
 CXX ?= c++
 ifeq ($(IS_GCC_29),1)
