This is the mail archive of the
mailing list for the GDB project.
[PATCH RFA] for NetBSD host, use RPATH to add X lib dir.
- From: cgd at broadcom dot com
- To: insight at sources dot redhat dot com,gdb-patches at sources dot redhat dot com
- Date: 08 Feb 2002 16:16:24 -0800
- Subject: [PATCH RFA] for NetBSD host, use RPATH to add X lib dir.
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
Approval, anyone? 8-)
2002-02-08 Chris Demetriou <firstname.lastname@example.org>
* configure.in: When building for NetBSD host systems, tell
linker to provide RPATH for the X11 library directory.
* configure: Regenerate.
*** configure.in 2000/10/30 22:57:26 22.214.171.124
--- configure.in 2001/03/21 19:48:45 1.3
*** 318,323 ****
--- 318,336 ----
+ # 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.
+ if test "x$x_libraries" != "x"; then
+ XLIBSW="$XLIBSW -Wl,-rpath,$x_libraries"
# default is to link dynamically