From: Ryan Schmidt Date: Thu, 14 Jun 2018 20:05:33 +0000 (-0500) Subject: Add CXXFLAGS to ALL_LDFLAGS (#1178) X-Git-Tag: v1.3.5~3^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf30b9caf4d8afa907fd1b3424475fccbd48a915;p=thirdparty%2Fzstd.git Add CXXFLAGS to ALL_LDFLAGS (#1178) pzstd requires C++11, which older C++ standard libraries like libstdc++ as used on OS X 10.8 and earlier don't support. The user might address this by setting "CXXFLAGS=-stdlib=libc++". This flag must be used both at compile time and at link time. Asking the user to also put the flag in LDFLAGS is undesirable because then the flag would also be used when linking C code, which would be inappropriate. --- diff --git a/contrib/pzstd/Makefile b/contrib/pzstd/Makefile index e15795f72..14b932297 100644 --- a/contrib/pzstd/Makefile +++ b/contrib/pzstd/Makefile @@ -42,7 +42,7 @@ PZSTD_LDFLAGS = EXTRA_FLAGS = ALL_CFLAGS = $(EXTRA_FLAGS) $(CPPFLAGS) $(PZSTD_CPPFLAGS) $(CFLAGS) $(PZSTD_CFLAGS) ALL_CXXFLAGS = $(EXTRA_FLAGS) $(CPPFLAGS) $(PZSTD_CPPFLAGS) $(CXXFLAGS) $(PZSTD_CXXFLAGS) -ALL_LDFLAGS = $(EXTRA_FLAGS) $(LDFLAGS) $(PZSTD_LDFLAGS) +ALL_LDFLAGS = $(EXTRA_FLAGS) $(CXXFLAGS) $(LDFLAGS) $(PZSTD_LDFLAGS) # gtest libraries need to go before "-lpthread" because they depend on it.