This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Gcc prefixes and HP SOM linker


GCC currently contructs all prefixes relative to the installation
location of its tool directory.  The HPUX SOM linker hardcodes library
prefixes for shared libraries into binaries.  As result, binaries
linked against GCC shared libraries end up with a dependence on
the location of the GCC tool directory unless the user explicitly.
adds dotdot stripped -L <dir> options to the compile/link.

This patch strips dotdots from GCC prefixes when using the SOM linker,
reverting to the 2.95 behavior.  The downside is that GCC can't be moved
after being installed.  However, that wasn't very viable anyway because
of the hardcoding of GCC's location in binaries.

Tested with no regressions on hppa2.0w-hp-hpux11.00.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2002-08-29  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* som.h (ALWAYS_STRIP_DOTDOT): Define to 1.

Index: config/pa/som.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/som.h,v
retrieving revision 1.37
diff -u -3 -p -r1.37 som.h
--- config/pa/som.h	16 Jul 2002 02:16:41 -0000	1.37
+++ config/pa/som.h	24 Aug 2002 04:23:24 -0000
@@ -365,3 +365,9 @@ do {						\
 /* SOM does not support the init_priority C++ attribute.  */
 #undef SUPPORTS_INIT_PRIORITY
 #define SUPPORTS_INIT_PRIORITY 0
+
+/* The SOM linker hardcodes paths into binaries.  As a result, dotdots
+   must be removed from library prefixes to prevent binaries from depending
+   on the location of the GCC tool directory.  The downside is GCC
+   cannot be moved after installation using a symlink.  */
+#define ALWAYS_STRIP_DOTDOT 1


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