From 4cce9a9fd1ccbb0a2ecf616ddf1465ca86439c44 Mon Sep 17 00:00:00 2001 From: Nikolai Lifanov Date: Fri, 30 Dec 2016 08:19:00 -0500 Subject: [PATCH] respect ports tree CFLAGS and LFLAGS FreeBSD ports need to respect flags passed down by the build system. This enables FreeBSD hashcat port to use upstream hashcat source code patch-free. --- src/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 46da69094..33bb69b97 100644 --- a/src/Makefile +++ b/src/Makefile @@ -177,10 +177,12 @@ LFLAGS_NATIVE += -lpthread -ldl endif # Linux ifeq ($(UNAME),FreeBSD) +ifndef PORTNAME CFLAGS_NATIVE := $(CFLAGS) -CFLAGS_NATIVE += -I$(OPENCL_HEADERS_KHRONOS)/ -CFLAGS_NATIVE += -march=native LFLAGS_NATIVE := $(LFLAGS) +CFLAGS_NATIVE += -march=native +endif +CFLAGS_NATIVE += -I$(OPENCL_HEADERS_KHRONOS)/ LFLAGS_NATIVE += -lpthread endif # FreeBSD