From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932564AbeBUJo3 (ORCPT ); Wed, 21 Feb 2018 04:44:29 -0500 Received: from mail-qk0-f178.google.com ([209.85.220.178]:45405 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752983AbeBUJo2 (ORCPT ); Wed, 21 Feb 2018 04:44:28 -0500 X-Google-Smtp-Source: AH8x2246NpuDUgcXeYlbKQKsA6DykzJnQDRj4Yv7Z5gNQ8lzH558R0Eh1m69obUfyM6L+Lb++Muf+MWIbNHTtSL69PY= MIME-Version: 1.0 In-Reply-To: References: <20180220215954.4092811-1-arnd@arndb.de> <20180220215954.4092811-4-arnd@arndb.de> From: Arnd Bergmann Date: Wed, 21 Feb 2018 10:44:27 +0100 X-Google-Sender-Auth: Qoc1UTWIWgpKZF84vCoRr-fI33c Message-ID: Subject: Re: [PATCH 3/7] [HACK] pass endianess flag to LTO linker To: Nicolas Pitre Cc: Andi Kleen , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 21, 2018 at 4:15 AM, Nicolas Pitre wrote: > On Tue, 20 Feb 2018, Arnd Bergmann wrote: > >> 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. > > Didn't the patch below fix it for you already? I think the problem here is that -mbig-endian is part of KBUILD_CPPFLAGS, not KBUILD_CFLAGS. We add the latter to the gcc-ld command line, but not the former. Arnd