From: Khem Raj <raj.khem@gmail.com>
To: musl@lists.openwall.com
Subject: Re: How to handle attempts to combine ARM Thumb with frame pointers?
Date: Fri, 6 Oct 2017 18:24:18 -0700 [thread overview]
Message-ID: <CAMKF1sr09MP6YJEe_qnSfLOD4gHfhdFevYW=iyZ5usy75M1xaw@mail.gmail.com> (raw)
In-Reply-To: <CAJ86T=U5aM4OEAVjPDpe68SiMDEz8P=EO895E7audbL_O=Qscw@mail.gmail.com>
On Fri, Oct 6, 2017 at 5:53 PM, Andre McCurdy <armccurdy@gmail.com> wrote:
> When compiling for ARM Thumb or Thumb2 with frame pointers enabled (ie
> -O0 or with -fno-omit-frame-pointer in CFLAGS) the frame pointer is
> stored in r7, which leads to build errors ("error: r7 cannot be used
> in asm here") whenever a syscall macro is included in a C function.
> It's certainly a corner case, but one which I've run into recently.
>
> Would it be worth trying to catch this combination earlier and failing
> from the configure script? It's not trivial to do reliably since I
> think detecting whether or not frame pointers are going to be used by
> examining CFLAGS means determining the effective optimisation level if
> multiple -O0, -Os, etc options are given, together with the effective
> outcome of potentially multiple -fno-omit-frame-pointer and
> -fomit-frame-pointer options.
>
> I can work on a patch for the configure script but first wanted to
> check what the philosophy is - should the configure script be trying
> to catch every possible misconfiguration?
I think these files assume that frame pointer is not stored, quick fix is to
compile the specific file with -fomit-frame-pointer something like
CFLAGS-<filenname> = -fomit-frame-pointer
next prev parent reply other threads:[~2017-10-07 1:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-07 0:53 Andre McCurdy
2017-10-07 1:24 ` Khem Raj [this message]
2017-10-07 1:41 ` Andre McCurdy
2017-10-08 3:21 ` Rich Felker
2017-10-09 16:48 ` Andre McCurdy
2017-10-25 21:16 ` Szabolcs Nagy
2017-10-26 16:48 ` Adhemerval Zanella
2017-10-26 17:00 ` Rich Felker
2017-10-26 17:48 ` Andre McCurdy
2017-10-26 17:54 ` Rich Felker
2017-10-26 18:51 ` Andre McCurdy
2017-10-27 0:33 ` Rich Felker
2017-10-27 2:17 ` Andre McCurdy
2017-10-28 0:48 ` Andre McCurdy
2017-10-26 18:46 ` Adhemerval Zanella
2017-10-27 0:30 ` Rich Felker
2017-10-27 11:47 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMKF1sr09MP6YJEe_qnSfLOD4gHfhdFevYW=iyZ5usy75M1xaw@mail.gmail.com' \
--to=raj.khem@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).