This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re:[libbacktrace] Use getexecname() on Solaris
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Date: Fri, 5 Oct 2012 13:15:07 +0200
- Subject: Re:[libbacktrace] Use getexecname() on Solaris
Hello!
> With the strnlen-related Go failures now gone on Solaris, another issue
> crept up: several tests were failing like this:
>
> throw: /proc/self/exe
>
> goroutine 4 [running]:
> panic during panic
> FAIL: log
>
> This is due to the hardcoded use of /proc/self/exe in libbacktrace,
> which doesn't exist on Solaris, and probably is also missing on other
> non-Linux OSes. Solaris (since 2.6, it seems) provides getexecname()
> instead, which this patch uses.
+# Check for getexecname function.
+if test -n "${with_target_subdir}"; then
+ case "${host}" in
+ *-*-solaris2*) have_getexecname=yes ;;
+ *) have_getexecname=no ;;
+ esac
+else
+ AC_CHECK_FUNC(getexecname, [have_getexecname=yes], [have_getexename=no])
There is a typo in the above line, s/have_getexename/have_getexecname
Uros.