StdLib/LibC: avoid LTO code for compiler intrinsics

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>
This commit is contained in:
Ard Biesheuvel 2016-08-08 12:46:50 +02:00
parent 0f73cca02b
commit 78d706e235
2 changed files with 2 additions and 1 deletions

View File

@ -120,3 +120,4 @@
#
[BuildOptions]
MSFT:*_*_IA32_CC_FLAGS = /GL-
GCC:*_*_ARM_CC_FLAGS = -fno-lto

View File

@ -71,4 +71,4 @@
# 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