Bud-Id: https://bugs.gentoo.org/show_bug.cgi?id=598054
Signed-off-by: Andreas Cadhalpun <[email protected]>
---
configure | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 481f692..14a20ed 100755
--- a/configure
+++ b/configure
@@ -1147,8 +1147,14 @@ check_func_headers(){
for hdr in $headers; do
print_include $hdr
done
+ # 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"
for func in $funcs; do
- echo "long check_$func(void) { return (long) $func; }"
+ echo "USED long check_$func(void) { return (long) $func; }"
done
echo "int main(void) { return 0; }"
} | check_ld "cc" "$@" && enable $funcs && enable_safe $headers
--
2.9.3
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel