This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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
and ELF.


Approval, anyone?  8-)


cgd
===================================================================
[src/tk/ChangeLog]
2002-02-08  Chris Demetriou  <cgd@broadcom.com>

	* 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
  #


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]