From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11983 Path: news.gmane.org!.POSTED!not-for-mail From: Andre McCurdy Newsgroups: gmane.linux.lib.musl.general Subject: How to handle attempts to combine ARM Thumb with frame pointers? Date: Fri, 6 Oct 2017 17:53:38 -0700 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1507337635 27178 195.159.176.226 (7 Oct 2017 00:53:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Oct 2017 00:53:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-11996-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 07 02:53:52 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1e0dNE-00061c-1z for gllmg-musl@m.gmane.org; Sat, 07 Oct 2017 02:53:48 +0200 Original-Received: (qmail 11771 invoked by uid 550); 7 Oct 2017 00:53:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 11734 invoked from network); 7 Oct 2017 00:53:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vkPkfq2fgoUGsJYO4dvus/dJhLKri2mH/TNFsE5MZvI=; b=H4XYdHjHm+CClJmWaMoqh/lhREuTMerIQp1asGx2aRMsS3few4gcWzgkgUtWAP61+m LKNPxcPuTHLLdTWkFWQkxIZ6DnFt2FUZAwARqZOsLv3couTrTsYSqV6QsBHtShskdU03 GqyhRzFXsTe1QOtapUvCtejD6CdRRk5ZV8SvFGJAIiSPLiexysMiiHlJGN7vl5UYRA/v 8xu/oWQ1RNXkMdWLz87BW2rZU649WzawwjFQYQ4PZ7qpNzCUaMC4iYtvmFY6Fox68/ua 2iB4Q4Hc2tdk65TybqDhQStSAvG/YyVNJ+HTEDkYvRTz2eNW7bqQAj73I6KcxwU1gmr0 h4rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vkPkfq2fgoUGsJYO4dvus/dJhLKri2mH/TNFsE5MZvI=; b=KVgOSMuhZZzHNKjexRYhJOH/VSqdqGfYourJXB5o9YxOOkSEeHuErZ3fYtWtMAT7Qg bMoLSr9a9eqBoHoUffzv2wbaYW5PR9xFSn0ebK5bg5Xbg239tVS5FOMKsrOz6rLXirJB Vgdc6mGxMoTg42rySBcQXqVKCog4NddL64UUjyDRH4r6MnLBZB40T68eiYo7g4sZmUbh HocSDHU4IwlddSf75pTi4LAoo9p0+mFhudX2n7/P7bekP37vrQL+5bXySbKJlEBMkYVK JnicVb+Dm94ubvl+hoH7HSlM4VlepPnyOiFXTqhxhPR19eJ9VRd/gPgWDpVIsEwAAkEq /JDA== X-Gm-Message-State: AMCzsaUp0FCrme0Vxm8tIeZEp/Py9CGkMfrWE8TaCmEZnF9lmlbGprC/ cN5/C8gpjBLa2XOvC6IqoUxz9vbWEn8sZewajsCsSg== X-Google-Smtp-Source: AOwi7QADOMy7y2kwfR7JupO7X+SPT9HBMYdKV3OrgUoqXQHjpwSApipVOvTHTC3m/JjJtHNXiZLH4SAZqAn/wYllUIk= X-Received: by 10.28.19.10 with SMTP id 10mr2988576wmt.87.1507337619536; Fri, 06 Oct 2017 17:53:39 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:11983 Archived-At: 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?