~mcf/cproc

7169a2bb48babc0dcf3fd549f6a7b8ca3c1964ed — Michael Forney 2 months ago 1e7f6cd
Add a patch to fix OpenBSD bootstrap on 6.7

This issue is already fixed in -current.
2 files changed, 30 insertions(+), 11 deletions(-)

M .builds/openbsd.diff
M .builds/openbsd.yml
M .builds/openbsd.diff => .builds/openbsd.diff +28 -8
@@ 1,7 1,27 @@
diff --git endian.h endian.h
index 3b077cd9295..cb6948d3fec 100644
--- endian.h
+++ endian.h
--- stdarg.h.orig	Sat Sep  5 19:23:19 2020
+++ stdarg.h	Sat Sep  5 19:23:51 2020
@@ -20,8 +20,6 @@
 
 #include <sys/cdefs.h>
 
-#if (defined(__GNUC__) && __GNUC__ >= 3) || defined(__PCC__)
-
 /* Define __gnuc_va_list.  */
 
 #ifndef __GNUC_VA_LIST
@@ -39,10 +37,6 @@
 #define __va_copy(dst, src)	__builtin_va_copy((dst),(src))
 
 typedef __gnuc_va_list va_list;
-
-#else
-#error "unsupported compiler"
-#endif
 
 #if __ISO_C_VISIBLE >= 1999
 #define	va_copy(dst, src)	__va_copy((dst), (src))
--- machine/endian.h.orig	Sat Sep  5 19:21:50 2020
+++ machine/endian.h	Sat Sep  5 19:22:51 2020
@@ -31,6 +31,8 @@
 #include <sys/_types.h>
 #endif


@@ 11,12 31,12 @@ index 3b077cd9295..cb6948d3fec 100644
 static __inline __uint16_t
 __swap16md(__uint16_t _x)
 {
@@ -55,6 +57,8 @@ __swap64md(__uint64_t _x)
@@ -54,6 +56,8 @@
 
 /* Tell sys/endian.h we have MD variants of the swap macros.  */
 #define __HAVE_MD_SWAP
 
+#endif /* __GNUC__ */
+
+#endif
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 
 #ifndef __FROM_SYS__ENDIAN

M .builds/openbsd.yml => .builds/openbsd.yml +2 -3
@@ 7,14 7,13 @@ packages:
tasks:
- setup: |
    # avoid __asm__ on non __GNUC__ compilers
    doas patch -d /usr/include/amd64 < cproc/.builds/openbsd.diff
    doas patch -d /usr/include < cproc/.builds/openbsd.diff
- build: |
    PATH=$HOME/qbe/obj:$PATH
    gmake -C qbe
    cd cproc
    ./configure
    make all check
    # XXX: bootstrap is broken with OpenBSD 6.7 stdarg.h
    make all check bootstrap
triggers:
- action: email
  condition: failure