Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3420563pxb; Mon, 9 Nov 2020 10:37:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyW2x+FYF0tffcFF7t/vpay7e+AJsxibakKKoUnOjGFv3Slq+U5fS3IpbctOYvnR5n2Hww X-Received: by 2002:a05:6402:1352:: with SMTP id y18mr16654325edw.378.1604947046179; Mon, 09 Nov 2020 10:37:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604947046; cv=none; d=google.com; s=arc-20160816; b=0yjzVBl59irfrnxi8UYtjXhU8DYu1jZCx9kcjaew3KUgG2op0vL6Zw2Idjhips6zkl +a9ZOX2aGzztQvyva2kvBT4Zl3njHyv5w5wk8CHZ0ND52ZSd2gL8jFkzsnrg1VIYL5Pw 5vusje2IMX8YyMeyruoB+B/IfKoJrNXpmzNVwtwT4R+MHjs4KgdTe3LCqLUvkogE2nLR su4Tz0x6NY1FIX1g2U6qC5+4sooyaS8DI6SuBRhCsY53yHIBuHpe3JAch2uQkNHM97WC LWu8EbsSEb9FHu7iJVp1d8kEKv3+Ab+WSSQthMz9oo7wLDj+r8+BkNxngKSt91ja4L/6 QPVw== 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=s407xQBbfsgNysI23Xb6fyNhoqAa/VRXp1swYIeZo5sNh7DAQyfLK5xhlxkx5MPXcC GTH5wtitgHbdIlG0erB+cdcXJXjiEx5zgMwkTnk8wEFK4CqT0/nnHJYUfbCtMWM0pz8d LWxbfxixEpeJAu33Abl3pyb7yYFpaflsLkVY3S+xIFd2kW66DOO664oxyBKrL0is3ZGd DmUoRXA86ZVIADHn1LQAxzd7E/phiYFVd8itUDnpj2Xhbio0YcHHlcVsLzg2Kw+MYFtE 7+voJUdajgrURg8021rc330W/036KnxJS3TyGDktl+D54yx/lVLUfUCg3rMgZfU3x8wx oGDg== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 x16si4999413eds.110.2020.11.09.10.37.02; Mon, 09 Nov 2020 10:37:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1729648AbgKISfg (ORCPT + 99 others); Mon, 9 Nov 2020 13:35:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729320AbgKISff (ORCPT ); Mon, 9 Nov 2020 13:35:35 -0500 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3863BC0613D6 for ; Mon, 9 Nov 2020 10:35:35 -0800 (PST) Received: by mail-qk1-x749.google.com with SMTP id t64so6635811qkd.5 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=SKwAsLMBWFR4KqNXpbJoziyCSKymnC4m+c3gw6B9Jr6RnpVMmIhChCFKcb3risrKZI hhLcE+TIEBB7bUYxJCo6wzf9b/8SKDkIdT+cpSI+0ZvIhowp6dQl9Ch3VAbqYJLvzaQh JNKukGB54unVHoR3yWfX/nB0cGUSlpC+pXJ3BDeH1Ti5L+0gt6ez6Kw5ccTOnyZoZASD aapgmxDHNMqEpqFVjYHx4nCqTnNUMz3OHmyaBy3oay1AwqzowUo1YbSdcxia2RTvyvCg SXK/o7LskFmY2AP1zxxYDMb4yIJXqYLtQHUV3aaRcD+2FiBtABcb5TP8cRtNKZOa7Y2s wwXw== X-Gm-Message-State: AOAM533HTnOCqp9I2oUWwrP2epEjv4TgbRLeQ6hrUCKftPRkD97S/D4d DYxrd0tCrFmxhyv6mM145rzaaTZ6wXhF4q+cpUk= 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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 -- 2.29.2.222.g5d2a92d10f8-goog