On Mon, 13 Apr 2020 21:27:17 +0200 Charlene Wendling wrote: > Hi, > > arts3 is broken in the current macppc bulk: > > > /usr/obj/ports/arts-1.5.10/arts-1.5.10/mcop/debug.cc:797:3: error: > > array type 'va_list' (aka '__builtin_va_list') is not assignable > > G_VA_COPY (args2, args1); > (there has been another occurrence later) > > This is happening because _CALL_SYSV is not defined by clang, it > looks like it's a GCC-ism [0]. > > The below diff simplifies impacted conditionals so the proper > definition of G_VA_COPY is used, and allows building arts3 on > powerpc [1].
[...] > [0] > https://reviews.llvm.org/rG22d2435a00c9c288bf9bdd2d7f3e15557c3f4e06 > [1] https://bin.charlenew.xyz/macppc/paths/x11/kde/arts3.log I had a chat with jca@ about that, and he proposed to just use va_copy(3) instead. It builds fine on powerpc and amd64. OK? Charlène. Index: Makefile =================================================================== RCS file: /cvs/ports/x11/kde/arts3/Makefile,v retrieving revision 1.89 diff -u -p -u -p -r1.89 Makefile --- Makefile 8 Jun 2019 15:25:57 -0000 1.89 +++ Makefile 15 Apr 2020 01:17:12 -0000 @@ -3,7 +3,7 @@ COMMENT = K Desktop Environment, aRTs CATEGORIES = x11 x11/kde VERSION = 3.5.10 -REVISION = 16 +REVISION = 17 DISTNAME = arts-1.5.10 MODKDE_VERSION = 3.5.8 Index: patches/patch-flow_gsl_gslglib_h =================================================================== RCS file: patches/patch-flow_gsl_gslglib_h diff -N patches/patch-flow_gsl_gslglib_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-flow_gsl_gslglib_h 15 Apr 2020 01:17:12 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +Pointless #ifdef hell that breaks with clang on powerpc, +va_copy was introduced in C99 + +Index: flow/gsl/gslglib.h +--- flow/gsl/gslglib.h.orig ++++ flow/gsl/gslglib.h +@@ -505,13 +505,7 @@ gboolean g_path_is_absolute (const gchar *file_name); + * glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy. + */ + #if !defined (G_VA_COPY) +-# if defined (__GNUC__) && ( defined (__PPC__) || defined (__s390__) ) && (defined (_CALL_SYSV) || defined (_WIN32) || defined (__s390__) ) +-# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) +-# elif defined (G_VA_COPY_AS_ARRAY) +-# define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list)) +-# else /* va_list is a pointer */ +-# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2)) +-# endif /* va_list is a pointer */ ++# define G_VA_COPY va_copy + #endif /* !G_VA_COPY */ + + Index: patches/patch-mcop_debug_cc =================================================================== RCS file: patches/patch-mcop_debug_cc diff -N patches/patch-mcop_debug_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-mcop_debug_cc 15 Apr 2020 01:17:12 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +Pointless #ifdef hell that breaks with clang on powerpc, +va_copy was introduced in C99 + +Index: mcop/debug.cc +--- mcop/debug.cc.orig ++++ mcop/debug.cc +@@ -381,13 +381,7 @@ typedef struct _GString GString; + * glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy. + */ + #if !defined (G_VA_COPY) +-# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32) || defined(WIN32)) || defined(__s390__) || defined(__x86_64__) +-# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) +-# elif defined (G_VA_COPY_AS_ARRAY) +-# define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list)) +-# else /* va_list is a pointer */ +-# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2)) +-# endif /* va_list is a pointer */ ++# define G_VA_COPY va_copy + #endif /* !G_VA_COPY */ + + /* --- glib macros --- */