pkgsrc/audio/ardour/patches/patch-.waf-1.6.11-06ee4b7efbeab1252ed3b11499834d2a_waflib_Tools_c__config.py
joerg 1d744c4f2b Patch local WAF copy to run ${CXX} with -x c++ when detecting it.
Otherwise clang will bail out on - as it is considered a C source and
-std=c++11 as injected by the wrappers conflict.
2019-12-21 23:27:03 +00:00

16 lines
857 B
Python

$NetBSD: patch-.waf-1.6.11-06ee4b7efbeab1252ed3b11499834d2a_waflib_Tools_c__config.py,v 1.1 2019/12/21 23:27:04 joerg Exp $
When detecting the C++ compiler, force C++ mode for stdin as the wrappers
add -std=c++11 and that breaks for C input.
--- .waf-1.6.11-06ee4b7efbeab1252ed3b11499834d2a/waflib/Tools/c_config.py.orig 2019-12-21 19:28:02.658101225 +0000
+++ .waf-1.6.11-06ee4b7efbeab1252ed3b11499834d2a/waflib/Tools/c_config.py
@@ -553,7 +553,7 @@ def cxx_load_tools(conf):
conf.env.DEST_OS=Utils.unversioned_sys_platform()
conf.load('cxx')
def get_cc_version(conf,cc,gcc=False,icc=False):
- cmd=cc+['-dM','-E','-']
+ cmd=cc+(['-x','c++']if cc[0].endswith('+')else[])+['-dM','-E','-']
env=conf.env.env or None
try:
p=Utils.subprocess.Popen(cmd,stdin=Utils.subprocess.PIPE,stdout=Utils.subprocess.PIPE,stderr=Utils.subprocess.PIPE,env=env)