pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/57047: Xine-ui can't be built without "inline-all-stringops" __attribute (aarch64)
>Number: 57047
>Category: pkg
>Synopsis: Xine-ui can't be built without "inline-all-stringops" __attribute (aarch64)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 06 09:35:01 +0000 2022
>Originator: adr
>Release: pkgsrc-current Thu Oct 6 09:15:09 UTC 2022
>Organization:
>Environment:
NetBSD npi 9.99.100 NetBSD 9.99.100 (RPI4) #0: Mon Oct 3 12:19:15 UTC 2022 adr@npi:/usr/src/sys/arch/evbarm/compile/RPI4 evbarm
>Description:
At configure target, without support for the following compiler attribute:
[...]
checking whether gcc supports __attribute ((target ("inline-all-stringops")))... no
[...]
The macro ATTR_INLINE_ALL_STRINGOPS ends up undefined, generating errors when compiling.
>How-To-Repeat:
Compile xine-ui without __attribute ((target ("inline-all-stringops"))) support (aarch64)
>Fix:
These patches add simple #ifdef blocks to avoid those errors.
patch-src_common_utils.h:
================================================================
$NetBSD$
--- src/common/utils.h.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/common/utils.h
@@ -74,7 +74,11 @@ size_t strlcat(char *dst, const char *sr
#endif
#ifndef HAVE_STRLCPY
+#ifdef ATTR_INLINE_ALL_STRINGOPS
size_t strlcpy (char *dst, const char *src, size_t size) ATTR_INLINE_ALL_STRINGOPS;
+#else
+size_t strlcpy (char *dst, const char *src, size_t size);
+#endif
#endif
char *xitk_vasprintf(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
================================================================
patch-src_xitk_kbindings__common.c:
================================================================
$NetBSD$
--- src/xitk/kbindings_common.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/kbindings_common.c
@@ -43,7 +43,11 @@ typedef union {
char s[4 * 32];
} refs_dummy_t;
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS char *refs_set_dummy (refs_dummy_t *dummy, const char *text) {
+#else
+static char *refs_set_dummy (refs_dummy_t *dummy, const char *text) {
+#endif
size_t l = strlen (text) + 1;
if (l > sizeof (*dummy) - 8)
l = sizeof (*dummy) - 8;
@@ -54,7 +58,11 @@ static ATTR_INLINE_ALL_STRINGOPS char *r
return dummy->s + 4;
}
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS char *refs_strdup (const char *text) {
+#else
+static char *refs_strdup (const char *text) {
+#endif
size_t l, s;
char *m;
@@ -660,8 +668,12 @@ static int _kbindings_modifier_from_stri
/*
* Return a key binding entry (if available) matching with action string.
- */
+ */
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS kbinding_entry_t *_kbindings_lookup_action (kbinding_t *kbt, const char *action) {
+#else
+static kbinding_entry_t *_kbindings_lookup_action (kbinding_t *kbt, const char *action) {
+#endif
union {
int32_t i[6];
char s[6 * 4];
================================================================
patch-src_xitk_xine-toolkit_skin.c:
================================================================
$NetBSD$
--- src/xitk/xine-toolkit/skin.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/xine-toolkit/skin.c
@@ -75,7 +75,11 @@ struct xitk_skin_config_s {
char sbuf[8192];
};
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS uint32_t _skin_strdup (xitk_skin_config_t *skonfig, const char *s) {
+#else
+static uint32_t _skin_strdup (xitk_skin_config_t *skonfig, const char *s) {
+#endif
uint32_t r = skonfig->sbuf_pos;
uint32_t l = strlen (s) + 1;
if (l > sizeof (skonfig->sbuf) - r)
================================================================
patch-src_xitk_xine-toolkit_xitk.c:
================================================================
$NetBSD$
--- src/xitk/xine-toolkit/xitk.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/xine-toolkit/xitk.c
@@ -2131,7 +2131,11 @@ static void _xitk_lower (uint8_t *s, siz
}
}
+#ifdef ATTR_INLINE_ALL_STRINGOPS
size_t ATTR_INLINE_ALL_STRINGOPS xitk_lower_strlcpy (char *dest, const char *src, size_t dlen) {
+#else
+size_t xitk_lower_strlcpy (char *dest, const char *src, size_t dlen) {
+#endif
uint8_t *q = (uint8_t *)dest;
const uint8_t *p = (const uint8_t *)src;
size_t l;
================================================================
Home |
Main Index |
Thread Index |
Old Index