emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting ready to land native-compilation on master


From: Alex Bennée
Subject: Re: Getting ready to land native-compilation on master
Date: Wed, 14 Apr 2021 18:28:49 +0100
User-agent: mu4e 1.5.11; emacs 28.0.50

Eli Zaretskii <eliz@gnu.org> writes:

>> From: wilde@sha-bang.de
>> Cc: emacs-devel@gnu.org,  Andrea Corallo <akrl@sdf.org>
>> Date: Wed, 14 Apr 2021 17:53:33 +0200
>> 
>> Today I build and started using Emacs from the on a small i368 system
>> with NetBSD 9.1:
>> 
>> System spec:
>>   CPU: Intel(R) Atom(TM) CPU N270   @ 1.60GHz
>>   RAM: 2 GiB
>> 
>> Build:
>> - I build libgccjit from gcc 10.2.0 manually as libgccjit seems not to
>>   be available from pkgsrc (not checked very thoroughly though) at least
>>   I found no `pkgin' installable binaries...
>> 
>> - I had to manually remove `-ldl' from LIBGCCJIT in src/Makefile as this
>>   is not needed on *BSD (and triggers an error during build, when
>>   present)
>
> Andrea, looks like NetBSD is in the same boat as OpenBSD, where we
> already refrain from using -ldl.
>
>> - I hat to disable memory protection on the system to make the native
>>   compiler work:
>>     sysctl -w security.pax.mprotect.global=0
>>     sysctl -w security.pax.mprotect.enabled=0
>>   This is not a Emacs specific problem but a problem with libgccjit
>>   itself.  (The basic gcc jit "Hello World" example also fails with
>>   memory protection in place).
>
> I'm not sure I understand why this happens, but I think this issue
> should be reported to the GCC Bugzilla.

I suspect this is a change similar to the recent MacOS one where
eXecutable pages cannot be mapped as Writable. The QEMU project recently
had to implement split mappings for it's JIT to workaround this although
I dare say there is probably a JIT interface that should be used to give
suitable access to pages but that is something for the BSD experts to
chime in on.

-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]