Commits

Johannes Pfau committed 606bed7

Update configure for bionic __get_stack_base

Comments (0)

Files changed (2)

d/phobos2/acinclude.m4

        d_gc_stack=GC_Use_Stack_GLibC],
       [AC_MSG_RESULT(no)])
 fi
+if test -z "$d_gc_stack"; then
+    AC_MSG_CHECKING([for __get_stack_base])
+    AC_TRY_LINK([],[
+	int stack_size;
+	extern void*  __get_stack_base(int  *p_stack_size);
+	return __get_stack_base(&stack_size) == 0;],
+      [AC_MSG_RESULT(yes)
+       d_gc_stack=GC_Use_Stack_Bionic],
+      [AC_MSG_RESULT(no)])
+fi
 dnl if test -z "$d_gc_stack"; then
 dnl    d_gc_stack=GC_Use_Stack_Guess
 dnl    D_GC_MODULES="$D_GC_MODULES gc/gc_guess_stack.o"
     conftest$ac_exeext conftest.$ac_ext
 fi
 if test -z "$d_gc_stack"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_stack_base" >&5
+$as_echo_n "checking for __get_stack_base... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+	int stack_size;
+	extern void*  __get_stack_base(int  *p_stack_size);
+	return __get_stack_base(&stack_size) == 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       d_gc_stack=GC_Use_Stack_Bionic
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+if test -z "$d_gc_stack"; then
     as_fn_error $? "No usable stack origin information" "$LINENO" 5
 fi