From patchwork Wed Jul 26 13:36:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9864865 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 176EE60382 for ; Wed, 26 Jul 2017 13:39:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BBAA28687 for ; Wed, 26 Jul 2017 13:39:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1029C28769; Wed, 26 Jul 2017 13:39:24 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9698528687 for ; Wed, 26 Jul 2017 13:39:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daMUz-0007Y1-MU; Wed, 26 Jul 2017 13:37:13 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daMUy-0007Xl-4e for xen-devel@lists.xenproject.org; Wed, 26 Jul 2017 13:37:12 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id 16/54-27137-70B98795; Wed, 26 Jul 2017 13:37:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRWlGSWpSXmKPExsVy5XFdky777Ip Ig5uzGC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozGM81MBZsFK87O62BtYLzA18XIxSEksINR 4vOuHYxdjJwcbALKEq+PTmEFsUUELjJKPJktDGIzC6xklDjzLwjEFhYwk5i0egoziM0ioCrR9 uUKWD2vgInEx3+NYHEJATmJhvP3mUEWSAh8ZpTYvKaNHcJ5wiYx9Xsr4wRGrgWMDKsYNYpTi8 pSi3QNLfSSijLTM0pyEzNzdA0NzPRyU4uLE9NTcxKTivWS83M3MQJ9yQAEOxhvbgw4xCjJwaQ kyjvJtCJSiC8pP6UyI7E4I76oNCe1+BCjDAeHkgRvwiygnGBRanpqRVpmDjCoYNISHDxKIryG IGne4oLE3OLMdIjUKUZjjg2r139h4ng14f83JiGWvPy8VClxXmOQUgGQ0ozSPLhBsGC/xCgrJ czLCHSaEE9BalFuZgmq/CtGcQ5GJWFeb5ApPJl5JXD7XgGdwgR0ypwZpSCnlCQipKQaGLNzN5 YnLjZ+cGtXdPefKEbTrxN+7TQ9e+zCmccvn2ydbtMuLFb0SXLNF+WNryMvueoGuwgyqW6bnsM 37dU19/B9Uv8nONd4XDL0KvuhExTqLPjGKL/V/8DdF3qeZ53nbnjv+rQh2YVbbxW720S9GZUq Lblns9n++7dkWv0S+WOWdWFNac03PSWW4oxEQy3mouJEAO8F7h1xAgAA X-Env-Sender: arnd@arndb.de X-Msg-Ref: server-10.tower-27.messagelabs.com!1501076230!85756832!1 X-Originating-IP: [212.227.126.130] X-SpamReason: No, hits=0.2 required=7.0 tests=RCVD_ILLEGAL_IP X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1054 invoked from network); 26 Jul 2017 13:37:10 -0000 Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.130) by server-10.tower-27.messagelabs.com with DHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 26 Jul 2017 13:37:10 -0000 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0M36tX-1dtor54BFP-00syET; Wed, 26 Jul 2017 15:37:01 +0200 From: Arnd Bergmann To: Andrew Morton , Masahiro Yamada , Michal Marek , Boris Ostrovsky , Juergen Gross Date: Wed, 26 Jul 2017 15:36:23 +0200 Message-Id: <20170726133655.2137437-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:ScL5PYR8QVDPoRvmKNSvkXMY3o6MZtRRX/EpzTLtS0tUY0KIvSX aEmesN7KDkPjjDBnIm9HpXtvZPAYFZv4LV0HNQLnRerzkU+vVHN6vtKiqpxhgdA7I3uiCIr F4aVZvPNWiYNKv9uPnZdsbWSs1Mt1qtiWtG/yOxPsYrNJ5b6/RVuHkSKQ/H1MrFyaFpyaFc ckhHOtGCfXnbIPPdooCBA== X-UI-Out-Filterresults: notjunk:1; V01:K0:xbN5uHg7d7A=:JmsBsyNMFivS05LrEM35U/ 92wnsyuYgHgSEonR8+eRkVwLJxhbtgVZYJQmPl1Lw2dXxTuSwwGScynLt7vJC1B6KLsJJyFmd 2qQygZ0mQ3Pwv6j7myMAjadppiYt73IT3sdOBQZYbsr+1PJbZ0ZLPkT8QElazXKo1YYG0hrva LhV1Bg4amqHPTsh84sp4MD15J/v4TrZDDa1KuWzUTnneUMFVf2yGBdW94gMeE0STHGpqvh9aT dOaZV0d2GLdDQmHjTsgt4ImxuvY5VvVzsqAiWI+/nI8Yq0ytPIeViYr2dcoJj7wY43UBL5wHS vIiZ0qhTO4J6kfEddbmq/TC+Qwr5a024VfYJsMseNPmQ6ODL9iT1WwubDNpb5lqYu2HI/wKld yaY2i0UfS4eoWD0iDWvTf+PHv6vEdCNMxewgxzV9OVxyEMRzxoklkhBg9VuuLrfqyJ/UOflX1 7+uramquZtKfsdt1BTwdZ5M1k8s1nYUgY/9bj3Bq2LfFxTzSbqii4ihki/7OGEjCOfnFA8hh4 SL8Ci9cYoWlgGCZYvUBSzrHFjmlw512NsCyrZcp73yN4auHSRV/GkUiod08cibrDb493+FxDZ Acxufb2yDJJ6wd7RBg9TLUV7lu0PlVoLLlUiOrohOY3xCNjhlsPkIoidPplSPh6V8o74q1kpu DyjAn9QgypExtbTs/OGlEZqqqbGYcAjHYLohDRhQTrMqi17OECDxFYa8bfzYG97m6V+l2BqgD mcGUlSvMT/PQLcoByrDoqivtxYweHXoFqthJfw== Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, David Vrabel , Arnd Bergmann , linux-kbuild@vger.kernel.org Subject: [Xen-devel] [PATCH v2] Kbuild: use -fshort-wchar globally X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP A previous patch added the --no-wchar-size-warning to the Makefile to avoid this harmless warning: arm-linux-gnueabi-ld: warning: drivers/xen/efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail Changing kbuild to use thin archives instead of recursive linking unfortunately brings the same warning back during the final link. The kernel does not use wchar_t string literals at this point, and xen does not use wchar_t at all (only efi_char16_t), so the flag has no effect, but as pointed out by Jan Beulich, adding a wchar_t string literal would be bad here. Since wchar_t is always defined as u16, independent of the toolchain default, always passing -fshort-wchar is correct and lets us remove the Xen specific hack along with fixing the warning. Signed-off-by: Arnd Bergmann Fixes: 971a69db7dc0 ("Xen: don't warn about 2-byte wchar_t in efi") Acked-by: David Vrabel Link: https://patchwork.kernel.org/patch/9275217/ --- I submitted an earlier patch in August 2016, simply removing the flag in xen, but there seems to be no harm in enabling it globally --- Makefile | 2 +- drivers/xen/Makefile | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f1533423094f..0fe63a47fd52 100644 --- a/Makefile +++ b/Makefile @@ -396,7 +396,7 @@ LINUXINCLUDE := \ KBUILD_CPPFLAGS := -D__KERNEL__ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ + -fno-strict-aliasing -fno-common -fshort-wchar \ -Werror-implicit-function-declaration \ -Wno-format-security \ -std=gnu89 $(call cc-option,-fno-PIE) diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile index 8feab810aed9..7f188b8d0c67 100644 --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@ -7,9 +7,6 @@ obj-y += xenbus/ nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_features.o := $(nostackp) -CFLAGS_efi.o += -fshort-wchar -LDFLAGS += $(call ld-option, --no-wchar-size-warning) - dom0-$(CONFIG_ARM64) += arm-device.o dom0-$(CONFIG_PCI) += pci.o dom0-$(CONFIG_USB_SUPPORT) += dbgp.o