From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D0C161A1E20 for ; Sun, 7 Aug 2016 03:29:31 -0700 (PDT) Received: by mail-io0-x236.google.com with SMTP id 38so335581327iol.0 for ; Sun, 07 Aug 2016 03:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nsJ14jwbXVfnDlUclijgThxj+WVgJSfm5Z+3UhEfq04=; b=gANSB/DaePBiL9esqlPjbilVML+3rVGjIop2Tw/iA5TW7UncXAGTY0nm0jvPGkIDcu sQFX6ln3pWYxeeUpRTA+mxuXIFy1hQziajxRPwNuDp4DPpsW6cWNUMOCsNTjb1ZzsJFW 6hE9bcojehLxY1rH9fr6bEpxPY+IkXdI0qkU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nsJ14jwbXVfnDlUclijgThxj+WVgJSfm5Z+3UhEfq04=; b=RuDXHXbvnQMHZQOiWiy5x6gn+oXFRi9pV6vSEo0b2RxxJAOj0HQB9oWZ/zgPRNYZPi D8pnuT2BbsNad4C2IlM2aiKbKujBbw6RLmrLWH6URFYePIDZNVeperJGppgIFrKZaCfW 7+tSuMwxKvRHde1UUxUc/R8Czgl0lmfUwAq+kXOrg+JtgYvDRb1d6XRpuNSYqLMsqYCf +x1OoT7Rqkn1F2GgGo2Ytb1G3ZJK079XxNB3CH5iyUOl3RvD3ysirNnLb2plfpwTncLK pOoZwRyc9UFjPLJt8+jbv0JJxglN+KPu0EbepNJH469WAuT8u6rTYURO9LkE1jh7A/Sn VpPA== X-Gm-Message-State: AEkoousrbrBGOU6fbqWs/4oXTPYx5kHXCl9k/ZeLfxzeFs6AY0b3+MD13HUU97VlT6sZiUmV0UH0CDvH/acnBe30 X-Received: by 10.107.40.133 with SMTP id o127mr85137938ioo.183.1470565771013; Sun, 07 Aug 2016 03:29:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Sun, 7 Aug 2016 03:29:30 -0700 (PDT) In-Reply-To: References: <1470321767-26921-1-git-send-email-ard.biesheuvel@linaro.org> <1470321767-26921-2-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Sun, 7 Aug 2016 12:29:30 +0200 Message-ID: To: Michael Zimmermann Cc: Yonghong Zhu , "Gao, Liming" , "edk2-devel@lists.01.org" , Leif Lindholm , "Cohen, Eugene" Subject: Re: [PATCH 1/3] ArmPkg/ArmSoftFloatLib: disable LTO build for GCC X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2016 10:29:32 -0000 Content-Type: text/plain; charset=UTF-8 On 7 August 2016 at 11:28, Michael Zimmermann wrote: > Hi, > > I researched a little bit on this topic and it seems that you have to add > fuse-linker-plugin to the build options to enable lto plugins. > I think that is no longer needed. > I did that and unfortunately it had no effect. After running gcc through > strace I could see that liblto_plugin.so does get loaded from the > cross-toolchains libexec directory though. > > Does that mean that the toolchain I use (GCC5 from releases.linaro.org and > GCC6 from git.linaro.org) generates lto objects which it can't process with > the shipped plugin? > The LTO works fine except for these particular objects. The reason is that the compiler backend generates the function calls, so they are not visible to the LTO routines. For this exact reason, I added liblto-arm.a and liblto-aarch64.a to the normal GCC5 builds > btw, if I compile using my hosts native GCC(x64) but for IA32 I get lto > errors even for MdePkg. It looks like the fno-lto option is a very bad > workaround and can break any time using specific configurations. > It shouldn't be. In a normal environment (i.e., building glibc apps), things like libgcc and anything that is implemented in assembler is included in the build as non-LTO objects. The problems specific to ARM and AARCH64 are the intrinsics, due to the issue mentioned above. Perhaps we have some of those for IA32 as well? Which entry points does the build complain about? -- Ard.