ports/devel/ccache/files/extra-patch-memcached-Makefile.in
Bryan Drewery ce7bc2bba9 ccache-memcached: Fix STATIC build.
Libmemcached is a C++ library, thus we need to use a C++ linker to link to it.
This is only really a problem when building a static binary since we need to
bring in various libc++ and libcxxrt symbols.  The upstream ccache+memcached
patch had support for this with --enable-static but only via a hack for
GCC to force addding -lstdc++.  The method in these patches works
for either compiler by using CXX to check for -lmemcached, and later using
CXX to link ccache.
2017-03-09 21:05:23 +00:00

11 lines
444 B
Text

--- Makefile.in.orig 2017-03-09 13:00:34.016595000 -0800
+++ Makefile.in 2017-03-09 13:00:39.656086000 -0800
@@ -74,7 +74,7 @@ files_to_distclean = Makefile config.h c
all: ccache$(EXEEXT)
ccache$(EXEEXT): $(ccache_objs) $(extra_libs)
- $(CC) $(all_cflags) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS)
+ $(CXX) $(all_cflags) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS)
.PHONY: install
install: all $(srcdir)/ccache.1