Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH RFA] for NetBSD host, use RPATH to add X lib dir.
@ 2002-02-08 16:16 cgd
  2002-02-08 16:20 ` cgd
  2002-02-09  8:53 ` Andrew Cagney
  0 siblings, 2 replies; 3+ messages in thread
From: cgd @ 2002-02-08 16:16 UTC (permalink / raw)
  To: insight, gdb-patches

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
  #


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RFA] for NetBSD host, use RPATH to add X lib dir.
  2002-02-08 16:16 [PATCH RFA] for NetBSD host, use RPATH to add X lib dir cgd
@ 2002-02-08 16:20 ` cgd
  2002-02-09  8:53 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: cgd @ 2002-02-08 16:20 UTC (permalink / raw)
  To: insight; +Cc: gdb-patches

At 08 Feb 2002 16:16:24 -0800, Chris G. Demetriou wrote:
> Approval, anyone?  8-)

Apparently I always have to forget _something_...


That patch was developed and tested on NetBSD/i386 1.5.

The claim about the old a.out linker simply ignoring -rpath was
verified by myself on a NetBSD/i386 1.4 system, and by Jason Thorpe on
a NetBSD/arm32 a.out system of unknown version.



thanks,

chris


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RFA] for NetBSD host, use RPATH to add X lib dir.
  2002-02-08 16:16 [PATCH RFA] for NetBSD host, use RPATH to add X lib dir cgd
  2002-02-08 16:20 ` cgd
@ 2002-02-09  8:53 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-02-09  8:53 UTC (permalink / raw)
  To: cgd; +Cc: insight, gdb-patches

> 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.
> 

I can't see this breaking anything other than NetBSD so yes, ok.

Andrew




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-09 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-08 16:16 [PATCH RFA] for NetBSD host, use RPATH to add X lib dir cgd
2002-02-08 16:20 ` cgd
2002-02-09  8:53 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox