Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3571171imm; Mon, 13 Aug 2018 14:15:42 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxvX+eDrNOvWKPeeKmjtFhJV+9bno9bgmSDUc+VzvYx4aIDcknV1jHak+M2Wyw0m9whfjDM X-Received: by 2002:a63:5758:: with SMTP id h24-v6mr18384976pgm.432.1534194942843; Mon, 13 Aug 2018 14:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534194942; cv=none; d=google.com; s=arc-20160816; b=Y03ds1aGGMMw1yjT4747xPTUfwvdvqiunH1AdLb1RJrzT1QC9cJJPnajZkVEduQ/2s 6vv+suweg2XOcHD7nAzHa+oo5OE1efDORkE3Yh08FpXxnUcX5RrlzIxIuLi9U6xdGshk SntLarMdHNR/mVxgacqDMhBwRtLxBmHF75VcpLsaZGquZMiUvlj+J4W7UP593fja8aDy vLcMiG5RqJj39MGYX8I7HViXRu/9PEIum3XoKfKlA19GUJVy/H5LHoCor11Zko72kmYM 726DHYQYEM4jPY/6d+mfkAM1YV0gf7c7uJltG/GcG+lFORMqfhfetRJ1AufgVb31vEF7 i/qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=KcgaH03XTLwDDCE00jQnELxS4ukMAIjrnT45GxO3VNM=; b=PeDhqgeDTEX2x5fmrNrHhlZnMBh6LN+6QEKqzNOz7D9km5o1eaDoYsjoVBDXeJXZYO bCwE2aQ1EOJfBiBER/+x8D1jmLYFCOrtUR6BPHudk4pUTzfxMonCqkgQGI9yXRagd+g3 prch+2TABdKJ/buR4qQInPeVKpSQfp3oWtj1lhZ6+3TKrnUex1uQkwHwW66UHSMnG9gz Ntp1oI2q0VMcdJOA/18gTzzfJBgSeF3ch++b5aNpETROYEse+OHJWBR49pJU/PRNdIqw Grhlx3cr1YJtjtjKW4UT1ZDFc5PhuN/b/m6xIZA0WH/yHMPJd+B/Vd6vhVyTYXjIZ2G+ 1hUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17-v6si15679866pgp.549.2018.08.13.14.15.27; Mon, 13 Aug 2018 14:15:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730417AbeHMX5J (ORCPT + 99 others); Mon, 13 Aug 2018 19:57:09 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:34815 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729126AbeHMX5J (ORCPT ); Mon, 13 Aug 2018 19:57:09 -0400 Received: by mail-qk0-f196.google.com with SMTP id b66-v6so12056881qkj.1 for ; Mon, 13 Aug 2018 14:13:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KcgaH03XTLwDDCE00jQnELxS4ukMAIjrnT45GxO3VNM=; b=iIL4U7qJCbIyjxI2re53beLvx0/Qy0ltnoU1RgcJXnEw+/atA+e5IrV9FBLAfkrTti UiU7i4u28VHV1YFldROhpZP158vOOu4bf2zws40dhZWeEvTu60hnH3lI57jQRrPLacRj ud2dbZyR4jUYz/UCyTPcy6YKpe1ta1nx/O/TZiPe+A1YQ0I40L7TKOwya7qPssppwusA h5Jhkl+8lhxBDcycuw/7FvaEdB+oAqtR9JlNQ9gCM3HP3Y2IfzmmOAAQWL0m96SNu7rq ntyot93n/xHIGspU2ALSwfs9nkBKCrDG7KbxuVPWNsZVVA4cO39Mvr8SKZtYCqdtaYnO xg2A== X-Gm-Message-State: AOUpUlHTkOpw5Zzr43aSDNCsn+ZhIatFUlUb9zw1P+eEC5/XH9g0O6R7 fYweGs0+V/p4GPdyocxpBOR8rN8XZ2y4hJdbdG0= X-Received: by 2002:a37:6ac3:: with SMTP id f186-v6mr18257816qkc.224.1534194792347; Mon, 13 Aug 2018 14:13:12 -0700 (PDT) MIME-Version: 1.0 References: <20180811095235.1938-1-stefan@agner.ch> In-Reply-To: <20180811095235.1938-1-stefan@agner.ch> From: Arnd Bergmann Date: Mon, 13 Aug 2018 23:12:55 +0200 Message-ID: Subject: Re: [PATCH] ARM: require GCC for FRAME_POINTER To: Stefan Agner Cc: Russell King - ARM Linux , Matthias Kaehlcke , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 11, 2018 at 11:52 AM Stefan Agner wrote: > > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug > index 693f84392f1b..cb65cf67dfa2 100644 > --- a/arch/arm/Kconfig.debug > +++ b/arch/arm/Kconfig.debug > @@ -54,7 +54,7 @@ config DEBUG_WX > # n, but then RMK will have to kill you ;). > config FRAME_POINTER > bool > - depends on !THUMB2_KERNEL > + depends on !THUMB2_KERNEL && CC_IS_GCC > default y if !ARM_UNWIND || FUNCTION_GRAPH_TRACER > help > If you say N here, the resulting kernel will be slightly smaller and I suspect we actually need a bit more complexity here, as we have a couple of options that do something like: select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE && !ARC && !X86 This means that in configurations without ARM_UNWIND, we still fail to build with clang. Maybe something like x86 would work, this currently has choice prompt "Choose kernel unwinder" default UNWINDER_ORC if X86_64 default UNWINDER_FRAME_POINTER if X86_32 config UNWINDER_ORC bool "ORC unwinder" depends on X86_64 select STACK_VALIDATION config UNWINDER_FRAME_POINTER bool "Frame pointer unwinder" select FRAME_POINTER config UNWINDER_GUESS bool "Guess unwinder" depends on EXPERT depends on !STACKDEPOT endchoice so we always get some form of unwinding, but have different levels of functionality in them. Implementing ORC on ARM might be nice, but that's a lot of work, so I'm not expecting you to do that. The simplest approach would be to always force ARM_UNWIND=y when not building with gcc: diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 43d598c9b1f9..b390ac99ba20 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -60,7 +60,7 @@ config FRAME_POINTER reported is severely limited. config ARM_UNWIND - bool "Enable stack unwinding support (EXPERIMENTAL)" + bool "Enable stack unwinding support (EXPERIMENTAL)" if CC_IS_GCC depends on AEABI default y help Arnd