From: Joel Brobecker <brobecker@gnat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/5.3] AiX: enable thread support only if libpthdebug is recent enough
Date: Thu, 28 Nov 2002 16:36:00 -0000 [thread overview]
Message-ID: <20021129003645.GO1259@gnat.com> (raw)
In-Reply-To: <3DE65F3B.9060104@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
> >2002-11-27 J. Brobecker <brobecker@gnat.com>
> >
> > * configure.in: Check that the pthdebug library is recent enough
> > before enable thread support on native AiX.
> > * configure: Regenerate.
> >
> > * config/powerpc/aix432.mh (NATDEPFILES): Remove aix-thread.o
> > from the list of object files as it is now appended by configure
> > if thread support is enabled.
> > (NAT_CLIBS): Removed as -lpthdebug is also appended by configure
> > if thread support is enabled.
>
> Looks `safe' - can only hurts AIX - so yes, ok for both 5.3 and mainline.
> Can you just, while you're at it, update the comment at the start of the
> containing switch so that it beter reflects current reality.
The patch that I committed to the 5.3 branch is actually slightly
differrent. I just ommitted the comments in the solaris branch of the
case statement, just to play it safe. And I also tested the changes by
reconfiguring on Solaris, and I verifed that the Makefile in gdb was
identical before and after the change.
--
Joel
[-- Attachment #2: aix-thread-branch.diff --]
[-- Type: text/plain, Size: 3201 bytes --]
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.90.6.1
diff -c -3 -p -r1.90.6.1 configure.in
*** configure.in 26 Nov 2002 01:32:21 -0000 1.90.6.1
--- configure.in 29 Nov 2002 00:23:34 -0000
*************** aix*)
*** 532,543 ****
;;
esac
- dnl See if thread_db library is around for Solaris thread debugging. Note that
- dnl we must explicitly test for version 1 of the library because version 0
- dnl (present on Solaris 2.4 or earlier) doesn't have the same API.
! dnl Note that we only want this if we are both native (host == target), and
! dnl not doing a canadian cross build (build == host).
if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
--- 532,543 ----
;;
esac
! dnl For certain native configurations, we need to check whether thread
! dnl support can be built in or not.
! dnl
! dnl Note that we only want this if we are both native (host == target),
! dnl and not doing a canadian cross build (build == host).
if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
*************** if test ${build} = ${host} -a ${host} =
*** 594,599 ****
--- 594,615 ----
fi
else
AC_MSG_RESULT(no)
+ fi
+ ;;
+ aix*)
+ AC_MSG_CHECKING(for AiX thread debugging library)
+ AC_CACHE_VAL(gdb_cv_have_aix_thread_debug,
+ [AC_TRY_COMPILE([#include <sys/pthdebug.h>],
+ [#ifndef PTHDB_VERSION_3
+ #error
+ #endif],
+ gdb_cv_have_aix_thread_debug=yes,
+ gdb_cv_have_aix_thread_debug=no)])
+ AC_MSG_RESULT($gdb_cv_have_aix_thread_debug)
+ if test $gdb_cv_have_aix_thread_debug = yes; then
+ CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
+ CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
+ CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
fi
;;
esac
Index: config/powerpc/aix432.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/aix432.mh,v
retrieving revision 1.1
diff -c -3 -p -r1.1 aix432.mh
*** config/powerpc/aix432.mh 30 Jul 2002 19:59:06 -0000 1.1
--- config/powerpc/aix432.mh 29 Nov 2002 00:23:34 -0000
***************
*** 3,9 ****
XM_FILE= xm-aix.h
NAT_FILE= nm-aix.h
! NATDEPFILES= aix-thread.o fork-child.o infptrace.o inftarg.o corelow.o \
rs6000-nat.o xcoffread.o xcoffsolib.o
# When compiled with cc, for debugging, this argument should be passed.
--- 3,9 ----
XM_FILE= xm-aix.h
NAT_FILE= nm-aix.h
! NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o \
rs6000-nat.o xcoffread.o xcoffsolib.o
# When compiled with cc, for debugging, this argument should be passed.
*************** NATDEPFILES= aix-thread.o fork-child.o i
*** 15,19 ****
# This switch may be needed for some vendor compilers.
# MH_LDFLAGS = -Wl,-bbigtoc
- # pthread debugging support
- NAT_CLIBS = -lpthdebug
--- 15,17 ----
next prev parent reply other threads:[~2002-11-29 0:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-27 21:16 [RFA] " Joel Brobecker
2002-11-27 21:18 ` Joel Brobecker
2002-11-28 10:24 ` Andrew Cagney
2002-11-28 16:34 ` Joel Brobecker
2002-11-28 16:36 ` Joel Brobecker [this message]
2002-12-02 6:54 ` Kevin Buettner
2002-12-02 8:17 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021129003645.GO1259@gnat.com \
--to=brobecker@gnat.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox