From patchwork Mon Aug 8 11:12:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 73431 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp3157851qga; Mon, 8 Aug 2016 04:12:29 -0700 (PDT) X-Received: by 10.66.54.35 with SMTP id g3mr161245142pap.30.1470654749755; Mon, 08 Aug 2016 04:12:29 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id x87si36572070pfa.79.2016.08.08.04.12.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2016 04:12:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2D1CD1A1E1B; Mon, 8 Aug 2016 04:12:29 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 C95901A1E18 for ; Mon, 8 Aug 2016 04:12:27 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id q128so112218624wma.1 for ; Mon, 08 Aug 2016 04:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=pi9LE6H5R3AUfsaVN100WTXcKEC1WIUgYyUI5PatqHc=; b=CaS7M08ipGHvJOYjV0W/wm5U3IqjAp8uzQPQTpBGVoLv6+Gk5BcjWIa4adjwP3cBNr N813hThZ+emSin3siVY7HaLqEh5YV5oK1sUh1QSbZTHpTkFRFY8svxLufJepRh1U8Wxk 6rffPJzEQNbdOdx1H9X9nJKbDmmqX7439Yq8w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pi9LE6H5R3AUfsaVN100WTXcKEC1WIUgYyUI5PatqHc=; b=SAMQT9s07XSmG8/bo5jnJnx+UWgC2vb/jerZPUkh9zV9Qza8qieQVLWFm1jNr1IU6O YvBbIwvdJw8BPJnkz21n+Rr5TowXii9sMi2JaZ4Ka4jXJmgPQD4A48in4ir1MRLsy3iJ AEhs8ETcGEbsYIT+adpxlD+R4i08GgDU3siQiyl6CW/U5KkMIwbGhp/kNVVhxogdPFVk fHRUt16tGZ9MwAnIppAhfMPEZ8csp31hppUZoCq4eZQ8zyjZSNBsJ79O3zL3YakFzJ5q ZUwubEPho+G2AnRtlrXLA9Bs8MHu2IWl0tLOsrV7GVKG+kgRG/AC2sHFXKbM98SpCr4c HAbg== X-Gm-Message-State: AEkoouvmw733aQBsSHpO+7hojBfbSP6Grgym66v+yVw+gJ1SLY4ihr+SDhCVzDrw3OyUbMPS X-Received: by 10.194.23.39 with SMTP id j7mr84311631wjf.4.1470654746186; Mon, 08 Aug 2016 04:12:26 -0700 (PDT) Received: from localhost.localdomain (222.red-88-1-55.dynamicip.rima-tde.net. [88.1.55.222]) by smtp.gmail.com with ESMTPSA id v203sm23149488wmv.2.2016.08.08.04.12.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 04:12:25 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, edk2-lists@mc2research.org, jaben.carsey@intel.com Date: Mon, 8 Aug 2016 13:12:20 +0200 Message-Id: <1470654741-24203-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [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: , Cc: sigmaepsilon92@gmail.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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