From patchwork Wed Mar 28 02:40:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 132509 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp210902ljb; Tue, 27 Mar 2018 19:42:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx49PHD5YYU/Uf/Mk+ZzpesDuimHn8fGPUgEy+xvDwhXM7zjjnmOnIbLcIETfSPgJOkV1Jjwa X-Received: by 2002:a17:902:6ac1:: with SMTP id i1-v6mr1834225plt.152.1522204944658; Tue, 27 Mar 2018 19:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522204944; cv=none; d=google.com; s=arc-20160816; b=jYWD/UKFWdl+zMSSdcaRAqGoYLltAj/E/7wPE9OdfsYEtDsJi/MEGqgG4p0lWgzRpI mf1g3zmfWNv9Qj7xYykglkbyAv9X6ldjg6m05kv6XBnmVYNItL3fBgHbLbM+pQiDz2Yo IhEf4XFZsOMiOZITUs1FTfobNaaOaX4TGg0C9Oa44Zxw1rlrdFM0cLYkia1S0yj+rnzc sRSRNLyvAliCVQPwEAVI/xfRQED4jpJTs1cdpXN259IGnC5IjgWpEts/y2YR9gkqQloh D2Yq6nlKwReme1Ay0+SyjscZz8XNoNug2mZ/vm951KBE7iwCgxgFLJVUNQjVIg7cCr6J lu5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=0Dp1mlhyYDRpM7kJ+Ob7WMnEy9c71BC4++MPu7gB1m0=; b=oIYodF0/PRkK3P00BeW5yv5rAXC0g2i2pyqz402aM2T3Uc6APxxwJ8czAsuq/qGcTH ZUJGWLtthQrVt226NIpVM/KuJJPaS4m31scTCgtwA5sftc1Y9RnNK+6yKI7z7Sx27h+y 0qB8EMdaHlJYoTKUoxVPZ7f4aVxIdIq48DyPtuguQl8Gb4divHCtWdsD+ICsiRfMFotu r+NwdY7IPa2Dwr362wPm8a2dmR4rRVaWguGx7z8c4mmY/7Y9SF31vzsRO7wIS80IBWF1 lGSOCwUUIw3M3qSBGGfL3NpbgvQTUxh+UyDVwmOB50ewJ/k3tsvYMDbcrYwYg/8wYYQG LfEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=DQQauHjj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si2028489pfe.133.2018.03.27.19.42.24; Tue, 27 Mar 2018 19:42:24 -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=@nifty.com header.s=dec2015msa header.b=DQQauHjj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752346AbeC1CmW (ORCPT + 28 others); Tue, 27 Mar 2018 22:42:22 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:56799 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbeC1CmU (ORCPT ); Tue, 27 Mar 2018 22:42:20 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w2S2ex0Q003268; Wed, 28 Mar 2018 11:40:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w2S2ex0Q003268 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1522204860; bh=0Dp1mlhyYDRpM7kJ+Ob7WMnEy9c71BC4++MPu7gB1m0=; h=From:To:Cc:Subject:Date:From; b=DQQauHjjK1Kwu8y/O6dTlLm0zCMcOXt/MsqlLLgt0mnrBBVfAFjKJaDACr2Xvrf2m uZgMRxGjLvKJugQSjUzENWF9b0gpDAqD/Mzk8Dc3zqVhRUHhl9LZGNkYUQMdRsfAzY xfMGskbhg/sxbkTWHEUg5Ys5wDb8ChyBhDlWbgAq1bkPjLrE8BsXq19cych7TYlIXA BsmP8M9J0xENqjiDS7nRQ+7Rn8+iztvLGqyHwgqAQFfg/wqBix9moF/5uf4DgF6AXU I1J5XBRqMeG89rAJuZjRA9icSIYhcXG+2oLaw0ATMLMMZIZJ6WrrffnUy3CTsxDAGl tTd/eq8avWqwA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds , Kees Cook , Sam Ravnborg , Masahiro Yamada , Arnd Bergmann , linux-kernel@vger.kernel.org, Philippe Ombredanne , Michal Marek , Kate Stewart , Greg Kroah-Hartman Subject: [PATCH] kbuild: move out of Date: Wed, 28 Mar 2018 11:40:48 +0900 Message-Id: <1522204848-11803-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 28128c61e08e ("kconfig.h: Include compiler types to avoid missed struct attributes"), pulls in kernel-space headers to unrelated file. Commit 0f9da844d877 ("MIPS: boot: Define __ASSEMBLY__ for its.S build") suppressed the build error by defining __ASSEMBLY__, but ITS (i.e. DTS) is not assembly, and should not include in the first place. Looking at arch/s390/tools/Makefile, host programs gen_facilities and gen_opcode_table now pull in as well. The motivation for that commit was to define necessary attributes before any struct is defined. Obviously, this happens only in C. It is enough to include only when compiling C files, and only when compiling kernel space. Move the inclusion to c_flags. Signed-off-by: Masahiro Yamada --- I will also send a correct fix-up for MIPS Makefile later. include/linux/kconfig.h | 3 --- scripts/Makefile.lib | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) -- 2.7.4 diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index dcde947..cc8fa10 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -70,7 +70,4 @@ */ #define IS_ENABLED(option) __or(IS_BUILTIN(option), IS_MODULE(option)) -/* Make sure we always have all types and struct attributes defined. */ -#include - #endif /* __LINUX_KCONFIG_H */ diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index c114ce5..07d0740 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -152,6 +152,7 @@ __cpp_flags = $(call flags,_cpp_flags) endif c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ + -include $(srctree)/include/linux/compiler_types.h \ $(__c_flags) $(modkern_cflags) \ $(basename_flags) $(modname_flags)