[macppc] Unbreak devel/dyncall

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[macppc] Unbreak devel/dyncall

Charlene Wendling
Hi,

In the current macppc bulk, devel/dyncall fails with:

> /usr/obj/ports/dyncall-1.1/dyncall-1.1/dyncall/dyncall_call_ppc32.S:
> 36:11: error: unrecognized machine type .machine ppc

This is happening since the powerpc{32,64} fixes [0] that solves one
part of the issues that made me use '-fno-integrated-as' on powerpc,
but there was still this one.

As pointed out by bcallah@ out of list back then, we can drop this
instruction without bad consequences.

With the below diff, it builds fine on macppc.

Comments/feedback are welcome,

Charlène.


[0] https://marc.info/?l=openbsd-ports-cvs&m=159550568211055&w=2


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/dyncall/Makefile,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 Makefile
--- Makefile 23 Jul 2020 12:01:19 -0000 1.3
+++ Makefile 2 Aug 2020 12:48:47 -0000
@@ -3,7 +3,7 @@
 COMMENT= arch-independent interface for dynamic calls of C functions
 
 V= 1.1
-REVISION= 0
+REVISION= 1
 DISTNAME= dyncall-${V}
 CATEGORIES= devel
 
Index: patches/patch-dyncall_dyncall_call_ppc32_S
===================================================================
RCS file: /cvs/ports/devel/dyncall/patches/patch-dyncall_dyncall_call_ppc32_S,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-dyncall_dyncall_call_ppc32_S
--- patches/patch-dyncall_dyncall_call_ppc32_S 23 Jul 2020 12:01:19 -0000 1.1
+++ patches/patch-dyncall_dyncall_call_ppc32_S 2 Aug 2020 12:48:47 -0000
@@ -1,11 +1,22 @@
 $OpenBSD: patch-dyncall_dyncall_call_ppc32_S,v 1.1 2020/07/23 12:01:19 jasper Exp $
 
+Hunk #1: 'machine ppc' is not supported by clang's integrated assembler
+          on powerpc
+
 https://dyncall.org/pub/dyncall/dyncall/rev/d982a00c2177
 
 Index: dyncall/dyncall_call_ppc32.S
 --- dyncall/dyncall_call_ppc32.S.orig
 +++ dyncall/dyncall_call_ppc32.S
-@@ -100,7 +100,7 @@ ENTRY_C(dcCall_ppc32_darwin)
+@@ -33,7 +33,6 @@
+
+ */
+
+- .machine ppc
+ .text
+
+ /* ============================================================================
+@@ -100,7 +99,7 @@ ENTRY_C(dcCall_ppc32_darwin)
 
  srwi r5,r5,2 /* r5 = size in words */
 
@@ -14,7 +25,7 @@ Index: dyncall/dyncall_call_ppc32.S
  beq  cr0,.osx_done
 
  mtctr r5 /* copy loop */
-@@ -214,7 +214,7 @@ ENTRY_C(dcCall_ppc32_sysv)
+@@ -214,7 +213,7 @@ ENTRY_C(dcCall_ppc32_sysv)
 
  srwi r5,r5,2 /* r5 = size in words */
 
Index: patches/patch-dyncallback_dyncall_callback_ppc32_S
===================================================================
RCS file: /cvs/ports/devel/dyncall/patches/patch-dyncallback_dyncall_callback_ppc32_S,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-dyncallback_dyncall_callback_ppc32_S
--- patches/patch-dyncallback_dyncall_callback_ppc32_S 23 Jul 2020 12:01:19 -0000 1.1
+++ patches/patch-dyncallback_dyncall_callback_ppc32_S 2 Aug 2020 12:48:47 -0000
@@ -1,11 +1,22 @@
 $OpenBSD: patch-dyncallback_dyncall_callback_ppc32_S,v 1.1 2020/07/23 12:01:19 jasper Exp $
 
+Hunk #1: 'machine ppc' is not supported by clang's integrated assembler
+          on powerpc
+
 https://dyncall.org/pub/dyncall/dyncall/rev/d982a00c2177
 
 Index: dyncallback/dyncall_callback_ppc32.S
 --- dyncallback/dyncall_callback_ppc32.S.orig
 +++ dyncallback/dyncall_callback_ppc32.S
-@@ -123,9 +123,9 @@ Input:
+@@ -25,7 +25,6 @@
+
+ #include "../portasm/portasm-ppc.S"
+
+-.machine ppc
+ .text
+ .align 2
+
+@@ -123,9 +122,9 @@ Input:
  mtctr   r12
  bctrl
  /* check result type */