aboutsummaryrefslogtreecommitdiff
path: root/tools/build/Build.include
diff options
context:
space:
mode:
authorWang Nan <[email protected]>2016-09-26 07:26:55 +0000
committerArnaldo Carvalho de Melo <[email protected]>2016-10-05 19:58:51 -0300
commitf61bdc3304281e9ff9eec4f1ed9fb15bcf4d8a5e (patch)
tree039e05791992e7c49ceadfbf52535f4d7ecef481 /tools/build/Build.include
parent2ad8327fd0013ee07f056d28faddc2e7f01dd127 (diff)
tools build: Support compiling C++ source file
Add new rule to compile .cpp file to .o use g++. C++ support is required for built-in clang and LLVM support. Linker side support will be introduced by following commits. Signed-off-by: Wang Nan <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: He Kuang <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Zefan Li <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/build/Build.include')
-rw-r--r--tools/build/Build.include1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/build/Build.include b/tools/build/Build.include
index 02489380d79b..1dcb95e76f70 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -90,6 +90,7 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
# - per object C flags
# - BUILD_STR macro to allow '-D"$(variable)"' constructs
c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj))
+cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAGS_$(basetarget).o) $(CXXFLAGS_$(obj))
###
## HOSTCC C flags