From 1313e6352a442bfd7483f7b6e14308f2cabdc684 Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Sun, 23 Oct 2022 23:56:34 +0200 Subject: [PATCH] build: fix GCC detection in pgo.sh On my system, GCC doesn't output its name when passing the --version flag: $ cc --version cc (Debian 12.2.0-3) 12.2.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. As the Free Software Foundation is unlikely to write another compiler, I think that searching for the foundation's name instead of GCC is a good enough fix (and I'm almost sure we wouldn't be the first ones to do so). --- pgo/pgo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgo/pgo.sh b/pgo/pgo.sh index b2ce7fe5..2f409268 100755 --- a/pgo/pgo.sh +++ b/pgo/pgo.sh @@ -30,7 +30,7 @@ do_pgo=no CFLAGS="${CFLAGS-} -O3" case $(${CC-cc} --version) in - *GCC*) + *Free\ Software\ Foundation*) compiler=gcc do_pgo=yes ;;