Skip to content

Commit

Permalink
Fix macOS build
Browse files Browse the repository at this point in the history
We should not need lstdc++ as the C++ compiler driver will add that during linking.
  • Loading branch information
zeux committed Jun 11, 2024
1 parent c68707a commit 07da668
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 07da668

Please sign in to comment.