Skip to contentSkip to conversation

cross-localedef-native: fix build on hosts with older glibc

PATCH Superseded Martin Jansa 1 participant 1 message Aug 17, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cross-localedef-native: fix build on hosts with older glibc

Older glibc on host might be missing __glibc_has_attribute added in glibc-2.34 with:

https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=misc/sys/cdefs.h;h=8e244a77cf6271f09cbd26d18b1e07b1d1641404;hp=57ca262bdfb642bf4a945645532f2319ec1ff437;hb=c8ba52ab3350c334d6e34b1439a4c0c1431351f3;hpb=7dd416491e080456fc7742d884c520526509413e

Fixes:
In file included from ../git/localedef/include/programs/xmalloc.h:21,
from glibc/locale/programs/localedef.h:124,
from glibc/locale/programs/localedef.c:36:
../git/localedef/include/sys/cdefs.h:85:51: error: missing binary operator before token "("
85 | #if __GNUC_PREREQ (4, 3) || __glibc_has_attribute (__cold__)
| ^

---
 .../glibc/cross-localedef-native_2.38.bb      |  1 +
 ...cdefs.h-define-__glibc_has_attribute.patch | 51 +++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/0003-localedef-cdefs.h-define-__glibc_has_attribute.patch
meta/recipes-core/glibc/cross-localedef-native_2.38.bb +1 -0
index e7261a644b..673008c57a 100644
@@ -24,6 +24,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            \
            file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \
            file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \
+           file://0003-localedef-cdefs.h-define-__glibc_has_attribute.patch;patchdir=localedef \
            \
            file://0010-eglibc-Cross-building-and-testing-instructions.patch \
            file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \
meta/recipes-core/glibc/glibc/0003-localedef-cdefs.h-define-__glibc_has_attribute.patch new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
2.41.0