From patchwork Thu Jun 27 19:14:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11020419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4B0C1575 for ; Thu, 27 Jun 2019 19:15:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD8DF26224 for ; Thu, 27 Jun 2019 19:15:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB7472870D; Thu, 27 Jun 2019 19:15:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99F4C26242 for ; Thu, 27 Jun 2019 19:15:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbfF0TPR (ORCPT ); Thu, 27 Jun 2019 15:15:17 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:46957 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbfF0TPQ (ORCPT ); Thu, 27 Jun 2019 15:15:16 -0400 Received: by mail-ed1-f65.google.com with SMTP id d4so8100091edr.13; Thu, 27 Jun 2019 12:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ObWs36Suz0E8Ix9gwTSGcoL3+1AmZfjVOms9VIy/5H0=; b=MGBEXLhzBbtlTYNwX3jL9AXvyDdoSqDyjjZR9ilE9khwGdl9Crs6BKzB/1waq623S3 28IpBlBKXDcui043CGeLn548r6S4EwKWgatzFj0muaSpcTzoGYdZt4on0PPtMxgJ/AKe GN7lbVz8QxpgV7p4d+QTFTZXjVyCv0+V5SfmF4C/dvg55acN5Geh216WIoVseLusG3J4 wCtKHNIYhzGoR8v+n2TuPvcPaVKeoO0+S1DmJRh51LPK2swij9jR/nQZeFnJ6FECcOq3 reaPq/WtH0lzJOlp6sBlPns+e3sr/oRo08s5qq9kcLIl20V6tb6R0NAAiabaqRmSQKxy p+Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ObWs36Suz0E8Ix9gwTSGcoL3+1AmZfjVOms9VIy/5H0=; b=q6FDFqvI/OxyGhqC9Lr0/PXs4cluIoiHdP3rxz2iKSvE6Zh48fd8/c1VC9V7NZwybh jG6thrSudETHoM9QPsjhJTBJ4iUqvau6frJZg9IpPuHCUkw5G+35usCf8JZGt0d6mCGu d+wJvju+Gg72EsFiNw/nrQbd/gXJQRxqLhEtB5AeuZXCfFRaTjQ2UR8Q3faY8ZZa/aE8 H9zK5m9it38rBH5+EGmJJXGLFHxPDbMVYm1POt4Q4cMceCSVNs2lCSOis8ebn2cZpZhJ KcS/A68dQ26nWP8x/YSi3vyF06YQJoIKfp/Jv8t64Ak9eDqijqT7R4B+zE2VYSLRebel xwIg== X-Gm-Message-State: APjAAAWMMEFQwLtmMQUfrWBySoBAfX822U8N3fpHxTIqn5c5V7dLq2pO AFpOizj5gP/sOtrOwARC8qI= X-Google-Smtp-Source: APXvYqxItNgNCiAXitQwi+XxmI7WT9h2Qcgl5SWvDXHUkF6e/ZY01uP4hogbklEeukntbKmxkAYn1A== X-Received: by 2002:a50:ac12:: with SMTP id v18mr6422438edc.232.1561662914242; Thu, 27 Jun 2019 12:15:14 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:2b:2b15::2]) by smtp.gmail.com with ESMTPSA id si13sm589836ejb.82.2019.06.27.12.15.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 12:15:13 -0700 (PDT) From: Nathan Chancellor To: Masahiro Yamada , Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor , Dmitry Golovin Subject: [PATCH] kbuild: Add ability to test Clang's integrated assembler Date: Thu, 27 Jun 2019 12:14:48 -0700 Message-Id: <20190627191448.110756-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are some people interested in experimenting with Clang's integrated assembler. To make it easy to do so without source modification, allow the user to specify 'AS=clang' as part of the make command to avoid adding '-no-integrated-as' to the {A,C}FLAGS. Link: https://github.com/ClangBuiltLinux/linux/issues/577 Suggested-by: Dmitry Golovin Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 5102b2bbd224..d77481129339 100644 --- a/Makefile +++ b/Makefile @@ -527,7 +527,9 @@ endif ifneq ($(GCC_TOOLCHAIN),) CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif +ifeq ($(shell $(AS) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS += -no-integrated-as +endif CLANG_FLAGS += -Werror=unknown-warning-option KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS)