From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 990B4C4338F for ; Thu, 5 Aug 2021 18:40:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78661601FF for ; Thu, 5 Aug 2021 18:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241221AbhHESko (ORCPT ); Thu, 5 Aug 2021 14:40:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240379AbhHESkn (ORCPT ); Thu, 5 Aug 2021 14:40:43 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7698C061765 for ; Thu, 5 Aug 2021 11:40:27 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id y34so12932466lfa.8 for ; Thu, 05 Aug 2021 11:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PIMmN8s4yzOklVrFNPAhUIzghEwqDAddYwZBgHlhoQY=; b=Jk7ddJUfGVWAW2ritnMlzyPA56WazGgdT9bYKCAeF8cea10/iq+6gu5FhADG0nfih3 uweNh2YYjGYUKbEFzyrkb6j+Xh2YzwgQ3+I4Xx4DMLeoAweSMgkjqi7L1PxYh76UDNAW ExElvdu6nX016+ipoQ3CaGLSvqE+cWzD9SYQAfgRJKCN1LE4TgT4YtrVOyKwRgf3cNwG GRTlr0UMYxHWHudYO0vYXiTGwUMRM8rjcbWOyTAmMDpiSJgV6qcwhwT1JifdPRIaFdFM 1tYmnkT0+O6gC2408aDLeHYLF/0eN5kQbgv4DF+h8b8QJ0aS0n5HDTF63mO3w32Na8+n N8kQ== 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=PIMmN8s4yzOklVrFNPAhUIzghEwqDAddYwZBgHlhoQY=; b=fZKJbrIgQH7jAlITSvZAVHIds1oA+H+rD7fUogjzSUrbcq7pDO2jgv72dmN5Ugi3qR ED2mLRwAeZUnJpsGovr1BRrqRAmYR7FYpzeSJVVXlhfSqjzQfSLACugqRybklSvzuq7V EmD89ehfN0hdHQaCSyEc1DgXOytxDonG18sIxG6gaxD9Cc6J42uM0SvC+MBYD7vyO8r2 KlURJzoRN7j2iyr4EvXWrBTy9Ca5roPUROaC2PrWK429ExEX0le7cVjh6qkUNS7fYhf5 HD1lxIc/f2E0zMtWSd9Bu0OAkJeKvEGSWg3lcKBv6OAQcs0YgdByxuVzqcX4FdR/Tdzm /RbQ== X-Gm-Message-State: AOAM532pywhj0pKbshkvz4MMUlP6LOSWvMD6SraluPqk/4xooq0ySmZ4 pnMgivRP/7V4DKmeMtc2cWv+p6rMZlsQrzFFhIC8tQ== X-Google-Smtp-Source: ABdhPJwKZ0bGNLeTtSOs0C2EEHN8+kzI+49yaZkYoccxWYUpb641owH5DpLRRXUpUFAvyXvR4ehtxAApRyk4oi8LQKI= X-Received: by 2002:a05:6512:71:: with SMTP id i17mr4612395lfo.368.1628188825887; Thu, 05 Aug 2021 11:40:25 -0700 (PDT) MIME-Version: 1.0 References: <20210802234304.3519577-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Thu, 5 Aug 2021 11:40:15 -0700 Message-ID: Subject: Re: [PATCH] scripts/Makefile.clang: default to LLVM_IAS=1 To: Masahiro Yamada Cc: Nathan Chancellor , Khem Raj , Michal Marek , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , clang-built-linux , Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux Kernel Mailing List , "open list:SIFIVE DRIVERS" , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 5, 2021 at 8:16 AM Masahiro Yamada wrote: > > On Tue, Aug 3, 2021 at 8:43 AM Nick Desaulniers wrote: > > > > diff --git a/Makefile b/Makefile > > index 444558e62cbc..b24b48c9ebb7 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -845,7 +845,7 @@ else > > DEBUG_CFLAGS += -g > > endif > > > > -ifneq ($(LLVM_IAS),1) > > +ifeq ($(LLVM_IAS),0) > > KBUILD_AFLAGS += -Wa,-gdwarf-2 > > endif > > > > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile > > index bc74afdbf31e..807f7c94bc6f 100644 > > --- a/arch/riscv/Makefile > > +++ b/arch/riscv/Makefile > > @@ -41,7 +41,7 @@ endif > > ifeq ($(CONFIG_LD_IS_LLD),y) > > KBUILD_CFLAGS += -mno-relax > > KBUILD_AFLAGS += -mno-relax > > -ifneq ($(LLVM_IAS),1) > > +ifeq ($(LLVM_IAS),0) > > KBUILD_CFLAGS += -Wa,-mno-relax > > KBUILD_AFLAGS += -Wa,-mno-relax > > endif > > > > Please drop these two hunks. > > I will apply my patch instead. > https://lore.kernel.org/patchwork/patch/1472580/ Sure. Will send a v2 with Matthew's suggestion as well. > When we negate a flag that is enabled by default, > which is a common way? > - set it to '0' > - set is to empty > > > So, I was wondering if we should support > not only LLVM_IAS=0 but also LLVM_IAS=. > > What do you think? LLVM_IAS= looks weird (so I agree with Khem's response), but if it's common/expected then maybe if there's a way to write a concise check for either = or =0? I don't feel strongly about how it's specified to disable the integrated assembler, but let's sort that out _before_ I send a v2. How can you tell the difference between `make CC=clang` and `make CC=clang LLVM_IAS=`? (maybe that doesn't matter here, as either imply "don't use clang as the assembler when compiling with clang") -- Thanks, ~Nick Desaulniers