[vlc-devel] [PATCH] [RFC] Configure: enable LTO if present

Rémi Denis-Courmont remi at remlab.net
Mon Aug 7 21:14:19 CEST 2017


Le maanantaina 31. heinäkuuta 2017, 23.41.50 EEST Jean-Baptiste Kempf a 
écrit :
> ---
>  configure.ac | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index e303715514..fe7e273ea0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1049,6 +1049,12 @@ AS_IF([test "${enable_optimizations}" != "no"], [
>    RDC_PROG_CXX_FFLAGS([no-math-errno unsafe-math-optimizations
> no-rounding-math no-signaling-nans cx-limited-range]) AC_LANG_POP
> 
> +  dnl Check for LTO
> +  RDC_PROG_CC_FFLAGS([lto])
> +  AC_LANG_PUSH(C++)
> +  RDC_PROG_CXX_FFLAGS([lto])
> +  AC_LANG_POP

AFAIK, the compiler flag is not enough, even leaving aside C++ ODR problems 
and other hypothetical latent bugs. The build system must also use the 
compiler wrappers for ar, nm, ranlib and the linker. At least, that´s what the 
documentation says, and that´s what my past experience confirmed.

Considering how dead the GNU/autoconf project is, good REDACTED luck with 
support for that :-(

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list