From patchwork Sat Oct 7 20:23:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 9991415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E68C260231 for ; Sat, 7 Oct 2017 20:24:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D476D2022C for ; Sat, 7 Oct 2017 20:24:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C79F821C9A; Sat, 7 Oct 2017 20:24:11 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 728702022C for ; Sat, 7 Oct 2017 20:24:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752685AbdJGUYJ (ORCPT ); Sat, 7 Oct 2017 16:24:09 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:37478 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbdJGUYI (ORCPT ); Sat, 7 Oct 2017 16:24:08 -0400 Received: by mail-pf0-f194.google.com with SMTP id z80so1426416pff.4; Sat, 07 Oct 2017 13:24:08 -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:in-reply-to:references; bh=PYO+PUfrCGJ48qzfQocnbO3vTsa92ftVx/IECV5JgyM=; b=pazESmm7veMXUyA7Q3rOFnIqRXlAiVX7/v71DdPzSLvBIFlS02+qA9VcWOGhWlF/7X R+8DCz+z6FYPUzdAW7bLS7GOZAAhW0cj4jUcf/L4yxnQ7nU3lbsQ8OWru24r6o75fztS jKXxQVgJCA/jIntUtKZeYIXliSW4pG+Iu849dE5A1MwZY+qbiVSn47MCEXv1iimnIS7I 2lmXGHSuO/48oNeaBdhYctdoJIH6hBTcsG60TkvZK4v7G784cqHwQoLLxet3gaMB4AcQ sxBCAS3d0QNZ9XHu/LReRdw4/OKVa9AyItg19Xl1XOvdljC6Cf2XI+98prQdLByNCk+B RTXg== 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:in-reply-to :references; bh=PYO+PUfrCGJ48qzfQocnbO3vTsa92ftVx/IECV5JgyM=; b=tAgCoWnl58Rf9a7coN4Ceb2y5CIDZFyT2wwwFP8Jl+JmSsot0Vau9Fj2h3E45H2uy7 0GQzIXqwuDC9zipUx5qw0TM8B5p2HU4y9oXefo+HdkMp1wIIX6IFBgzRfbpUPMPJ/bEV vhMSMzJwaOMSFuHqnoJF4ZP5odSJTAb5LL/Fn2nwwWsOfu9cYDLHOscCTZEEO5irCYkV Hso6uP9m4L4nCFsfG6j7pXDjrgMmWvPCBDRyXEgTsSZaSpRH9llqfnfj/niyeXVakDOy XQSuM2JLCpOII4Au9EIWphh1cAvObmG7BhEcn00ichk6wyuZFGQ7GL8LnHmNmWHGOnnd /c8w== X-Gm-Message-State: AMCzsaUSxuKJxFjKWofns91IFLufNh1X9gMgqiqBBN2+PBGBKl7uOg+d fCqE7Z3gOjWxT8c5Y9Q9pX0= X-Google-Smtp-Source: AOwi7QAtLqriO6bZfGw4OkB1310XouC5OvPOJlcCMul6CJK+nKj3u/B+Y21XhwjQu6KvloiDX1V7pA== X-Received: by 10.98.58.69 with SMTP id h66mr5813962pfa.121.1507407848158; Sat, 07 Oct 2017 13:24:08 -0700 (PDT) Received: from localhost.localdomain ([2601:647:4701:31a:320e:d5ff:febd:81c]) by smtp.googlemail.com with ESMTPSA id n129sm8760008pfn.78.2017.10.07.13.24.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Oct 2017 13:24:06 -0700 (PDT) From: Nick Desaulniers Cc: behanw@converseincode.com, dl9pf@gmx.de, charlebm@gmail.com, mka@chromium.org, ghackmann@google.com, md@google.com, Nick Desaulniers , Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] kbuild: clang: remove crufty HOSTCFLAGS Date: Sat, 7 Oct 2017 13:23:23 -0700 Message-Id: <20171007202323.1993-1-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: To: unlisted-recipients:; (no To-header on input) 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 When compiling with `make CC=clang HOSTCC=clang`, I was seeing warnings that clang did not recognize -fno-delete-null-pointer-checks for HOSTCC targets. These were added in commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang"). Clang does not support -fno-delete-null-pointer-checks, so adding it to HOSTCFLAGS if HOSTCC is clang does not make sense. It's not clear why the other warnings were disabled, and just for HOSTCFLAGS, but I can remove them, add -Werror to HOSTCFLAGS and compile with clang just fine. Suggested-by: Masahiro Yamada Signed-off-by: Nick Desaulniers --- Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Makefile b/Makefile index cf007a31d575..5853d9492590 100644 --- a/Makefile +++ b/Makefile @@ -306,11 +306,6 @@ HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) HOST_LOADLIBES := $(HOST_LFS_LIBS) -ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1) -HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \ - -Wno-missing-field-initializers -fno-delete-null-pointer-checks -endif - # Decide whether to build built-in, modular, or both. # Normally, just do built-in.