From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Building scratch/igc with -fno-omit-frame-pointer Date: Sat, 28 Dec 2024 20:17:30 +0000 Message-ID: References: <87plm0msrq.fsf@telefonica.net> <87zfl4npcd.fsf@debian-hx90.lan> <87ldwnn0ny.fsf@telefonica.net> <87frmjirum.fsf@no.lan> <87h66z8tqr.fsf@protonmail.com> <875xnf8oz1.fsf@protonmail.com> <86v7vekgcy.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="7384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, emacs-devel@gnu.org, eller.helmut@gmail.com To: Eli Zaretskii , =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 28 21:18:19 2024 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 1tRdGM-0001l6-Fs for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Dec 2024 21:18:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRdFh-0003iA-To; Sat, 28 Dec 2024 15:17:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRdFf-0003hu-RH for emacs-devel@gnu.org; Sat, 28 Dec 2024 15:17:36 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRdFd-00082S-Vt; Sat, 28 Dec 2024 15:17:35 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5d3d479b1e6so11130066a12.2; Sat, 28 Dec 2024 12:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735417051; x=1736021851; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=A8tgvcFMn/DGUge4k2692pQMV2qdZYJMNudRghUbft0=; b=UTouJDdnTmNeNeCejgRCCiArf1xv/5+umkqhg0o4rAlhu0ao58M4pcKUlhfjcNV5dr mmT7xqlQH3k9sseiu6SUdvLesYSxQDCq1JTblfVkl7N8pekAbglcgu5sPufqZGCbmVY/ WUMyx44ZqTQ8NjHYI3SYsyU3CC8ptI3gtmGnUbxBq/xM/fGONmTAdkgLzM0dASRiK7OR 07CxC9uPNwoEUQY8PHMsPl/AD0iPKmHF5tKgrS6VgCXZH79W52cVhSZKarTNPHViPuVa qGXfXBomrAq1M6NTd7jm+qEXb9/ooIQ5OgDhO1TKVeANBo+7dRS94rJHnSn8MujvVk2q Nf3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735417051; x=1736021851; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=A8tgvcFMn/DGUge4k2692pQMV2qdZYJMNudRghUbft0=; b=vEhWjQFEWSjSyqzSwh1LlwERipHD9vvSq4o9S1JUzNxadqlU4btuVO7EgzYA0hHqyE cyajQ0/Pz2hBwRJ7dFtqDR1V+L4iHL6eSbDkZ7rn7Uim5mK4nOeRv2VEgDc18lvE16Pw Zpfen6lPQ2H2EOWTkGzM78v6OMULM8wBJixW/SJyKPYwxzMS8AVJwdfVVOBJIsl5BOmF 0auFPO2nvdo5iWkDvrsA/VM+GvCGcevXxBPwbCot1K8dw1EHxAb7q+8+6K/SYkO2tV+M ZEw9lQb3KHh+zGPPbUqsypCwZl0VlQHp9OCaFsnGk8h/7tWrvZN+UEN26BmvxNt3b5kN mi1Q== X-Forwarded-Encrypted: i=1; AJvYcCVgeMIj85VbUWZMaiqZK44U5yoj1a5p1lyTGS4gUMELxjTU/d1XVbBzvW5dHp7+jtD4XvIXgod8G7+aTw==@gnu.org X-Gm-Message-State: AOJu0YydgGLilVOAa0VyDuoQqRnhRZnLSY65cazd6s5Cas46rEHFLSp8 yr7Qy6cBQvPtP4HJmspdqtGKOI1U7BPY8DR2TzSfJAHErvQGRBwXuC2nNKUjdECPeumC8s82xqB ZPmTmvpTN7c4NGPTjz/dbpiGStzydeMS6 X-Gm-Gg: ASbGncsE57k6BMwd3YrmxLuhmj3pu8lE24zqRx7LcYjCcBSBUN/rJr6ks4pGyDm798+ od0yv4+f3jP21SMBgVuH3Qht7l9LnGuyZGOs7 X-Google-Smtp-Source: AGHT+IFcf/fiRJmjtQ/YTOJdB2SM7s/GS8BmOzkMnksAB3MkK88X3zc1hXzI5YaezjH96szf5LZSyK6LeA3eujjIdzY= X-Received: by 2002:a05:6402:2802:b0:5d3:cff5:635e with SMTP id 4fb4d7f45d1cf-5d81de065b8mr71577511a12.26.1735417051356; Sat, 28 Dec 2024 12:17:31 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 28 Dec 2024 20:17:30 +0000 In-Reply-To: <86v7vekgcy.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=stefankangas@gmail.com; helo=mail-ed1-x534.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, FREEMAIL_FROM=0.001, 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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327298 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: "Pip Cet via \"Emacs development discussions.\"" , >> Helmut Eller >> Date: Thu, 19 Dec 2024 20:57:45 +0100 >> >> Pip Cet writes: >> >> > Gerd M=C3=B6llmann writes: >> > >> >> Pip Cet via "Emacs development discussions." >> >> writes: >> >> >> >>> Does anyone remember what our conclusion was wrt >> >>> -fno-omit-frame-pointer? I seem to remember there was a patch to MP= S to >> >>> avoid relying on setjmp() to save all registers, but I'd still be >> >>> happier if we enabled that for all MPS builds, since we don't know >> >>> whether our MPS has the patch. >> >> >> >> I'm using -fno-omit-frame-pointer, but I don't remember why. I think >> >> Helmut said something or so (in CC). >> > >> > We tried not using it, it caused a bug, I spent too many hours trackin= g >> > that one down, so now I think we should make configure.ac always enabl= e >> > it, even though it should be a no-op on some architectures (I think >> > macOS on aarch64 is one of them). I took a look in the archives, and the reason is that there is a bug with register scanning that -fno-omit-frame-pointer fixes: https://github.com/Ravenbrook/mps/pull/38 >> > I'm not sure what the right thing to do here is, though: do we want >> > force CFLAGS to include -fno-omit-frame-pointer, or set it only when >> > CFLAGS isn't specified explicitly, or is looking at user-provided CFLA= GS >> > and complaining about them the right thing to do? >> >> I'd force it, but I'm reckless :-). > > Agreed. Is the below patch good enough for now? diff --git a/configure.ac b/configure.ac index 885075a2f1d..1d8f69ff119 100644 --- a/configure.ac +++ b/configure.ac @@ -5622,6 +5622,7 @@ AC_DEFUN HAVE_MPS=3Dno LIBMPS=3D IGCOBJ=3D +MPS_CFLAGS=3D if test "${with_mps}" !=3D "no"; then AC_CHECK_HEADER([mps.h], [AC_CHECK_LIB([mps], [mps_arena_create], [HAVE_MPS=3Dyes], [], [$LIB_PTHREAD])]) @@ -5635,12 +5636,16 @@ AC_DEFUN else LIBMPS=3D"-lmps $LIB_PTHREAD" fi + # Force -fno-omit-frame-pointer to avoid MPS bug with register scannin= g: + # https://github.com/Ravenbrook/mps/pull/38 + test -z "$MPS_CFLAGS" || MPS_CFLAGS=3D"$MPS_CFLAGS " + MPS_CFLAGS=3D$MPS_CFLAGS-fno-omit-frame-pointer else AC_MSG_ERROR([The MPS library libmps is missing]): fi fi -MPS_CFLAGS=3D + if test "$REALLY_ANDROID" =3D "yes" && test "$with_mps" !=3D "no"; then HAVE_MPS=3Dno ndk_SEARCH_MODULE([mps], [MPS], [HAVE_MPS=3Dyes])