From patchwork Wed Feb 21 03:15:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 10231205 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 0A648602A7 for ; Wed, 21 Feb 2018 03:15:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF6D428907 for ; Wed, 21 Feb 2018 03:15:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC25728909; Wed, 21 Feb 2018 03:15:52 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 64BB928907 for ; Wed, 21 Feb 2018 03:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lqQR5XBpkWZP/ZjqolN3CPATI5UKSMZbJ0XW13+j+4Q=; b=QdadogTV0JPRJi 49eVJjgwgWGLiju5mMek8466EzaaSn3eXyauactjhaV0UAW+IQP7pjA7irQLoe3fs/osbuWOyTKcL 4sz9GJfna3GeimD1eJ1/79Lfwl+8BBkV6ddo3MfMw1Se0b834ClSZZrDhVN9XgeC8j/Hax+DejJX/ /a0URjeAY6nOeW/PoYv7wbD/tWp59oUZEsv9Iki51y18Rp6o2AVldczfBvhoKRR0+fG57z0fNPZ+9 /+qw0BjrMb6bYfVABVLmzCCxGJx1iWu+GuUcHWWMtYRtpjJoHLFpBb/6xc1BmF+8UfInhCf6KgEx4 78LI3+tCMNfqi18DOcsg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eoKsf-0001Rg-Vr; Wed, 21 Feb 2018 03:15:41 +0000 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eoKsb-0001Q3-Jr for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2018 03:15:39 +0000 Received: by mail-qk0-x243.google.com with SMTP id f25so324493qkm.0 for ; Tue, 20 Feb 2018 19:15:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=sy2MitbjeR8u2JPK1aowxjz0LfWcwB6dBpNNFx8UrXA=; b=VWPq5ZBY4O0KUl3kmWMQ8r3Rpv11IW1PVELDDSvTqQwz1SXATRgg/nkwch4w3Yhk5s T3o+giIPK4ipwC47PsD9frVNhz0JZOZ8Aq1oKfz8WhIB4u/IcBoQw2Az7qKR9XXF7l4R A6kAJB/bfjAUEKxlTBXvC38WgfQs7G8I1npOg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=sy2MitbjeR8u2JPK1aowxjz0LfWcwB6dBpNNFx8UrXA=; b=FBifR3Ih2QnwOTlPcYva2HA8MVQeARPs5TkFc2xCER98YDk0dNLmJTqvwoxGy744LE cxG+O+YOSpoFRJ4+KjTC6vR+AA77luue5jTpeiRGbNotaSModJFtzFxKbRVHvxaRATuP Kxojpe6hOF8r5AKQx/sru/JsxbTG9cESgJun5YVFN3GoaypWgBn+y4UoNl8Bo00PgBaG t0H9gG+eTb3mxZr2iI1xOsMqRFx0I5I1bAP0paeQyWsrY6mbXONDjZVjZc8fY4MXMUK3 6cYvT0UQXfR0SltDDd5z+sR2c2Vq2MJY94PI2JMkEH5rNOwnMeedE5u5Ep1Pf2ZqYDi9 px/w== X-Gm-Message-State: APf1xPDyuvllWnT4j9GpclTcylozaaAtLIHDqwxs1mhs8RsxmrIVcA3X WpKT7PmpGiGrK+ZZRI/b3T7PeRtoESE= X-Google-Smtp-Source: AG47ELtQ9xg4faZPx02CL8fUbqoY3bncsQBBECJ8OxACmVmt/gEHDvblOdvQZZk9ZDwigJ9dQvXTZg== X-Received: by 10.55.195.79 with SMTP id a76mr2948532qkj.217.1519182924739; Tue, 20 Feb 2018 19:15:24 -0800 (PST) Received: from xanadu.home (modemcable228.104-82-70.mc.videotron.ca. [70.82.104.228]) by smtp.gmail.com with ESMTPSA id i186sm13994411qke.86.2018.02.20.19.15.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2018 19:15:24 -0800 (PST) Date: Tue, 20 Feb 2018 22:15:23 -0500 (EST) From: Nicolas Pitre To: Arnd Bergmann Subject: Re: [PATCH 3/7] [HACK] pass endianess flag to LTO linker In-Reply-To: <20180220215954.4092811-4-arnd@arndb.de> Message-ID: References: <20180220215954.4092811-1-arnd@arndb.de> <20180220215954.4092811-4-arnd@arndb.de> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180220_191537_666163_3B0052B3 X-CRM114-Status: GOOD ( 16.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andi Kleen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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? ----- >8 Date: Fri, 1 Sep 2017 18:37:52 -0400 Subject: [PATCH] scripts/gcc-ld: LTO on ARM needs arch specific gcc flags Otherwise the final link where code generation happens produces code for the wrong ISA when the default CPU configured into gcc is not the one we need. Also display the actual command when invoked with "make V=1". Signed-off-by: Nicolas Pitre diff --git a/scripts/gcc-ld b/scripts/gcc-ld index d95dd0be38..fa53be2a34 100755 --- a/scripts/gcc-ld +++ b/scripts/gcc-ld @@ -27,4 +27,10 @@ while [ "$1" != "" ] ; do shift done -exec $CC $ARGS +case "${KBUILD_VERBOSE}" in +*1*) + set -x + ;; +esac + +exec $CC $KBUILD_CFLAGS $ARGS