[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Building scratch/igc with -fno-omit-frame-pointer
From: |
Stefan Kangas |
Subject: |
Building scratch/igc with -fno-omit-frame-pointer |
Date: |
Sat, 28 Dec 2024 20:17:30 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>> Cc: "Pip Cet via \"Emacs development discussions.\"" <emacs-devel@gnu.org>,
>> Helmut Eller <eller.helmut@gmail.com>
>> Date: Thu, 19 Dec 2024 20:57:45 +0100
>>
>> Pip Cet <pipcet@protonmail.com> writes:
>>
>> > Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>> >
>> >> Pip Cet via "Emacs development discussions." <emacs-devel@gnu.org>
>> >> writes:
>> >>
>> >>> Does anyone remember what our conclusion was wrt
>> >>> -fno-omit-frame-pointer? I seem to remember there was a patch to MPS 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 tracking
>> > that one down, so now I think we should make configure.ac always enable
>> > 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 CFLAGS
>> > 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=no
LIBMPS=
IGCOBJ=
+MPS_CFLAGS=
if test "${with_mps}" != "no"; then
AC_CHECK_HEADER([mps.h],
[AC_CHECK_LIB([mps], [mps_arena_create], [HAVE_MPS=yes], [],
[$LIB_PTHREAD])])
@@ -5635,12 +5636,16 @@ AC_DEFUN
else
LIBMPS="-lmps $LIB_PTHREAD"
fi
+ # Force -fno-omit-frame-pointer to avoid MPS bug with register scanning:
+ # https://github.com/Ravenbrook/mps/pull/38
+ test -z "$MPS_CFLAGS" || MPS_CFLAGS="$MPS_CFLAGS "
+ MPS_CFLAGS=$MPS_CFLAGS-fno-omit-frame-pointer
else
AC_MSG_ERROR([The MPS library libmps is missing]):
fi
fi
-MPS_CFLAGS=
+
if test "$REALLY_ANDROID" = "yes" && test "$with_mps" != "no"; then
HAVE_MPS=no
ndk_SEARCH_MODULE([mps], [MPS], [HAVE_MPS=yes])
- Re: Merging MPS a.k.a. scratch/igc, yet again, (continued)
- Re: Merging MPS a.k.a. scratch/igc, yet again, Eli Zaretskii, 2024/12/10
- Re: Merging MPS a.k.a. scratch/igc, yet again, Xiyue Deng, 2024/12/11
- Re: Merging MPS a.k.a. scratch/igc, yet again, Gregor Zattler, 2024/12/19
- Re: Merging MPS a.k.a. scratch/igc, yet again, Pip Cet, 2024/12/19
- Re: Merging MPS a.k.a. scratch/igc, yet again, Gerd Möllmann, 2024/12/19
- Re: Merging MPS a.k.a. scratch/igc, yet again, Eli Zaretskii, 2024/12/19
- Re: Merging MPS a.k.a. scratch/igc, yet again, Gerd Möllmann, 2024/12/19
- Re: Merging MPS a.k.a. scratch/igc, yet again, Pip Cet, 2024/12/19
- Re: Merging MPS a.k.a. scratch/igc, yet again, Gerd Möllmann, 2024/12/19
- Re: Merging MPS a.k.a. scratch/igc, yet again, Eli Zaretskii, 2024/12/20
- Building scratch/igc with -fno-omit-frame-pointer,
Stefan Kangas <=
- Re: Building scratch/igc with -fno-omit-frame-pointer, Pip Cet, 2024/12/28
- Re: Building scratch/igc with -fno-omit-frame-pointer, Stefan Kangas, 2024/12/29
- Re: Merging MPS a.k.a. scratch/igc, yet again, Gregor Zattler, 2024/12/20
- Re: Merging MPS a.k.a. scratch/igc, yet again, Pip Cet, 2024/12/10
- Re: Merging MPS a.k.a. scratch/igc, yet again, Eli Zaretskii, 2024/12/10
- Re: Merging MPS a.k.a. scratch/igc, yet again, Óscar Fuentes, 2024/12/10
- Re: Merging MPS a.k.a. scratch/igc, yet again, Eli Zaretskii, 2024/12/10
- Re: Merging MPS a.k.a. scratch/igc, yet again, Eli Zaretskii, 2024/12/10
- Re: pdumper on Solaris 10, Stefan Kangas, 2024/12/09
- Re: pdumper on Solaris 10, Eli Zaretskii, 2024/12/10