Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2743255ybb; Mon, 30 Mar 2020 12:00:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuP54A9lpMYwulezPLZ5KUX71n8xqSY/lt9f5M4r+VN/nqsAT3vY6oCxB/dM3MhOjp9N4Q8 X-Received: by 2002:a9d:544:: with SMTP id 62mr10361298otw.355.1585594805657; Mon, 30 Mar 2020 12:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585594805; cv=none; d=google.com; s=arc-20160816; b=v723NWq4JgJXt4YEkOHYqEr23hU6T9Z+L81yKG2xlQjlB33zgftv46OREQG+VLRn6h hpYzQ18GoGLAq+JdvlX8GBnZEFIg/ox/4ikETUzsPOshIwJjkHGP/CoXjM1jPojwk6zO PaytejayAsyeKBp5ujmPKQeRG6cq7AdT3pFEgh9vyar4Hzsnx2teP1mnHa4aH1WRC5wo FyCatTe4nfAEwcwuYcKrqDGCaHwW3Ay8wJNZEl7MMJKQPDh+1vkVKmnTVHfiPBTCZoMO ORyaixzlVTPubH54QNpX+Rxb+AogXQg3ZsrucYPCmxQUXjVQ1YCEiVM9un30QWk3q7RF NTSA== 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:dkim-signature; bh=oaymTvWhl+uolecE6yhTgiJXYyga2SjGtw1lmCMSDqs=; b=OH9XpWkyx7B7c/NhA+Q0vp3dQca0UzU9j7AdItJj833qdXpJYcQooT631J0KAD5xwh SV/kKUh3tJrIvngO7li2IDSFrnitADEvujYtVDx54QUDfC1GiPmarrWN8D9WRKdUI/be kiyNUSe3G/tz8Fcqfj6wJ5C6RotO+OGaCKOah347wrRAj4B19jemUu1tnfbALM1wpJyu 8+CujJxS9v4v2ZO01GGT8APkpf89pdo2hTDvoKjRkUe+xInI0pBIG4PV11c1pP3Ua6/W KQRVo8pCXofqSOIYjIs296KjAq+FXv3IGd7xd+BScXt+5cLEe8/lLKCzf5OB4CkAYtB1 cvSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PsHW7I1f; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v67si5553184oie.127.2020.03.30.11.59.53; Mon, 30 Mar 2020 12:00:05 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=PsHW7I1f; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbgC3S6d (ORCPT + 99 others); Mon, 30 Mar 2020 14:58:33 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40178 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbgC3S6d (ORCPT ); Mon, 30 Mar 2020 14:58:33 -0400 Received: by mail-pl1-f196.google.com with SMTP id h11so7092487plk.7 for ; Mon, 30 Mar 2020 11:58:32 -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=oaymTvWhl+uolecE6yhTgiJXYyga2SjGtw1lmCMSDqs=; b=PsHW7I1fS2tGpAp9WvwvJEIEB1UhTC/5ffZ+EV5rw9+EDE7tWWEdgrRp6Zkf4SjVEp cwkaxDt9VbxLbNrtTCDAhBtyhD2Hd7kMQQl43Bm5Tdtw1LhZ9hJfHMP6t+JJvItmlmR0 u8RpCpiEqOS4oEXW6TJJwjsszDbl9ZCCf+g0khHWGpbpEvPGMUti1mNuC9GtgMR7826j 5DHf+zOjK/EeHeemjI/6utfmQwuuxAhaslZa8Hdd+DhjiiwyqBHnr74+La/82/FPPZOc Gdy6e4cyYRmLAxOJFWJ6fE+lhclAJLgLw1S8OZ/jjoiG8/1Vz/58WuDfW+rkaVbwPWeV Ya2Q== 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=oaymTvWhl+uolecE6yhTgiJXYyga2SjGtw1lmCMSDqs=; b=Pj4RkvGoHD76kenb7N9xvm5/M8abNtJJejb87ZZiDHV7lrG+0fhXwGm7r3TNVfHkep 3/GJJzuZC1Iqm8zwlI964rYiEF8h1WuZx1gt3CQi+QGZlxnayxVgp5pIORXIJIpZK7Lp pCqrKLUcnSiwAxCnw7/VSRsg8KcueqdjxU40VWa/UbdqkZCTG8JRUXHBmnaPV9VFIyaN ZRmoooWxGiDkIpiV85+8a1JmqvQgG0/f518WQWMa44bjGaia9dyETFByDVIza0LjK9Oz AZGV/ZQIT1G+yU34VVRjGumFJ8tPcPHbSvRDcATwro8sWdjDsEoUAPZwvI0YWLHKhmMA KGgA== X-Gm-Message-State: AGi0PuZkz3bjVITzh9ge+UIMUF77R5P8ylrCkvn45FMHRLnHFWA/F4F/ iEPf0YfJJ9muE8AISxoK1D4mRU3DDZ3MBMYNOf2FNg== X-Received: by 2002:a17:90b:8d2:: with SMTP id ds18mr531303pjb.186.1585594711248; Mon, 30 Mar 2020 11:58:31 -0700 (PDT) MIME-Version: 1.0 References: <20200317202404.GA20746@ubuntu-m2-xlarge-x86> <20200317215515.226917-1-ndesaulniers@google.com> <20200327224246.GA12350@ubuntu-m2-xlarge-x86> In-Reply-To: From: Nick Desaulniers Date: Mon, 30 Mar 2020 11:58:19 -0700 Message-ID: Subject: Re: [PATCH v2] Makefile.llvm: simplify LLVM build To: Masahiro Yamada Cc: Nathan Chancellor , clang-built-linux , Linux Kbuild mailing list , Linux Kernel Mailing List , Sandeep Patil 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, Mar 28, 2020 at 6:57 PM Masahiro Yamada wrote: > > I also had planned to provide a single switch to change > all the tool defaults to LLVM. > > So, supporting 'LLVM' is fine, but I'd rather want this > look symmetrical, and easy to understand. > > CPP = $(CC) -E > ifneq ($(LLVM),) Yes, a simple if statement is much simpler than the overly complex patch I had. > CC = $(LLVM_DIR)clang Do we need $LLVM_DIR? Shouldn't users just have that in their $PATH? Also, I think we need to support suffixed binaries, as debian distributes these with version suffixes, as Nathan points out. Or do the debian packages install suffixed binaries AND path versioned non-suffixed binaries? > LD = $(LLVM_DIR)ld.lld > AR = $(LLVM_DIR)llvm-ar > NM = $(LLVM_DIR)llvm-nm > OBJCOPY = $(LLVM_DIR)llvm-objcopy > OBJDUMP = $(LLVM_DIR)llvm-objdump > READELF = $(LLVM_DIR)llvm-readelf > OBJSIZE = $(LLVM_DIR)llvm-size > STRIP = $(LLVM_DIR)llvm-strip > else > CC = $(CROSS_COMPILE)gcc > LD = $(CROSS_COMPILE)ld > AR = $(CROSS_COMPILE)ar > NM = $(CROSS_COMPILE)nm > OBJCOPY = $(CROSS_COMPILE)objcopy > OBJDUMP = $(CROSS_COMPILE)objdump > READELF = $(CROSS_COMPILE)readelf > OBJSIZE = $(CROSS_COMPILE)size > STRIP = $(CROSS_COMPILE)strip > endif > > > > I attached two patches. > Comments appreciated. I'm not sure the second one that recommends changing cc/c++ is the way to go; I think it might harm hermeticity. > If you are so addicted to LLVM Lol, maybe? -- Thanks, ~Nick Desaulniers