All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-java][PATCH] icedtea7-native: -Wno-error=format-overflow for all gcc >= 9
@ 2021-10-15  0:13 Douglas Royds
  2021-10-15  0:13 ` [meta-java][PATCH] openjdk-build-helper: Use python raw string for regex pattern Douglas Royds
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas Royds @ 2021-10-15  0:13 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Douglas Royds

Using oe.utils.less_or_equal() in the reverse sense here, such that
we *don't* add the warning exclusion for gcc <= 8.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 recipes-core/icedtea/icedtea7-native.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index 331b7a4..0f317bb 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -30,8 +30,7 @@ CFLAGS:append = " -Wno-error=stringop-overflow -Wno-error=return-type"
 
 # oe.utils.get_host_compiler_version returns "gcc, 9.2" and we want -> "9"
 HOST_COMPILER_MAJOR="${@oe.utils.get_host_compiler_version(d)[1].split(".", 2)[0]}"
-# if compiler version 9 detected, add more CFLAGS
-CFLAGS:append = " ${@oe.utils.conditional('HOST_COMPILER_MAJOR', '9', '-Wno-error=format-overflow', '', d)}"
+CFLAGS:append = " ${@oe.utils.less_or_equal('HOST_COMPILER_MAJOR', '8', '', ' -Wno-error=format-overflow', d)}"
 
 # Explicitly pass -fcommon since GCC 10 defaults to -fno-common for C sources
 CFLAGS:append = " -fcommon"
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-java][PATCH] openjdk-build-helper: Use python raw string for regex pattern
  2021-10-15  0:13 [meta-java][PATCH] icedtea7-native: -Wno-error=format-overflow for all gcc >= 9 Douglas Royds
@ 2021-10-15  0:13 ` Douglas Royds
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas Royds @ 2021-10-15  0:13 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Douglas Royds

See https://docs.python.org/3/library/re.html

Invalid escape sequences in Python’s usage of the backslash in string literals
now generate a DeprecationWarning, and in the future this will become a
SyntaxError. The solution is to use Python’s raw string notation for regular
expression patterns; backslashes are not handled in any special way in a string
literal prefixed with 'r'.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 classes/openjdk-build-helper.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass
index a4b77a0..07cbcd3 100644
--- a/classes/openjdk-build-helper.bbclass
+++ b/classes/openjdk-build-helper.bbclass
@@ -45,7 +45,7 @@ def openjdk_build_helper_get_target_cflags(d):
     # doesn't work anyway.
     version = d.getVar('GCCVERSION')[0]
     # skip non digit characters at the beginning, e.g. from "linaro-6.2%"
-    match = re.search("\d", version)
+    match = re.search(r"\d", version)
     if match:
         version = version[match.start():]
     return openjdk_build_helper_get_cflags_by_cc_version(d, version)
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-15  0:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15  0:13 [meta-java][PATCH] icedtea7-native: -Wno-error=format-overflow for all gcc >= 9 Douglas Royds
2021-10-15  0:13 ` [meta-java][PATCH] openjdk-build-helper: Use python raw string for regex pattern Douglas Royds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.