From patchwork Tue Feb 20 21:59:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128978 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5105198ljc; Tue, 20 Feb 2018 14:01:16 -0800 (PST) X-Google-Smtp-Source: AH8x227rf/5u9AxXD81RUzpU3v7R1foxv7QQsRTFxvyKAF07zl8cOzNPLYBMej+idK0ZS4rZHEzw X-Received: by 2002:a17:902:6686:: with SMTP id e6-v6mr1000675plk.334.1519164075862; Tue, 20 Feb 2018 14:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164075; cv=none; d=google.com; s=arc-20160816; b=yluHUZkaQrVMC7tLwPgY+lPwa+rHNYxEtObNNyM7hYGPvuJl8ZuSYUx8Ypb4obC6cr pGhRhisoXl68xO/xBwq1vZ4U+1qR+pa9gbAFmHU3QJGyUYtbJZrJL2QCgLOaF8//ypit IHx7aT4fvk/mKSvTaUw5LEyObaCAXYmachLCRcNj7OvIy4Vxprvlzya+EkDesbO7ZA96 hdWoNimDpKcCT96z69yIwdA/MStwL16g5IfmADxp7vrUVOjt6r8LttCvAHOj/Dciv8oZ UnWEngj9jkR6LC1s5QInsFasaSwbZBYBUUvW8Z0mYxuNeZdb0tVFJmjTEn6HKMaBi6+c wP/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=RynUHdX61rWonwDSezo6RuLC2tUDW+s+1BdhtxiEHKs=; b=tgpBEkPX1OABDbxvvBlow0IjTdIfTFZez6PoUzDTp+TQL1pKmu7v1leutb4nsRIYeS hCaxe1XCq4zb2k4HH6M+QVOplQ6ibB96OFNjt7VvvsW4+mBQ5OM+k0tyHweznF6PEzGk rdvmE11H1mSwZ4/t95qLymq/7BzmtoUv+RqKeAuwdfsnMkPS3wPRMmVQ4NGwBsRrPsY2 DzwE7+/ln+VVjbc1N29Y3vonuIHFxNhzuzL/nY3O1TwLRdqvxfogMgpfqW+FJkZt5hT7 l0ZTEd/PHbrdkLglKjEgj9csbZFSaMkE0bps4y7l6B3sBFNchNWQLy1dWGgBNShmO1Xn 6ivQ== ARC-Authentication-Results: i=1; mx.google.com; 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 37-v6si6108156plq.618.2018.02.20.14.01.15; Tue, 20 Feb 2018 14:01:15 -0800 (PST) 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; 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 S1751475AbeBTWBM (ORCPT + 28 others); Tue, 20 Feb 2018 17:01:12 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:57717 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbeBTWAV (ORCPT ); Tue, 20 Feb 2018 17:00:21 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MQODc-1fBSB02hS8-00TmlV; Tue, 20 Feb 2018 22:59:58 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 3/7] [HACK] pass endianess flag to LTO linker Date: Tue, 20 Feb 2018 22:59:50 +0100 Message-Id: <20180220215954.4092811-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:2jo0KNnjQFA0vHEhz+QmUaepQ1mlmpluQzE/EAn1H7/QvIH7Jzi ViH2im1R9pEKhC2Dv95f9PRRrvj3sqK+j/y3qgmjv7ITwBfRbOMBajWau7wswsoIgSMc1hJ U1m9vV8Wbni0bsezmL0YrzR1l08syn1u5NKxvFyDT2kDeB2RsCK2SMP6D/NabQkZv7YLqLA u2/m5bL6bHm61GCjgocig== X-UI-Out-Filterresults: notjunk:1; V01:K0:+KkU0vohw3Q=:hJSmopaCFGYevUdnoWXnpD jig8SDTv5gJF+jvcuMZDB3t+nwZC0jltgmNZApp6m7nfq1n6s590WtuYnSeYlEanQVDFWkjh9 slYt7I4MU+ROQIhqsrocOPcJZ2p4p9RCtqBe9csiiMhr/zKEsFcscSDn2IiNrh2ziV4gOkjpW 884+wwMU3sVb5u85xOGvlj3TYiwR76wXQIWEJxL4Rnm3b4z4NglKv2eVBowy2Il+C+K2GHETA Lhuiwod9AL/79UBkPLGOryDKYeVzpGnehzdoV4+YKJUPY3n9DeFSLHNEEJ45npBvCBpxw9BaS wBlPBgSjLZ/3j5PF2iSaRltTgUu2TIww2N7fQPhvthZ272u0b9IjZJpe612Ee+LSjYer69oJk 8vp+DNZ9GyeBOOMifEy1QxXK8RMD/WsHDyp+7mlXwlXccVFKNznrwR5ZWZ0AQDoehlEgwCMlG F3fLzDkfqla0Ovy2Upot7lNafm7oL0MAgSlxTJTFmLoNIjjhdYA2e6+kpSsBLel2sXIhVIi0w aF/5mETwzjKEDyBWisJ4DuhDjIJV3AK0/6PXyJozGfRsLwgJ83IKd7xxTXxeKpN8FeEQ8DRz7 nmESGGt+4HBiehcGkH34KzaDiLKJ3iNM41K6YlUz7LODZx+Kv5/5dlniVk+x1y/KnT5TTb8Pn 1G4UfrVaMS/dIF2KJ3czF9BQ2+A4+kGa2QmBmc/ARyuEgkkwd0L3BxDeY9JfUCD6QBlsQADWa 6WCtSv/ny9DRw5Ytzf1w9nnB7td6hS9NViB7Xw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need some way to pass -mbig-endian to the linker during the LTO link stage, otherwise we get a waning like arm-linux-gnueabi/bin/ld: arch/arm/lib/clearbit.o: compiled for a big endian system and target is little endian for each file we link in. There is probably a better method of passing that flag, I'm just adding it to a different hack that I added earlier for x86 LTO here. Signed-off-by: Arnd Bergmann --- arch/arm/Makefile | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 Signed-off-by: Nicolas Pitre diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 33b7eb4502aa..f39c2e2d55c0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -49,11 +49,13 @@ endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) KBUILD_CPPFLAGS += -mbig-endian +KBUILD_BIARCHFLAGS += -mbig-endian CHECKFLAGS += -D__ARMEB__ AS += -EB LD += -EB else KBUILD_CPPFLAGS += -mlittle-endian +KBUILD_BIARCHFLAGS += -mlittle-endian CHECKFLAGS += -D__ARMEL__ AS += -EL LD += -EL