From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32422 invoked by alias); 29 Nov 2002 00:34:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32415 invoked from network); 29 Nov 2002 00:34:08 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 29 Nov 2002 00:34:08 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id C294DD2D29; Thu, 28 Nov 2002 16:34:06 -0800 (PST) Date: Thu, 28 Nov 2002 16:34:00 -0000 From: Joel Brobecker To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] AiX: enable thread support only if libpthdebug is recent enough Message-ID: <20021129003406.GN1259@gnat.com> References: <20021128051647.GX1259@gnat.com> <20021128051817.GY1259@gnat.com> <3DE65F3B.9060104@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="w3uUfsyyY1Pqa/ej" Content-Disposition: inline In-Reply-To: <3DE65F3B.9060104@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-11/txt/msg00732.txt.bz2 --w3uUfsyyY1Pqa/ej Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 934 > >2002-11-27 J. Brobecker > > > > * 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 --w3uUfsyyY1Pqa/ej Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="aix-thread-trunk.diff" Content-length: 3711 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 ], + [#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 ---- --w3uUfsyyY1Pqa/ej--