From 45ef140975dd4bcba78ef8df0a9f0106caedabcd Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 2 Dec 2021 04:37:36 -0800 Subject: microblaze libxcrypt: Fall back to older style symver support Using symver related functions results in: | ../git/lib/crypt-static.c:32:1: error: symver is only supported on ELF platforms | 32 | SYMVER_crypt; | | ^~~~~~~~~~~~ Microblaze does not support these functions at this time, so fall back to the older approach to resolve this issue. Signed-off-by: Mark Hatle --- .../recipes-core/libxcrypt/files/use-older-symver.patch | 15 +++++++++++++++ .../recipes-core/libxcrypt/libxcrypt_%.bbappend | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 meta-microblaze/recipes-core/libxcrypt/files/use-older-symver.patch create mode 100644 meta-microblaze/recipes-core/libxcrypt/libxcrypt_%.bbappend diff --git a/meta-microblaze/recipes-core/libxcrypt/files/use-older-symver.patch b/meta-microblaze/recipes-core/libxcrypt/files/use-older-symver.patch new file mode 100644 index 00000000..4e6d5ecf --- /dev/null +++ b/meta-microblaze/recipes-core/libxcrypt/files/use-older-symver.patch @@ -0,0 +1,15 @@ +Avoid an issue on microblaze where the symver attribute is not available. + +diff --git a/lib/crypt-port.h b/lib/crypt-port.h +index 3fa5222..80c3d91 100644 +--- a/lib/crypt-port.h ++++ b/lib/crypt-port.h +@@ -208,7 +208,7 @@ extern size_t strcpy_or_abort (void *dst, size_t d_size, const void *src); + + /* Starting with GCC 10, we can use the symver attribute, which is also + needed at the point we decide to enable link-time optimization. */ +-# if __GNUC__ >= 10 ++# if __GNUC__ >= 10 && ! defined (__MICROBLAZE__) + + /* Set the symbol version for EXTNAME, which uses INTNAME as its + implementation. */ diff --git a/meta-microblaze/recipes-core/libxcrypt/libxcrypt_%.bbappend b/meta-microblaze/recipes-core/libxcrypt/libxcrypt_%.bbappend new file mode 100644 index 00000000..3743e905 --- /dev/null +++ b/meta-microblaze/recipes-core/libxcrypt/libxcrypt_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS:append:microblaze := ":${THISDIR}/files" +SRC_URI:append:microblaze = " \ + file://use-older-symver.patch \ +" -- cgit v1.2.3-54-g00ecf