]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StdLib/LibC: avoid LTO code for compiler intrinsics
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 8 Aug 2016 10:46:50 +0000 (12:46 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 9 Aug 2016 08:08:35 +0000 (10:08 +0200)
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 <ard.biesheuvel@linaro.org>
Reviewed-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
StdLib/LibC/LibC.inf
StdLib/LibC/Softfloat/Softfloat.inf

index f13630648555f22eba302ae6884288e62b1c8c6c..6039bb81c7dd95c1539a5ecc5e7ad825b7d338c9 100644 (file)
 #\r
 [BuildOptions]\r
   MSFT:*_*_IA32_CC_FLAGS = /GL-\r
+  GCC:*_*_ARM_CC_FLAGS = -fno-lto\r
index 99763bcb57ba09988b59600f61227f1ca98e02a5..460406c38fa424886f520a251a6ae0ad0f690b78 100644 (file)
@@ -71,4 +71,4 @@
 # Nasty things could happen if you do.\r
 \r
 [BuildOptions]\r
-  GCC:*_*_*_CC_FLAGS  = -DSOFTFLOAT_FOR_GCC -Wno-enum-compare -fno-tree-vrp\r
+  GCC:*_*_*_CC_FLAGS  = -DSOFTFLOAT_FOR_GCC -Wno-enum-compare -fno-tree-vrp -fno-lto\r