Received: by 10.223.185.116 with SMTP id b49csp692631wrg; Wed, 21 Feb 2018 05:30:13 -0800 (PST) X-Google-Smtp-Source: AH8x2267egwiTH4FGnnvEv9F/NrZQyF23fDGfCsxX8azS/8aVji6uLzkuaOP07CW4zbhVIghyynX X-Received: by 2002:a17:902:594c:: with SMTP id e12-v6mr3216062plj.323.1519219812958; Wed, 21 Feb 2018 05:30:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519219812; cv=none; d=google.com; s=arc-20160816; b=Vt7GEpBVkD5uSAW33SkFiBRiM9tXY1jHEMTRYXj20S71sCW84Gbaj7wVc0l1W9vdCA oaDcU+dTUEeQj6VXS4kp2LzDxpSBiyaxLZP2mkh25xwoPTuczsMHGB5Enf7haM5mMH7R /CYI6H7fungMYJ7NkUA29oiaN6jw/fgky+9dqavNWdqkoF1C+bxNRhqANrON9KfWUbCs eitJBOT/u5A6xYWT+Kg1iGBc3dxv7iz+5KkP/pevlgyK+DmVoxivdtdwyD1RDE8ZSGFX aB/uQ8GB+1WWn2Tk/69lnh2HIfdrWbjIAjMDUayreMSq9MfL6zDBLoHikMPr8H8yMdoL xpzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Bf6yK3+tTi6MtcHD6oXgfGUeM+YFuJKYlFHc+QLLhg4=; b=iUzmvyAj2dULaPHZDBCipwAUI2s5HXBjP4WVkOfPexXQjxhCjxLbiX/zA2r4VWwYng ldA3SszKQoeA61W9vCZTMHmu6oXAQfCqJ4Gw06XabN4crnsnwVp73ilCRN1NOGsvMCH1 kc1QCHdPXim5MwcnEVtHjSAC4axIaK262UW6aufXOXifGebVqVZCzf/zEPgobJe1NxH+ SwKinqz64oKmPB/WxJLAgPCkd6zjYDZVgn05NiadPD3aQajSG+k2sZnkP1fGhObFWxAI 1V1SAdlFMMd4kZJqkIzr/dFlyNU++Yer64UB9dL6V8pxCF7cVcZpxXm+C2vpv3WU13ms PXpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qffCdC2P; 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 w1-v6si667584plk.597.2018.02.21.05.29.58; Wed, 21 Feb 2018 05:30:12 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=qffCdC2P; 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 S935356AbeBUNAk (ORCPT + 99 others); Wed, 21 Feb 2018 08:00:40 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:44013 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935329AbeBUNAe (ORCPT ); Wed, 21 Feb 2018 08:00:34 -0500 Received: by mail-qt0-f196.google.com with SMTP id d26so1728748qtk.10 for ; Wed, 21 Feb 2018 05:00:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Bf6yK3+tTi6MtcHD6oXgfGUeM+YFuJKYlFHc+QLLhg4=; b=qffCdC2PoIGb1jIGAbQjig9DZtjUQiCDFdNVqFTGz0/ZsODsuxcaJ64JFrjMXVScxC VmJFACW/apf9h8b2ztJ+ORDxpZ42oBB7YoVQGuCa/q2IJ8wbYDagbWkzNy2ru+vyyDTN R+3I5eiiJCLGk4xy4YTtjf00riJ/IOVdiFMmbOZV3y5PRscD6c0/gFULRAZPfB2jfo5F qZVxugUa62vRicWAy1LLMi3EWwK4RQR7V5RZteJCUwW5FbpWJaQKdDlV6KbKB3ScfUh/ Ty4TYQ37Qbk0L2nQi66c/2JPrsilbFrrMyCi8ENMPRS2mZOj/HltI5LhZ3kfAE/mgCWM U0aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Bf6yK3+tTi6MtcHD6oXgfGUeM+YFuJKYlFHc+QLLhg4=; b=WDrENWwmL4pBWMyMfW/NNQzKm37s510CZaTtCO4L+df5KOYDF8MYpI08SLdEia0uPy 9//qn1v3fszeT5F4V9+XEBPEhIflfwh5hyZ/mIAzgPW0B9r/ihtXMG3+0cOYukgplMvg 60ei+Oko9k4BV27zT3l/sPxd8n1o7K14WiEf5a7JsMOFfLGcYGcC98qCIWKSWylAHaGF 1OTVpd7QdpQ23CmH0vEdUgaGGo+pR5i4D2wSEe1DJCm1kwBLimsXg/o053vXekg2242P JW/fT3K0IkZWNjmyNFrpgNRdVBVBfntQbmWjARzDgHE1TkcUarf3SKyt6ocAUe23P8CE elOA== X-Gm-Message-State: APf1xPD+30QAzkfxaS7T7UuAdzKmNWajSg3G4dy7HBdAoMlHbFpTZn1t US7JnKOAGKLZOpiZP9rmNz4dZGs8CgBSdK/7zuk= X-Received: by 10.200.47.53 with SMTP id j50mr4968289qta.185.1519218033837; Wed, 21 Feb 2018 05:00:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.198.17 with HTTP; Wed, 21 Feb 2018 05:00:33 -0800 (PST) In-Reply-To: References: <20180220215954.4092811-1-arnd@arndb.de> <20180220215954.4092811-4-arnd@arndb.de> From: Arnd Bergmann Date: Wed, 21 Feb 2018 14:00:33 +0100 X-Google-Sender-Auth: W-86kbpHQ2J8hcgGH_d_MCGDMhA Message-ID: Subject: Re: [PATCH 3/7] [HACK] pass endianess flag to LTO linker To: Ard Biesheuvel Cc: Nicolas Pitre , Andi Kleen , Linux Kernel Mailing List , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 21, 2018 at 11:09 AM, Ard Biesheuvel wrote: > On 21 February 2018 at 09:48, Arnd Bergmann wrote: >> On Wed, Feb 21, 2018 at 9:37 AM, Ard Biesheuvel >> wrote: >>> On 20 February 2018 at 21:59, Arnd Bergmann wrote: > >> In some cases we turn off >> some optimization step for a file, we might remove '-pg', or build for >> a particular target architecture. Do we have to turn off -flto for any file >> that requires this for correct behavior? >> > > Excellent question. I think the problem is that the file boundary is > becoming blurred with LTO, and so any option that is absolutely > required to build a single file correctly may need to be applied to > vmlinux as a whole. Whether that is the case for any particular option > depends on which compiler pass(es) is (are) affected by the option, > i.e., whether it is taken into account when creating the intermediate > representation. Newer compilers are able to change both the optimization and warning flags per function using a #pragma or _Pragma() directive or function attributes. There has been some recent discussion about requiring a newer gcc version, so if we do that, we could perhaps replace all the existing CFLAGS overrides with those pragmas. Arnd