config/ppc: fix meson build failure with gcc 4.8.5 on RHEL/CENTOS7

Message ID 20211103200126.1033026-1-drc@linux.vnet.ibm.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series config/ppc: fix meson build failure with gcc 4.8.5 on RHEL/CENTOS7 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-spell-check-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

David Christensen Nov. 3, 2021, 8:01 p.m. UTC
  The POWER meson.build file incorrectly checks if the detected CPU is
"greater than" POWER8 when it should actually test for "greater than or
equal to" POWER8.  Fixed the comparison operator.

Bugzilla ID: 875
Fixes: 750196880843 ("config/ppc: select instruction set for IBM Power10")
Cc: thinhtr@linux.vnet.ibm.com

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
 config/ppc/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Marchand Nov. 4, 2021, 8:10 a.m. UTC | #1
On Wed, Nov 3, 2021 at 9:01 PM David Christensen <drc@linux.vnet.ibm.com> wrote:
>
> The POWER meson.build file incorrectly checks if the detected CPU is
> "greater than" POWER8 when it should actually test for "greater than or
> equal to" POWER8.  Fixed the comparison operator.
>
> Bugzilla ID: 875
> Fixes: 750196880843 ("config/ppc: select instruction set for IBM Power10")
>
> Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>

Applied, thanks.
  

Patch

diff --git a/config/ppc/meson.build b/config/ppc/meson.build
index cba8222163..1cba44011f 100644
--- a/config/ppc/meson.build
+++ b/config/ppc/meson.build
@@ -89,7 +89,7 @@  int main() {
             else
                 error('Compiler does not support POWER@0@ platform'.format(cpu))
             endif
-            if cpu > 8
+            if cpu >= 8
                 cpu_instruction_set = 'power'+cpu.to_string()
             else
                 error('Compiler does not support POWER@0@ platform'.format(cpu))