From 3698959af9a7a34fa3fb3ddf999034a66f4e886f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 30 Apr 2020 11:54:39 +0200 Subject: sys/targets: fix detection of optional compiler flags The test source is now C++, so use -x c++. Stupid bug, but testing this is not trivial in the context where we specifically make behavior "flexible"... --- sys/targets/targets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/targets/targets.go b/sys/targets/targets.go index 73022ff6f..2ef575847 100644 --- a/sys/targets/targets.go +++ b/sys/targets/targets.go @@ -542,7 +542,7 @@ func (target *Target) lazyInit() { } func checkFlagSupported(target *Target, flag string) bool { - cmd := exec.Command(target.CCompiler, "-x", "c", "-", "-o", "/dev/null", flag) + cmd := exec.Command(target.CCompiler, "-x", "c++", "-", "-o", "/dev/null", flag) cmd.Stdin = strings.NewReader(simpleProg) return cmd.Run() == nil } -- cgit mrf-deployment