From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5532 invoked by alias); 28 Nov 2002 05:18:19 -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 5524 invoked from network); 28 Nov 2002 05:18:18 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 28 Nov 2002 05:18:18 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id DA3BDD2D29; Wed, 27 Nov 2002 21:18:17 -0800 (PST) Date: Wed, 27 Nov 2002 21:18:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: [RFA] AiX: enable thread support only if libpthdebug is recent enough Message-ID: <20021128051817.GY1259@gnat.com> References: <20021128051647.GX1259@gnat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="M/SuVGWktc5uNpra" Content-Disposition: inline In-Reply-To: <20021128051647.GX1259@gnat.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-11/txt/msg00705.txt.bz2 --M/SuVGWktc5uNpra Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1299 (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 * 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 --M/SuVGWktc5uNpra Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="aix-thread.diff" Content-length: 2323 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 ], + [#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 ---- --M/SuVGWktc5uNpra--