On 4/9/2021 11:15 AM, Patrick Wildt wrote:
Hi,

to do some release tests with iked we wanted to play^Wtest games/openra
over IPsec.  Turns out that arm64 does not support lang/mono, but I have
gotten it to run.  With the following diff, games/openra builds and I
can even play it.

This doesn't need to make release, so no worries.  Would be nice for
others, but I myself run -current anyway.

The arch-defines.mk enables all mono-related packages.  In gcconfig.h
OPENBSD needs to be checked so make sure in case it's AArch64, it
doesn't define NOSYS.  Additionally apparently one has to check for
OPENBSD and __aarch64__ to define the mach type.  Then there's another
AARCH64 block where OS-related stuff has to be defined.  I simply used
the AMD64 block, but skipping ELFCLASS.  In boringssl we need to have
the 'find aarch64 crypto accel' code as well.  We don't have a nice API
yet to extract info, so let's for now only use NEON, which we require
on AArch64.  As far as I can see, ucontext is sigcontext, so I provide
the same defines as FreeBSD but with sigcontext context.

I can try to get the diffs upstreamed.

Patrick

diff --git a/infrastructure/mk/arch-defines.mk 
b/infrastructure/mk/arch-defines.mk
index 228c3991f50..965949a964b 100644
--- a/infrastructure/mk/arch-defines.mk
+++ b/infrastructure/mk/arch-defines.mk
@@ -21,7 +21,7 @@ LP64_ARCHS = aarch64 alpha amd64 mips64 mips64el powerpc64 
sparc64
  GCC4_ARCHS = alpha hppa sh sparc64
  GCC3_ARCHS = m88k
  # XXX easier for ports that depend on mono
-MONO_ARCHS = amd64 i386
+MONO_ARCHS = amd64 i386 aarch64
Move aarch64 to the front of the list.

Reply via email to