[FFmpeg-devel] [PATCH] configure: make sure LTO does not optimize out the test functions

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Oct 26 00:34:24 EEST 2016


2016-10-25 19:19 GMT+02:00 Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>:

> +        # LTO could optimize out the test functions without this
> +        echo "#if defined(__GNUC__) && __GNUC__ >= 4"
> +        echo "  #define USED __attribute__((used))"
> +        echo "#else"
> +        echo "  #define USED"
> +        echo "#endif"

Why is the ugly #if - #else - #endif necessary?

Please mention ticket #5909 if it is related.

Carl Eugen


More information about the ffmpeg-devel mailing list