StdLib/LibC/Softfloat/Softfloat.inf and StdLib/LibC/LibC.inf need this
flags too.

Thanks
Michael

On Thu, Aug 4, 2016 at 4:42 PM, Ard Biesheuvel <[email protected]>
wrote:

> Building ArmSoftFloatLib with LTO results in errors like
>
>   .../bin/ld: softfloat.obj: plugin needed to handle lto object
>   .../bin/ld: __aeabi_dcmpge.obj: plugin needed to handle lto object
>   .../bin/ld: __aeabi_dcmplt.obj: plugin needed to handle lto object
>   .../bin/ld: internal error ../../ld/ldlang.c 6299
>
> This library is only linked by OpensslLib at the moment, and only
> marginally used at runtime, so just disable LTO for it.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <[email protected]>
> ---
>  ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
> b/ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
> index f090b3f288ce..3c76381b25dc 100644
> --- a/ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
> +++ b/ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
> @@ -48,7 +48,7 @@ [Packages]
>    MdePkg/MdePkg.dec
>
>  [BuildOptions]
> -  GCC:*_*_*_CC_FLAGS = -DSOFTFLOAT_FOR_GCC -Wno-enum-compare
> +  GCC:*_*_*_CC_FLAGS = -DSOFTFLOAT_FOR_GCC -Wno-enum-compare -fno-lto
>    *_GCC46_*_CC_FLAGS = -fno-tree-vrp
>    *_GCC47_*_CC_FLAGS = -fno-tree-vrp
>    RVCT:*_*_*_CC_FLAGS = -DSOFTFLOAT_FOR_GCC
> --
> 2.7.4
>
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
>
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to