* [RFA] AiX: enable thread support only if libpthdebug is recent enough
@ 2002-11-27 21:16 Joel Brobecker
2002-11-27 21:18 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2002-11-27 21:16 UTC (permalink / raw)
To: gdb-patches
Hello,
The build is broken for me on AiX 4.3.2.0 because aix-thread.c assumes
a more recent version of lib pthdebug that is actually installed. I have
therefore made the following changes to enable the thread support only
if the pthread debug lib is at least version 3.
I know the build works with version 3, and it may be that it works for
version 2 as well. But I can't check this, so I played it safe for now.
If it turns out that it works with version 2 as well, then we can very
easily change it.
Since the build is also broken on the 5.3 branch for the same reason,
I suggest this patch be applied to the 5.3 branch as well.
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.
Ok to commit? Ok for 5.3 as well?
(I did not include the diff for configure, as this is a generated file)
Thanks,
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread* [RFA] AiX: enable thread support only if libpthdebug is recent enough 2002-11-27 21:16 [RFA] AiX: enable thread support only if libpthdebug is recent enough Joel Brobecker @ 2002-11-27 21:18 ` Joel Brobecker 2002-11-28 10:24 ` Andrew Cagney 2002-12-02 6:54 ` [RFA] " Kevin Buettner 0 siblings, 2 replies; 7+ messages in thread From: Joel Brobecker @ 2002-11-27 21:18 UTC (permalink / raw) To: gdb-patches [-- Attachment #1: Type: text/plain, Size: 1299 bytes --] (once more, with the patch this time, sorry) Hello, The build is broken for me on AiX 4.3.2.0 because aix-thread.c assumes a more recent version of lib pthdebug that is actually installed. I have therefore made the following changes to enable the thread support only if the pthread debug lib is at least version 3. I know the build works with version 3, and it may be that it works for version 2 as well. But I can't check this, so I played it safe for now. If it turns out that it works with version 2 as well, then we can very easily change it. Since the build is also broken on the 5.3 branch for the same reason, I suggest this patch be applied to the 5.3 branch as well. 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. Ok to commit? Ok for 5.3 as well? (I did not include the diff for configure, as this is a generated file) -- Joel [-- Attachment #2: aix-thread.diff --] [-- Type: text/plain, Size: 2323 bytes --] Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.95 diff -c -3 -p -r1.95 configure.in *** configure.in 27 Nov 2002 19:13:10 -0000 1.95 --- configure.in 28 Nov 2002 04:55:17 -0000 *************** if test ${build} = ${host} -a ${host} = *** 596,601 **** --- 596,617 ---- 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 AC_SUBST(CONFIG_LDFLAGS) fi 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 28 Nov 2002 04:55:17 -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 ---- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA] AiX: enable thread support only if libpthdebug is recent enough 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 ` [RFA/5.3] " Joel Brobecker 2002-12-02 6:54 ` [RFA] " Kevin Buettner 1 sibling, 2 replies; 7+ messages in thread From: Andrew Cagney @ 2002-11-28 10:24 UTC (permalink / raw) To: Joel Brobecker; +Cc: gdb-patches > (once more, with the patch this time, sorry) > > Hello, > > The build is broken for me on AiX 4.3.2.0 because aix-thread.c assumes > a more recent version of lib pthdebug that is actually installed. I have > therefore made the following changes to enable the thread support only > if the pthread debug lib is at least version 3. > > I know the build works with version 3, and it may be that it works for > version 2 as well. But I can't check this, so I played it safe for now. > If it turns out that it works with version 2 as well, then we can very > easily change it. > > Since the build is also broken on the 5.3 branch for the same reason, > I suggest this patch be applied to the 5.3 branch as well. > > 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. > > Ok to commit? Ok for 5.3 as well? > (I did not include the diff for configure, as this is a generated file) 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. 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. Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA] AiX: enable thread support only if libpthdebug is recent enough 2002-11-28 10:24 ` Andrew Cagney @ 2002-11-28 16:34 ` Joel Brobecker 2002-11-28 16:36 ` [RFA/5.3] " Joel Brobecker 1 sibling, 0 replies; 7+ messages in thread From: Joel Brobecker @ 2002-11-28 16:34 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 934 bytes --] > >2002-11-27 J. Brobecker <brobecker@gnat.com> > > > > * configure.in: Check that the pthdebug library is recent enough > > before enabling 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. > > > >Ok to commit? Ok for 5.3 as well? > >(I did not include the diff for configure, as this is a generated file) > > 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. Ok, attached is the actual patch that I checked in... -- Joel [-- Attachment #2: aix-thread-trunk.diff --] [-- Type: text/plain, Size: 3711 bytes --] Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.95 diff -c -3 -p -r1.95 configure.in *** configure.in 27 Nov 2002 19:13:10 -0000 1.95 --- configure.in 29 Nov 2002 00:25:50 -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} = *** 557,562 **** --- 557,566 ---- fi ;; solaris*) + # See if thread_db library is around for Solaris thread debugging. + # Note that we must explicitly test for version 1 of the library + # because version 0 (present on Solaris 2.4 or earlier) doesn't have + # the same API. AC_MSG_CHECKING(for Solaris thread debugging library) if test -f /usr/lib/libthread_db.so.1 ; then AC_MSG_RESULT(yes) *************** if test ${build} = ${host} -a ${host} = *** 594,599 **** --- 598,619 ---- 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:25:50 -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 ---- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA/5.3] AiX: enable thread support only if libpthdebug is recent enough 2002-11-28 10:24 ` Andrew Cagney 2002-11-28 16:34 ` Joel Brobecker @ 2002-11-28 16:36 ` Joel Brobecker 1 sibling, 0 replies; 7+ messages in thread From: Joel Brobecker @ 2002-11-28 16:36 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches [-- 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 ---- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA] AiX: enable thread support only if libpthdebug is recent enough 2002-11-27 21:18 ` Joel Brobecker 2002-11-28 10:24 ` Andrew Cagney @ 2002-12-02 6:54 ` Kevin Buettner 2002-12-02 8:17 ` Joel Brobecker 1 sibling, 1 reply; 7+ messages in thread From: Kevin Buettner @ 2002-12-02 6:54 UTC (permalink / raw) To: Joel Brobecker, gdb-patches On Nov 27, 9:18pm, Joel Brobecker wrote: > The build is broken for me on AiX 4.3.2.0 because aix-thread.c assumes > a more recent version of lib pthdebug that is actually installed. I have > therefore made the following changes to enable the thread support only > if the pthread debug lib is at least version 3. > > I know the build works with version 3, and it may be that it works for > version 2 as well. But I can't check this, so I played it safe for now. > If it turns out that it works with version 2 as well, then we can very > easily change it. > > Since the build is also broken on the 5.3 branch for the same reason, > I suggest this patch be applied to the 5.3 branch as well. > > 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. > > Ok to commit? Ok for 5.3 as well? > (I did not include the diff for configure, as this is a generated file) I see that this has been approved and checked in. Would you mind adding a comment to aix432.mh which indicates that aix-thread.o is pulled in via configure? Thanks! Kevin ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA] AiX: enable thread support only if libpthdebug is recent enough 2002-12-02 6:54 ` [RFA] " Kevin Buettner @ 2002-12-02 8:17 ` Joel Brobecker 0 siblings, 0 replies; 7+ messages in thread From: Joel Brobecker @ 2002-12-02 8:17 UTC (permalink / raw) To: Kevin Buettner; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 381 bytes --] > Would you mind adding a comment to aix432.mh which indicates that > aix-thread.o is pulled in via configure? Sure, I made the following change (head and branch): 2002-12-02 J. Brobecker <brobecker@gnat.com> * config/powerpc/aix432.mh (NATDEPFILES): Add a comment explaining why aix-thread.o is not listed. Let me know if any adjustment is needed. -- Joel [-- Attachment #2: aix432.diff --] [-- Type: text/plain, Size: 552 bytes --] Index: aix432.mh =================================================================== RCS file: /cvs/src/src/gdb/config/powerpc/aix432.mh,v retrieving revision 1.2 diff -c -r1.2 aix432.mh *** aix432.mh 29 Nov 2002 00:29:28 -0000 1.2 --- aix432.mh 2 Dec 2002 15:21:11 -0000 *************** *** 3,8 **** --- 3,10 ---- XM_FILE= xm-aix.h NAT_FILE= nm-aix.h + + # aix-thread.o is not listed in NATDEPFILES as it is pulled in by configure. NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o \ rs6000-nat.o xcoffread.o xcoffsolib.o ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-12-02 16:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-11-27 21:16 [RFA] AiX: enable thread support only if libpthdebug is recent enough 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 ` [RFA/5.3] " Joel Brobecker 2002-12-02 6:54 ` [RFA] " Kevin Buettner 2002-12-02 8:17 ` Joel Brobecker
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox