Hi Rainer,
On 18 Nov 2011, at 14:49, Rainer Orth wrote:
I hope it also works for Rainer .... and that I've got the right
designator
for the Tru64 cross-case.
I guess it does, given that the testcase is based on my own one :-)
so long as my wrapping it in m4 hasn't broken the intent .. ;-)
* Move the macro definition to toplevel config/weakref.m4 (or
weakdef.m4,
I think we're checking the ref side here.
I'm not sure about the terminology), omitting the libitm
reference. libgfortran already uses something similar (although
partially hardcoded), we should share the code (not now, but in the
future).
In that case, perhaps we should say that this is specifically checking
for a weakref with elf-like behavior.
Otherwise, if the code is re-used, someone might risk concluding that
(for example) Darwin had no weakref at all (which is not the case, it
just doesn't behave in the same manner as the ELF one).
so perhaps HAVE_ELF_STYLE_WEAKREF
* Omit the _working_ everywhere, we don't care for non-working
variants.
good point.
Index: libitm/acinclude.m4
===================================================================
--- libitm/acinclude.m4 (revision 181470)
+++ libitm/acinclude.m4 (working copy)
@@ -109,6 +109,29 @@ i[[34567]]86 | x86_64)
;;
esac])
+dnl Check whether weak refs actually work.
+AC_DEFUN([LIBITM_CHECK_WORKING_WEAKREF], [
+ AC_CACHE_CHECK([whether weak refs actually work],
+ libitm_cv_have_working_weakref, [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+extern void fNotToBeFoundInAnyStandardLib(void)
__attribute__((weak));
+int main ()
+{
+ if (fNotToBeFoundInAnyStandardLib)
+ return 0;
+ else
+ return 1;
+}
Just a nit: shorten function name to keep it readable.
OK, I suppose that there's no guarantee (however long the name) that a
given symbol can't appear in a std lib..
thanks for reviewing
Iain