From 07da668dd80b7076061a0469f90b8c7411a72bbb Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 10 Jun 2024 23:27:20 -0700 Subject: [PATCH] Fix macOS build We should not need lstdc++ as the C++ compiler driver will add that during linking. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 638cd1a..7c4a132 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ BUILD=build/make-$(CXX) CCFLAGS=-c -g -Wall -Werror -fPIC -O2 -Iextern/lz4/lib -Iextern/re2 CXXFLAGS=-std=c++11 -LDFLAGS=-lpthread -lstdc++ +LDFLAGS=-lpthread ifeq ($(shell uname -p),x86_64) CCFLAGS+=-msse2 -DUSE_SSE2 @@ -16,8 +16,9 @@ CCFLAGS+=-DUSE_NEON endif ifeq ($(shell uname),Darwin) -CCFLAGS+=-force_cpusubtype_ALL -mmacosx-version-min=10.7 -stdlib=libc++ -LDFLAGS+=-force_cpusubtype_ALL -mmacosx-version-min=10.7 -stdlib=libc++ +CCFLAGS+=-force_cpusubtype_ALL -mmacosx-version-min=10.7 +CXXFLAGS+=-stdlib=libc++ +LDFLAGS+=-mmacosx-version-min=10.7 LDFLAGS+=-framework CoreFoundation -framework CoreServices else LDFLAGS+=-pie -Wl,--dynamic-list=src/qgrep.dynlist