Commit 0011344a authored by Antonio J. Pena's avatar Antonio J. Pena Committed by Kenneth Raffenetti
Browse files

Fix weak alias support detection



Since GCC4, it is required that when declaring a function alias,
the target function is defined in the same compilation unit.

See #2002
Signed-off-by: Kenneth Raffenetti's avatarKen Raffenetti <raffenet@mcs.anl.gov>
parent aa1b0343
......@@ -368,7 +368,7 @@ pac_cv_attr_weak_alias,[
PAC_PUSH_FLAG([CFLAGS])
# force an error exit if the weak attribute isn't understood
CFLAGS=-Werror
AC_TRY_COMPILE([int foo(int) __attribute__((weak,alias("__foo")));],[int a;],
AC_TRY_COMPILE([int __foo(int a){return 0;} int foo(int) __attribute__((weak,alias("__foo")));],[int a;],
pac_cv_attr_weak_alias=yes,pac_cv_attr_weak_alias=no)
# Restore original CFLAGS
PAC_POP_FLAG([CFLAGS])])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment