Skip to contentSkip to conversation

config/ppc: fix build with GCC >= 10

PATCH In review David Marchand 3 participants 4 messages Sep 15, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config/ppc: fix build with GCC >= 10

Like for python, multiline statements in meson must either use a backslash character (explicit continuation) or be enclosed in () (implicit continuation).

python PEP8 recommends the latter [1], and it looks like meson had an issue with backslash before 0.50 [2].

1: https://www.python.org/dev/peps/pep-0008/#multiline-if-statements
2: https://github.com/mesonbuild/meson/commit/90c9b868b20b

Fixes 394407f50c90 ("config/ppc: ignore GCC 11 psabi warnings")
---
 config/ppc/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
config/ppc/meson.build +2 -2
index 0b1948fc7c..aa1327a595 100644
@@ -20,8 +20,8 @@ endif
 
 # Suppress the gcc warning "note: the layout of aggregates containing
 # vectors with 4-byte alignment has changed in GCC 5".
-if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
-        cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi')
+if (cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
+        cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi'))
     add_project_arguments('-Wno-psabi', language: 'c')
 endif
 
Signature · 1 line
2.23.0
Tested-by on v1 1/1
#1 lore raw
Quoted 24 lines · David Marchand

Like for python, multiline statements in meson must either use a backslash character (explicit continuation) or be enclosed in () (implicit continuation).

python PEP8 recommends the latter [1], and it looks like meson had an issue with backslash before 0.50 [2].

1: https://www.python.org/dev/peps/pep-0008/#multiline-if-statements
2: https://github.com/mesonbuild/meson/commit/90c9b868b20b

Fixes 394407f50c90 ("config/ppc: ignore GCC 11 psabi warnings")
---
 config/ppc/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
config/ppc/meson.build +0 -0
index 0b1948fc7c..aa1327a595 100644

config/ppc/meson.build endif · line 27

Quoted 10 lines
config/ppc/meson.build +2 -2
@@ -20,8 +20,8 @@ endif
 
 # Suppress the gcc warning "note: the layout of aggregates containing
 # vectors with 4-byte alignment has changed in GCC 5".
-if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
-        cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi')
+if (cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
+        cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi'))
     add_project_arguments('-Wno-psabi', language: 'c')
 endif
 
#2 lore raw
Quoted 25 lines · Ferruh Yigit
Quoted 24 lines · David Marchand

Like for python, multiline statements in meson must either use a backslash character (explicit continuation) or be enclosed in () (implicit continuation).

python PEP8 recommends the latter [1], and it looks like meson had an issue with backslash before 0.50 [2].

1: https://www.python.org/dev/peps/pep-0008/#multiline-if-statements
2: https://github.com/mesonbuild/meson/commit/90c9b868b20b

Fixes 394407f50c90 ("config/ppc: ignore GCC 11 psabi warnings")
---
 config/ppc/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
config/ppc/meson.build +0 -0
index 0b1948fc7c..aa1327a595 100644
@@ -20,8 +20,8 @@ endif
 
Quoted 12 lines

config/ppc/meson.build endif · line 27

Quoted 10 lines
config/ppc/meson.build +2 -2
 # Suppress the gcc warning "note: the layout of aggregates containing
 # vectors with 4-byte alignment has changed in GCC 5".
-if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
-        cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi')
+if (cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
+        cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi'))
     add_project_arguments('-Wno-psabi', language: 'c')
 endif
 
author Applied
#3 lore raw
Quoted 12 lines · Bruce Richardson
Quoted 11 lines · Ferruh Yigit
Quoted 10 lines · David Marchand

Like for python, multiline statements in meson must either use a backslash character (explicit continuation) or be enclosed in () (implicit continuation).

python PEP8 recommends the latter [1], and it looks like meson had an issue with backslash before 0.50 [2].

1: https://www.python.org/dev/peps/pep-0008/#multiline-if-statements
2: https://github.com/mesonbuild/meson/commit/90c9b868b20b

Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Fixes 394407f50c90 ("config/ppc: ignore GCC 11 psabi warnings")

Applied, thanks.

Signature · 1 line
David Marchand