Fix C++
diff --git a/Makefile b/Makefile
index 8f86ae1..5abd21c 100644
--- a/Makefile
+++ b/Makefile
@@ -93,7 +93,7 @@
CC_opt = $(DEFAULT_CC)
CXX_opt = $(DEFAULT_CXX)
LD_opt = $(DEFAULT_CC)
-LDXX_opt = $(DEFAULT_CC)
+LDXX_opt = $(DEFAULT_CXX)
CPPFLAGS_opt = -O2
LDFLAGS_opt = -rdynamic
DEFINES_opt = NDEBUG
@@ -102,7 +102,7 @@
CC_basicprof = $(DEFAULT_CC)
CXX_basicprof = $(DEFAULT_CXX)
LD_basicprof = $(DEFAULT_CC)
-LDXX_basicprof = $(DEFAULT_CC)
+LDXX_basicprof = $(DEFAULT_CXX)
CPPFLAGS_basicprof = -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC
DEFINES_basicprof = NDEBUG
@@ -110,7 +110,7 @@
CC_helgrind = $(DEFAULT_CC)
CXX_helgrind = $(DEFAULT_CXX)
LD_helgrind = $(DEFAULT_CC)
-LDXX_helgrind = $(DEFAULT_CC)
+LDXX_helgrind = $(DEFAULT_CXX)
CPPFLAGS_helgrind = -O0
LDFLAGS_helgrind = -rdynamic
DEFINES_helgrind = _DEBUG DEBUG
@@ -141,7 +141,7 @@
CC_dbg = $(DEFAULT_CC)
CXX_dbg = $(DEFAULT_CXX)
LD_dbg = $(DEFAULT_CC)
-LDXX_dbg = $(DEFAULT_CC)
+LDXX_dbg = $(DEFAULT_CXX)
CPPFLAGS_dbg = -O0
LDFLAGS_dbg = -rdynamic
DEFINES_dbg = _DEBUG DEBUG
@@ -150,7 +150,7 @@
CC_stapprof = $(DEFAULT_CC)
CXX_stapprof = $(DEFAULT_CXX)
LD_stapprof = $(DEFAULT_CC)
-LDXX_stapprof = $(DEFAULT_CC)
+LDXX_stapprof = $(DEFAULT_CXX)
CPPFLAGS_stapprof = -O2 -DGRPC_STAP_PROFILER
DEFINES_stapprof = NDEBUG
@@ -168,7 +168,7 @@
CC_memcheck = $(DEFAULT_CC)
CXX_memcheck = $(DEFAULT_CXX)
LD_memcheck = $(DEFAULT_CC)
-LDXX_memcheck = $(DEFAULT_CC)
+LDXX_memcheck = $(DEFAULT_CXX)
CPPFLAGS_memcheck = -O0
LDFLAGS_memcheck = -rdynamic
DEFINES_memcheck = _DEBUG DEBUG
@@ -211,7 +211,7 @@
CC_mutrace = $(DEFAULT_CC)
CXX_mutrace = $(DEFAULT_CXX)
LD_mutrace = $(DEFAULT_CC)
-LDXX_mutrace = $(DEFAULT_CC)
+LDXX_mutrace = $(DEFAULT_CXX)
CPPFLAGS_mutrace = -O0
LDFLAGS_mutrace = -rdynamic
DEFINES_mutrace = _DEBUG DEBUG
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 1b522da..9d8a824 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -110,7 +110,7 @@
% if args.get('compile_the_world', False):
REQUIRE_CUSTOM_LIBRARIES_${name} = 1
% endif
- % for tool, default in [('CC', 'CC'), ('CXX', 'CXX'), ('LD', 'CC'), ('LDXX', 'CC')]:
+ % for tool, default in [('CC', 'CC'), ('CXX', 'CXX'), ('LD', 'CC'), ('LDXX', 'CXX')]:
${tool}_${name} = ${args.get(tool, '$(DEFAULT_%s)' % default)}
% endfor
% for arg in ['CFLAGS', 'CXXFLAGS', 'CPPFLAGS', 'LDFLAGS', 'DEFINES']: