[oe] [meta-java][PATCH 2/2] openjdk-7-release-03b147.inc: Ignore deprecation

Ricardo Ribalda Delgado ricardo.ribalda at gmail.com
Mon Oct 31 10:34:34 UTC 2016


readdir_r has been deprecated since glibc 2.24. As openjdk uses this
function, a warning is generated during build that gets turned into
an error when -Werror is used.

While the readdir function is suggested as an replacement, it has
slightly different API. The warning is ignored instead to prevent any
unexpected breakage from patching the offending functions.

(Note: This is just a port of 0f127a49696 from Erkka Kääriä for openjdk-7
, all the credit for him)

Credit-to: Erkka Kääriä <erkka.kaaria at intel.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
---
 recipes-core/icedtea/openjdk-7-release-03b147.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-core/icedtea/openjdk-7-release-03b147.inc b/recipes-core/icedtea/openjdk-7-release-03b147.inc
index 068572959fa1..1d054ffe35e8 100644
--- a/recipes-core/icedtea/openjdk-7-release-03b147.inc
+++ b/recipes-core/icedtea/openjdk-7-release-03b147.inc
@@ -7,6 +7,10 @@ FILESPATH =. "${FILE_DIRNAME}/openjdk-7-03b147:"
 # Force arm mode for now
 ARM_INSTRUCTION_SET_armv4t = "ARM"
 
+# readdir_r was deprecated in glibc-2.24. Ignore the error for now
+# NOTE: When updating the recipe, please check if this is still needed
+CFLAGS_append = " -Wno-error=deprecated-declarations"
+
 ICEDTEA_URI = "http://icedtea.wildebeest.org/download/source/${ICEDTEA}.tar.gz;name=iced"
 
 ICEDTEA_PREFIX = "icedtea7-forest-2.1"
-- 
2.10.1




More information about the Openembedded-devel mailing list