From patchwork Mon Nov 9 18:35:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 320974 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1965545ilc; Mon, 9 Nov 2020 10:35:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOR50ikzOrFe0pErT7n0S8VPvBxCuAmtiyB8xdiRHRJSUt6dYPG8RCl2mtsKArCZ7mg9oC X-Received: by 2002:a50:d942:: with SMTP id u2mr17053204edj.202.1604946941573; Mon, 09 Nov 2020 10:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604946941; cv=none; d=google.com; s=arc-20160816; b=NpjNyevSEyOMgGP9xs+Yw1E7liL5obqudcmdQv6RawrT8IauT9cWg4ReZzcxXfHFd3 azY/nAKzqF9zIfTH8cH53FUdNIaBZWqF6z2VcIWr6s7B83hMfnwHiRJGYSpAzo0IeFGe 27JShrl2yZpz8o4BcAH+VDOYr+VBfyBgheFTAKNJ765U0ys+hnH598a65Lz7TADvid1i o1j1WcwdjlfdmAM1tU3AVsfcEmSldYfyAFqrxROj0pn1FXbx4nF5EZ5V/sTtYvjZG98J yVDN5l34NiLBQrvC/cE/WMYnZnKTZkImyFBsQLv1RlKDqu2G1IIB/ZeqUJgIEmxOvdpH 52mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=UPtFfO/KAGWjAZ8J0b/rcbbvthH9v1BWCmAggArm5i8=; b=eI6rb6Wjwy6GakFmBjpWOvXx5UG9qGmz4y0hUy9JyDqRGOhRVY8JyLIIv2lOoEF6MQ iaYJiJOVUK2yGgRWmHpdQMO3RHSuBaquGx2vOYtfr/OMHU+iPf4g/RXowKxcdA5Va0JW AWQDiUmIgK+7yPHQ9Z/q/87G2t67LL2ya51XYNuRUexo7GvAPBRr3P4ZdqLgmJS2ubG3 on0l8KKB3rcBX6Kj/vR1+cXlKM5Vk3JbVB6LlcB/vlHhAqA4XFT7Ev2ZRDsf6OVnkg0o /cQuhb6zAZbxOnDm7odMGBWqkDpEu3gEKOOry5/46lHYRxjnWRI17pXizaVBLOZ6+zgh wRlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vKs5LajV; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e26si7569830ejc.81.2020.11.09.10.35.41; Mon, 09 Nov 2020 10:35:41 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vKs5LajV; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729856AbgKISfh (ORCPT + 15 others); Mon, 9 Nov 2020 13:35:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729320AbgKISfh (ORCPT ); Mon, 9 Nov 2020 13:35:37 -0500 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28E7CC0613D3 for ; Mon, 9 Nov 2020 10:35:35 -0800 (PST) Received: by mail-qt1-x84a.google.com with SMTP id e19so5601725qtq.17 for ; Mon, 09 Nov 2020 10:35:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=UPtFfO/KAGWjAZ8J0b/rcbbvthH9v1BWCmAggArm5i8=; b=vKs5LajVBuLwgcTXsa04azyliKJQi5uGBHpoBZQTKHdiPBPI8ds9ivlapOW8u5uGCT Y+le2kl8KzoOf5zjXrcY/r12LsBEZuMYGzMzUyvBWX5zTR8q1h8C1BRdkkS2h7faC3gd dWcwQniJuCPtPlYBrHtcUSe3o+fqWUUioN7sgNpk04r9BseaXw//Kr2z2g/uqNRCuGyH IcruuoMx9dT/Sl65YKMJanasPemkm1w//WpuFOiOHGZDBt/jI/Znff/6OsNiEOqKlhYr zuyrjsFW5Psr/ecmVk8p5sRfgeDAjyCWiJ1Z3tDoNHlUTG0n1vPonPh6ZqWIm6Da2lxv sRNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=UPtFfO/KAGWjAZ8J0b/rcbbvthH9v1BWCmAggArm5i8=; b=TSy6ZDDN6K5ZvKJWaNmiPP18r7WoDDBbH8EHgbf4066B28h+2JUTGlVNY8s4xYlRHp 6gUZ6yk9e6e5S48Qm5UW7echOSui158ywbQ98VX3iWfeGvqG9BmNavYqwH6ZgV/b2CtO IhexQ039mVzcqZ4eYrL5Vjh9wlYg5sX1oHgxRxPiM4rviCyt2Xv6iMdFKqDUaPyoh4pq rSvBRoo4C28LRXJnH8CqS3WPHWT6VwJGIehaF3EwK865vCri9R4uHtvtP5MBnJRVM9KM s2gcYCp65v+/7nlOtSbxTI0kFi6H0bB4jMOfwKn6FYCe7PYKi9D4xZryGgzMgFAuM0US s9KA== X-Gm-Message-State: AOAM531iMPg61OgkHYhWYCAXKytGx8jNBubUdO/ylOOu0n8DQEo2mMZ0 s30hHl0Ac32/tA7NJcqBt/j/HIKvl0erTsUP/wg= Sender: "ndesaulniers via sendgmr" X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:f693:9fff:fef4:4d25]) (user=ndesaulniers job=sendgmr) by 2002:a05:6214:174f:: with SMTP id dc15mr15123606qvb.26.1604946934162; Mon, 09 Nov 2020 10:35:34 -0800 (PST) Date: Mon, 9 Nov 2020 10:35:28 -0800 In-Reply-To: Message-Id: <20201109183528.1391885-1-ndesaulniers@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog Subject: [PATCH v3] Kbuild: do not emit debug info for assembly with LLVM_IAS=1 From: Nick Desaulniers To: Masahiro Yamada Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , linux-toolchains@vger.kernel.org, clang-built-linux , Fangrui Song , Nathan Chancellor , Sedat Dilek , Dmitry Golovin , Alistair Delva , Nick Desaulniers , stable@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Clang's integrated assembler produces the warning for assembly files: warning: DWARF2 only supports one section per compilation unit If -Wa,-gdwarf-* is unspecified, then debug info is not emitted for assembly sources (it is still emitted for C sources). This will be re-enabled for newer DWARF versions in a follow up patch. Enables defconfig+CONFIG_DEBUG_INFO to build cleanly with LLVM=1 LLVM_IAS=1 for x86_64 and arm64. Cc: Link: https://github.com/ClangBuiltLinux/linux/issues/716 Reported-by: Dmitry Golovin Reported-by: Nathan Chancellor Suggested-by: Dmitry Golovin Suggested-by: Nathan Chancellor Suggested-by: Sedat Dilek Reviewed-by: Fangrui Song Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers --- Makefile | 2 ++ 1 file changed, 2 insertions(+) -- 2.29.2.222.g5d2a92d10f8-goog diff --git a/Makefile b/Makefile index f353886dbf44..7e899d356902 100644 --- a/Makefile +++ b/Makefile @@ -826,7 +826,9 @@ else DEBUG_CFLAGS += -g endif +ifneq ($(LLVM_IAS),1) KBUILD_AFLAGS += -Wa,-gdwarf-2 +endif ifdef CONFIG_DEBUG_INFO_DWARF4 DEBUG_CFLAGS += -gdwarf-4