SWI-Prolog/swipl-devel
cmake/GCCBuiltins.cmake
:24
check_c_source_runs(
"extern int __attribute__((weak)) foo(); int main() { return &foo == 0 ? 0 : 1; }"
HAVE_WEAK_ATTRIBUTE)
check_c_source_runs(
"extern int __attribute__((weak)) foo(); int main() { return &foo == 0 ? 0 : 1; }"
HAVE_WEAK_ATTRIBUTE)
check_c_source_compiles("
#define WEAK __attribute__((weak))
WEAK int sum(int a, int b)
{
return a + b;
}
int main(void)
{
int i = sum(2, 2);
(void)i;
return 0;
}" HAVE_WEAK_ATTRIBUTE)