[Bug 232060] lang/mono: Fix for Mono build on FreeBSD PowerPC

[email protected]
Newsgroups gmane.os.freebsd.devel.ppc
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232060

            Bug ID: 232060
           Summary: lang/mono: Fix for Mono build on FreeBSD PowerPC
           Product: Ports & Packages
           Version: Latest
          Hardware: powerpc
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
                CC: [email protected]
          Assignee: [email protected]
             Flags: maintainer-feedback?([email protected])
 Attachment #197897 text/plain
         mime type:

Created attachment 197897
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=197897&action=edit
Patch to fix PowerPC build

Building Mono of FreeBSD/PowerPC (32-bit) fails due to incorrect code in
"mono/utils/mono-sigcontext.h" that prevents Mono from building. 

The below code change patch allows Mono to build:

@@ -363,10 +363,10 @@
 #elif defined(__FreeBSD__)
     typedef ucontext_t os_ucontext;

-    #define UCONTEXT_REG_Rn(ctx, n) ((ctx)->uc_mcontext.mc_gpr [(n)])
-    #define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.mc_fpreg [(n)])
-    #define UCONTEXT_REG_NIP(ctx) ((ctx)->uc_mcontext.mc_srr0)
-    #define UCONTEXT_REG_LNK(ctx) ((ctx)->uc_mcontext.mc_lr)
+    #define UCONTEXT_REG_Rn(ctx, n) (((os_ucontext*)(ctx))->uc_mcontext.mc_gpr
[(n)])
+    #define UCONTEXT_REG_FPRn(ctx, n)
(((os_ucontext*)(ctx))->uc_mcontext.mc_fpreg [(n)])
+    #define UCONTEXT_REG_NIP(ctx) (((os_ucontext*)(ctx))->uc_mcontext.mc_srr0)
+    #define UCONTEXT_REG_LNK(ctx) (((os_ucontext*)(ctx))->uc_mcontext.mc_lr)
 #elif defined(_AIX)
     typedef ucontext_t os_ucontext;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.