From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 166791A1E18 for ; Mon, 8 Aug 2016 04:24:29 -0700 (PDT) Received: by mail-wm0-x241.google.com with SMTP id o80so14827246wme.0 for ; Mon, 08 Aug 2016 04:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Z/Y6zcRKAd9PYIGfJpJDUSrVIMz6tqKCKJFX4Cmx73E=; b=pp4fVVZiCos3Bms508mPf8aFGwCT52KznBSpPlyRPXVPt7I2m4sV+DDRyDIAUYpeEH PMwTXqE/UYy3/gyeOMhF/pPhiVPGxN+eCtv9Nh6aQkrc75jCpfPjhF0WJFoE3kE0AnYg Pc3qUYe+XV1spu2mVyxB+fqKH38jD9+MrfwO9GYWuTwjerJZvR4PNdFXxz8gJt/guc/b XtJFXGbm/eXdUn15/SoC5Ica/zlJX+pXepBZPePnqgBpHiuYmGwtfQ6W+dO4bh9d3hmS 6w7/dkTWy1qrc20h4bN3jmAaCSAiuNybTBoWtsxrvLy+sptZW+reD1uXdxm/PWZw3kfc RH+Q== 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=Z/Y6zcRKAd9PYIGfJpJDUSrVIMz6tqKCKJFX4Cmx73E=; b=M6LSheCC0c4A37drvjthbDWoPn/6u+ka/MWtog9uI+OksQmqS5aiG9oAGOMB+Y7Nrh yxMDMbRpUgtaROu+bmviQwKvN2rDeka5cF//ALDoV1IrJt3du3Lwj6hz6IMCMwmEp1gr cNLmVmsEjZDGU15b1BlyxBmCOiOtJt6AJ2DPNuxqF0Qb1IOzx9eSvan+2CeP3/O+4SWL 0rG4mu5Hoj2J14HYknRvzmKxfs2lVWyWeuAhf4bnMlU8hN7POjAFVaRROEGN+akf0Xwy e5t7L+KFRCgEQ9w1GevRdaTypC0PRcvBdvcrFZ4yZtjDqw2/jF99HBu6qmedqgs+tChb AIJQ== X-Gm-Message-State: AEkoouuXx64Rel4/Mur3+cYALXQb0IFC+EyxskXkQar7Sy6a+ESJN9Yt/KLymp/WiAYqjYsPD29oyO/RLAQQBw== X-Received: by 10.194.105.201 with SMTP id go9mr25184191wjb.177.1470655467732; Mon, 08 Aug 2016 04:24:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.238.198 with HTTP; Mon, 8 Aug 2016 04:24:27 -0700 (PDT) In-Reply-To: <1470654741-24203-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470654741-24203-1-git-send-email-ard.biesheuvel@linaro.org> From: Michael Zimmermann Date: Mon, 8 Aug 2016 13:24:27 +0200 Message-ID: To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , Daryl McDaniel , "Jaben Carsey (Intel)" , Leif Lindholm X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH 1/2] StdLib/LibC: avoid LTO code for compiler intrinsics 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: Mon, 08 Aug 2016 11:24:29 -0000 Content-Type: text/plain; charset=UTF-8 Reviewed-by: Michael Zimmermann On Mon, Aug 8, 2016 at 1:12 PM, Ard Biesheuvel wrote: > The softfloat routines and some other routines supplied by LibC > will satisfy references to compiler intrinsics that are emitted > by the compiler backend, which under LTO means that the link-time > code generation may emit references to symbols that have been > optimized away already. > > Work around this by building the ARM and AARCH64 versions of LibC > and the softfloat library without LTO. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > StdLib/LibC/LibC.inf | 1 + > StdLib/LibC/Softfloat/Softfloat.inf | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/StdLib/LibC/LibC.inf b/StdLib/LibC/LibC.inf > index f13630648555..6039bb81c7dd 100644 > --- a/StdLib/LibC/LibC.inf > +++ b/StdLib/LibC/LibC.inf > @@ -120,3 +120,4 @@ [LibraryClasses] > # > [BuildOptions] > MSFT:*_*_IA32_CC_FLAGS = /GL- > + GCC:*_*_ARM_CC_FLAGS = -fno-lto > diff --git a/StdLib/LibC/Softfloat/Softfloat.inf b/StdLib/LibC/Softfloat/ > Softfloat.inf > index 99763bcb57ba..460406c38fa4 100644 > --- a/StdLib/LibC/Softfloat/Softfloat.inf > +++ b/StdLib/LibC/Softfloat/Softfloat.inf > @@ -71,4 +71,4 @@ [Packages] > # Nasty things could happen if you do. > > [BuildOptions] > - GCC:*_*_*_CC_FLAGS = -DSOFTFLOAT_FOR_GCC -Wno-enum-compare > -fno-tree-vrp > + GCC:*_*_*_CC_FLAGS = -DSOFTFLOAT_FOR_GCC -Wno-enum-compare > -fno-tree-vrp -fno-lto > -- > 2.7.4 > >