From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex =?utf-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.devel Subject: Re: Getting ready to land native-compilation on master Date: Wed, 14 Apr 2021 18:28:49 +0100 Message-ID: <87lf9klqmn.fsf@linaro.org> References: <83v98v7dzs.fsf@gnu.org> <87v98ox3pe.fsf@tammy.lan.sha-bang.de> <83czuwzto3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9160"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.11; emacs 28.0.50 Cc: wilde@sha-bang.de, emacs-devel@gnu.org, akrl@sdf.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 14 19:36:12 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWjQy-0002Gs-J8 for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Apr 2021 19:36:12 +0200 Original-Received: from localhost ([::1]:39454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWjQx-0007fY-Kz for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Apr 2021 13:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWjMT-0004hD-Il for emacs-devel@gnu.org; Wed, 14 Apr 2021 13:31:33 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:38591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWjMR-0003zs-EJ for emacs-devel@gnu.org; Wed, 14 Apr 2021 13:31:33 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id y20-20020a1c4b140000b029011f294095d3so13101001wma.3 for ; Wed, 14 Apr 2021 10:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=VrErE3A4y8knanwTmzYoXQt7GzdGQ0v6X7rXwMbCLR0=; b=s+O9qWabaPLzOtUmX5X5qhHfivf/JJlAUCxdW15xfEJvc0YBK02ljjGJxz387hoKVg URo2gqjYOnmH144z77VtjCESuRE3qDHNpkLvBmt5KBuFinGRLwnky2XyoDqbQovTeN4F IJHmyXVhx/bKuSD89Q2PM3yp044g6nmFrcqiz4mSFVJRg87Ugs4So8eVuTUIg13+6eAU EzvvLZaiafUrjz3ejaXbzzf8eC3+TOU799HHBeOgO4Skc98M0LOaEc9I7nuGDkNuM85Z uaI5qM1lKXohj/Vq+L6y2PIg1eeajvt8J6reEgHFeuIymW/aUq1+vjHvluL9aN1BAsJW FOnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=VrErE3A4y8knanwTmzYoXQt7GzdGQ0v6X7rXwMbCLR0=; b=EJrtT8fv1QMr42m2iPFGcXSDBXyO0CfOw2Pg5naNbe8NvTjcBTDkRnwBFwyRRaZkIl VHOyIB9V23ju82EHqutNGcQZ65omTB5gejfXfwfo5KQ6EUIOA7eKpz/Eqht9uSFFHjoD qex3/KcmGP5VcjYvwlFcmbg/5SwCsC85R9zITNbS1MxlJpcKPmuYtCY6DHkXwmNHTfEg K7kh1mieVoVbpZliYynfBRR7wl0l8pZrHk8gea3ndR11E3a/TydJxSdKtp7s4aMa9VA+ f+JHfJ0AWlrDYcMFK9b7M7NwYH3D0ldDvaW7i2PqimNX6SqA+h2HTBzTzM1fzBz9tQS1 S2Lw== X-Gm-Message-State: AOAM530o/E3hpRMcVztTtj/B6XkaaG15PFnjUL7WgXAc6lzxuV8nPkuA 3+ZYHtgbbuOBk2/PWMfLNYMtYQ== X-Google-Smtp-Source: ABdhPJzXiXx3oOaW6Mq1vNwIgujohEi2Q91Rd/fOCIYwQfGpTZeCSEM8EtID0d6WXhjolfTFLWWqvA== X-Received: by 2002:a1c:c246:: with SMTP id s67mr4002022wmf.86.1618421489767; Wed, 14 Apr 2021 10:31:29 -0700 (PDT) Original-Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f7sm31471wmq.11.2021.04.14.10.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 10:31:28 -0700 (PDT) Original-Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 230651FF7E; Wed, 14 Apr 2021 18:31:28 +0100 (BST) In-reply-to: <83czuwzto3.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268060 Archived-At: Eli Zaretskii writes: >> From: wilde@sha-bang.de >> Cc: emacs-devel@gnu.org, Andrea Corallo >> Date: Wed, 14 Apr 2021 17:53:33 +0200 >>=20 >> Today I build and started using Emacs from the on a small i368 system >> with NetBSD 9.1: >>=20 >> System spec: >> CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz >> RAM: 2 GiB >>=20 >> 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... >>=20 >> - 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=3D0 >> sysctl -w security.pax.mprotect.enabled=3D0 >> 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. --=20 Alex Benn=C3=A9e