From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26285 invoked by alias); 9 Feb 2002 00:16:31 -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 26133 invoked from network); 9 Feb 2002 00:16:26 -0000 Received: from unknown (HELO mms1.broadcom.com) (63.70.210.58) by sources.redhat.com with SMTP; 9 Feb 2002 00:16:26 -0000 Received: from 63.70.210.1 by mms1.broadcom.com with ESMTP (Broadcom MMS-1 SMTP Relay (MMS v4.7)); Fri, 08 Feb 2002 16:16:08 -0800 X-Server-Uuid: 1e1caf3a-b686-11d4-a6a3-00508bfc9ae5 Received: from dt-sj3-118.sj.broadcom.com (dt-sj3-118 [10.21.64.118]) by mail-sj1-5.sj.broadcom.com (8.12.2/8.12.2) with ESMTP id g190GPKf021656; Fri, 8 Feb 2002 16:16:25 -0800 (PST) Received: (from cgd@localhost) by dt-sj3-118.sj.broadcom.com ( 8.9.1/SJ8.9.1) id QAA28929; Fri, 8 Feb 2002 16:16:25 -0800 (PST) To: insight@sources.redhat.com, gdb-patches@sources.redhat.com Subject: [PATCH RFA] for NetBSD host, use RPATH to add X lib dir. From: cgd@broadcom.com Date: Fri, 08 Feb 2002 16:16:00 -0000 Message-ID: X-Mailer: Gnus v5.7/Emacs 20.4 MIME-Version: 1.0 X-WSS-ID: 107AB5C22586885-01-01 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00258.txt.bz2 On NetBSD ELF systems, the X libraries are normally found via RPATH. The following patch adds an -rpath to the link line, specifing the X11 lib dir, so that gdb/insight can find the X11 libs. (Yes, that's right, by default they're not listed in any configuration file and they are not in the default shared library search path. The X11 client programs normally shipped with the system all have RPATHs in them, and the imake templates in the NetBSD version of X include support for adding the RPATHs so that programs built with imake work correctly out of the box.) On NetBSD a.out systems this isn't needed, but -rpath is ignored by the linker entirely, so there's no need to distinguish between a.out and ELF. Approval, anyone? 8-) cgd =================================================================== [src/tk/ChangeLog] 2002-02-08 Chris Demetriou * configure.in: When building for NetBSD host systems, tell linker to provide RPATH for the X11 library directory. * configure: Regenerate. Index: configure.in =================================================================== *** configure.in 2000/10/30 22:57:26 1.1.1.1 --- configure.in 2001/03/21 19:48:45 1.3 *************** *** 318,323 **** --- 318,336 ---- fi suppress_enable_shared=yes ;; + + # + # GDB should be linked dynamically on NetBSD, but needs the linker + # to set an RPATH in the binaries for the X11 library directory. It's + # assumed that if a shared libtk is being built, it will be RPATH'd + # in via a directive in the tcl library configuration information. + # + *-*-netbsd*) + if test "x$x_libraries" != "x"; then + XLIBSW="$XLIBSW -Wl,-rpath,$x_libraries" + fi + ;; + # # default is to link dynamically #