]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add CXXFLAGS to ALL_LDFLAGS (#1178)
authorRyan Schmidt <ryandesign@macports.org>
Thu, 14 Jun 2018 20:05:33 +0000 (15:05 -0500)
committerNick Terrell <nickrterrell@gmail.com>
Thu, 14 Jun 2018 20:05:33 +0000 (13:05 -0700)
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.

contrib/pzstd/Makefile

index e15795f72c1206ae51b54cbc1df4a914c0e3bbd2..14b9322977140053594b29663a739c2b57744473 100644 (file)
@@ -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.