GNOME Bugzilla – Bug 792715
[PATCH] Don't declare functions in AC_TRY_COMPILE
Last modified: 2018-01-22 15:54:42 UTC
Please see the patch. Declaring functions in AC_TRY_COMPILE causes the test for -fvisibility=hidden to fail on Clang. AC_TRY_COMPILE puts code to test in the main function, so instead of using 'int main (void) { return 0; }' as test program, we must use 'return 0' without declaring any function. If we declare main function there, it becomes a nested main function inside the global main function. It is supported by GCC, but not by Clang. This causes problems when checking compiler flags: checking for -fvisibility=hidden compiler flag... no
Created attachment 367138 [details] [review] configure: Don't declare functions in AC_TRY_COMPILE
Looks okay but Ignacio wrote this.
Fine for me
Review of attachment 367138 [details] [review]: Please also push to the stable branch.
Comment on attachment 367138 [details] [review] configure: Don't declare functions in AC_TRY_COMPILE Attachment 367138 [details] pushed as d3abf0c - configure: Don't declare functions in AC_TRY_COMPILE
Attachment 367138 [details] pushed as 87beac1 - configure: Don't declare functions in AC_TRY_COMPILE (gnome-3-26 branch)