From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751337AbdJDSlj (ORCPT ); Wed, 4 Oct 2017 14:41:39 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:35169 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750787AbdJDSli (ORCPT ); Wed, 4 Oct 2017 14:41:38 -0400 X-Google-Smtp-Source: AOwi7QCzVhSAVNaPpz9McsOqUNbK/5PVxM99s+oQxWBljF1etOsBDwsvHM4y8eqF17dKnUIotGCyPA== Date: Wed, 4 Oct 2017 11:41:35 -0700 From: Guenter Roeck To: Catalin Marinas Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Douglas Anderson Subject: Re: [PATCH] arm64: Enforce endianness build flags for LD and AS Message-ID: <20171004184135.GA12348@roeck-us.net> References: <1507064302-3972-1-git-send-email-linux@roeck-us.net> <20171004183108.GA10699@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171004183108.GA10699@roeck-us.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 04, 2017 at 11:31:08AM -0700, Guenter Roeck wrote: > On Tue, Oct 03, 2017 at 01:58:22PM -0700, Guenter Roeck wrote: > > If LD or AS is specified on the command line using "make LD=", > > the endianness flag will not be added. Depending on the toolchain used, > > this can result in endianness mismatch errors, such as > > > > aarch64-cros-linux-gnu/binutils-bin/2.27.0/ld.bfd.real: > > arch/arm64/crypto/.tmp_aes-ce-cipher.o: > > compiled for a big endian system and target is little endian > > > > The problem was observed when using the Chrome OS build system (which sets > > LD on the command line) for an arm64:allmodconfig build. > > > > Use the override flag for both LD and AS to ensure that the endianness > > flag is always set. > > > > Cc: Douglas Anderson > > Signed-off-by: Guenter Roeck > > Please ignore this patch for now; it doesn't help with my problem. Not yet > sure what happens, but it appears that "-EB" doesn't make it into the LD > variable used by cmd_make_builtin in scripts/Makefile.build. I'll have > to figure out what is going on. > Yes, the problem is that the gcc in the Chrome OS toolchain doesn't tell the linker which endianness to use (ie it doesn't translate -mbig-endian into a linker flag). Please forget this patch, it doesn't solve anything. Sorry for the noise. Guenter