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]

introduce configure --with-sysroot


Traditionally, cross compilers have been configured using the flags
--with-headers and --with-libs.  This poses a number of problems to
the creation of cross compilers to hosted architectures, particularly
ones with multilibs, because then all the libs, start and endfiles
have to be placed in a single directory, which may not work very well,
or at least make it slightly trickier to get right than mirroring the
exact structure of the target system's tree.

This patch introduces --with-sysroot=<tree>, intended to deprecate
--with-headers and --with-libs, that tells GCC to copy the specified
<tree> into its install tree and use that as the root of the target
system.

It also introduces %R as a spec, that can be used to prefix absolute
pathnames such that, when a cross compiler to a hosted system is
created, GCC can find files in the target system root tree, instead of
in the host system's tree.  This may simplify a number of weirdnesses
in targets that can be used as cross compilers.  In general, however,
no changes are necessary.

The only recommended change, for GNU/Linux targets, is to pass the
correct --rpath-link flag to GNU ld, so that it, when something is
linked with a shared library that has dependencies, it knows where to
look for such dependencies.  This could presumably be fixed with some
changes in GNU ld so as to use sysroot too, but I'm not convinced it's
worth the trouble.  The beauty of the sysroot approach is that, when
building a native compiler, %R will expand to nothing, and everything
will just work.

This patch was tested with a bootstrap on athlon-pc-linux-gnu, as well
as by building a cross compiler to mips-linux-gnu with and without
sysroot.  The latter searched for headers, crt*.o and libraries within
the sysroot, even after the entire tree was (i.e., the sysroot is
relative to the run-time location of the tree).

I'd like to check this in, and deprecate --with-headers and
--with-libs in favor of --with-sysroot, and the various
*STARTFILE_PREFIX* macros in favor of STARTFILE_PREFIX_SPEC.  A
documentation patch will follow as soon as we have agreement on the
deprecation terms.

Ok to install?

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	Angela Marie Thomas  <angela@cygnus.com>
	Andrew Haley  <aph@cambridge.redhat.com>

	* configure.in: Add --with-sysroot=XXX.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	Angela Marie Thomas  <angela@cygnus.com>
	Brendan Kehoe  <brendan@cygnus.com>
	Nick Clifton  <nickc@redhat.com>
	Andrew Haley  <aph@redhat.com>

	* configure.in (--with-sysroot): New.  Don't inhibit libc if
	given.  AC_SUBST TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE
	and CROSS_SYSTEM_HEADER_DIR.
	* configure: Rebuilt.
	* Makefile.in (CROSS_SYSTEM_HEADER_DIR): Set in configure.
	(TARGET_SYSTEM_ROOT): New.
	(DRIVER_DEFINES): Define CROSS_INCLUDE_DIR from
	CROSS_SYSTEM_HEADER_DIR.
	(stmp-fixinc): Simplify creation of $(libsubdir).
	(deduced.h, stmp-fixproto): Quote SYSTEM_HEADER_DIR properly.
	(install-mkheaders): Likewise.
	* gcc.c (target_system_root): New variable.
	(add_sysrooted_prefix): New function.
	(process_command): Recompute run-time target_system_root from
	gcc_exec_prefix.
	(do_spec_1): Process 'R' spec.
	(main): Add md_exec_prefix to exec_prefixes regardless of
	startfile_prefix_spec.  Use add_sysrooted_prefix for
	startfile_prefixes, and don't skip the default ones when cross
	compiling with sysroot enabled.  Removed unused case of
	non-absolute standard_startfile_prefix.
	* config/interix.h: Remove the only potential, yet disabled,
	occurrence of non-absolute (empty) standard_startfile_prefix.
	* config/sh/linux.h (LIB_SPEC): Add -rpath-link in non-static
	linking.
	* config/mips/linux.h (LIB_SPEC): Define as in sh/linux.h.

Index: configure.in
===================================================================
RCS file: /cvs/uberbaum/configure.in,v
retrieving revision 1.177
diff -u -p -r1.177 configure.in
--- configure.in 19 Aug 2002 20:38:15 -0000 1.177
+++ configure.in 23 Aug 2002 01:12:26 -0000
@@ -876,6 +876,38 @@ esac
 
 copy_dirs=
 
+# Handle --with-sysroot=XXX.  The contents of the named directory are
+# copied to $(tooldir)/sys-root.
+if test x"${with_sysroot}" != x ; then
+  if test x${is_cross_compiler} = xno ; then
+    echo 1>&2 '***' --with-sysroot is only supported when cross compiling
+    exit 1
+  fi
+  case "${exec_prefixoption}" in
+  "") x=${prefix} ;;
+  *) x=${exec_prefix} ;;
+  esac
+  copy_dirs="${copy_dirs} ${with_sysroot} $x/${target_alias}/sys-root"
+  with_newlib=no
+  # Make sure relative pathnames from bindir to libdir, used by gcc,
+  # work when we run gcc/xgcc too.
+  case "$bindir,$libdir" in
+  '${exec_prefix}/bin,${exec_prefix}/lib')
+    echo Creating $x/lib...
+    ${SHELL} ${srcdir}/mkinstalldirs $x/lib
+    echo Linking ./lib to it...
+    if test -h lib || ${symbolic_link} $x/lib lib; then
+      :
+    else
+      echo 1>&2 '***' --with-sysroot is only suported on filesystems that support soft links
+      exit 1
+    fi
+    ;;
+  *) echo 1>&2 '***' not setting up ./lib because --bindir and/or --libdir are non-default
+    ;;
+  esac
+fi
+
 # Handle --with-headers=XXX.  The contents of the named directory are
 # copied to $(tooldir)/sys-include.
 if test x"${with_headers}" != x ; then
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/uberbaum/gcc/Makefile.in,v
retrieving revision 1.939
diff -u -p -r1.939 Makefile.in
--- gcc/Makefile.in 22 Aug 2002 04:29:34 -0000 1.939
+++ gcc/Makefile.in 23 Aug 2002 01:12:28 -0000
@@ -251,7 +251,7 @@ FIBHEAP_H   = $(srcdir)/../include/fibhe
 # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
 NATIVE_SYSTEM_HEADER_DIR = /usr/include
 # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
-CROSS_SYSTEM_HEADER_DIR = $(build_tooldir)/sys-include
+CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
 
 # autoconf sets SYSTEM_HEADER_DIR to one of the above.
 SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
@@ -263,6 +263,10 @@ STMP_FIXINC = @STMP_FIXINC@
 # Test to see whether <limits.h> exists in the system header files.
 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
 
+# Directory for prefix to system directories, for
+# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
+TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+
 target=@target@
 target_alias=@target_alias@
 xmake_file=@dep_host_xmake_file@
@@ -1272,6 +1276,7 @@ DRIVER_DEFINES = \
   -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
   -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
   -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\" \
+  @TARGET_SYSTEM_ROOT_DEFINE@ \
   `test "X$${SHLIB_LINK}" = "X" || test "@enable_shared@" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` \
   `test "X$${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"`
 
@@ -2187,7 +2192,7 @@ PREPROCESSOR_DEFINES = \
   -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_alias)\" \
   -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
   -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
-  -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
+  -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
   -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\"
 
 LIBCPP_OBJS =	cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o cpptrad.o \
@@ -2372,20 +2377,12 @@ stmp-fixinc: fixinc.sh gsyslimits.h
 	  cp $(srcdir)/gsyslimits.h include/syslimits.h; \
 	fi; \
 	chmod a+r include/syslimits.h)
-# If $(SYSTEM_HEADER_DIR) is $(build_tooldir)/sys-include, and
-# that directory exists, then make sure that $(libsubdir) exists.
-# This is because cpp is compiled to find $(gcc_tooldir)/include via
-# $(libsubdir)/$(unlibsubdir), which will only work if $(libsubdir)
-# exists.
-# ??? Better would be to use -isystem $(build_tooldir)/sys-include,
-# but fixincludes does not take such arguments.
-	if [ "$(SYSTEM_HEADER_DIR)" = "$(build_tooldir)/sys-include" ] \
-	   && [ -d $(build_tooldir)/sys-include ]; then \
-	  if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \
-	  if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \
-	  if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \
-	  if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \
-	else true; fi
+# Cross compilers search their SYSTEM_HEADER_DIR as a relative
+# pathname starting with $(libsubdir)/$(unlibsubdir), so make sure the
+# $(libsubdir) part exists.
+	case '$(SYSTEM_HEADER_DIR)' in \
+	'$(gcc_tooldir)'/*) $(SHELL) $(srcdir)/mkinstalldirs "$(libsubdir)"; \
+	;; esac
 	$(STAMP) stmp-fixinc
 
 # Files related to the fixproto script.
@@ -2394,7 +2391,7 @@ stmp-fixinc: fixinc.sh gsyslimits.h
 # libiberty.a.
 
 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
-	if [ -d $(SYSTEM_HEADER_DIR) ]; \
+	if [ -d "$(SYSTEM_HEADER_DIR)" ]; \
 	then \
 	  CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \
 	  export CC; \
@@ -2460,7 +2457,7 @@ stmp-fixproto: fixhdr.ready fixproto stm
 	  FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
 	  mkinstalldirs="$(SHELL) $(srcdir)/mkinstalldirs"; \
 	    export mkinstalldirs; \
-	  if [ -d $(SYSTEM_HEADER_DIR) ] ; then \
+	  if [ -d "$(SYSTEM_HEADER_DIR)" ]; then \
 	    $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
 	    if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
 	  else true; fi; \
@@ -3049,7 +3046,7 @@ install-mkheaders: stmp-int-hdrs $(STMP_
 		$(itoolsdir)/fix-header$(build_exeext) ; \
 	else :; fi
 	$(INSTALL_PROGRAM) mkheaders $(itoolsdir)/mkheaders
-	echo 'SYSTEM_HEADER_DIR="$(SYSTEM_HEADER_DIR)"' \
+	echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
 		> $(itoolsdir)/mkheaders.conf
 	echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \
 		>> $(itoolsdir)/mkheaders.conf
Index: gcc/configure.in
===================================================================
RCS file: /cvs/uberbaum/gcc/configure.in,v
retrieving revision 1.617
diff -u -p -r1.617 configure.in
--- gcc/configure.in 15 Aug 2002 21:45:47 -0000 1.617
+++ gcc/configure.in 23 Aug 2002 01:12:30 -0000
@@ -373,6 +373,21 @@ AC_ARG_ENABLE(shared,
 ], [enable_shared=yes])
 AC_SUBST(enable_shared)
 
+AC_ARG_WITH(sysroot,
+[  --with-sysroot Look in gcc_tooldir/sys-root for lib, include, et al.],
+[
+ TARGET_SYSTEM_ROOT='$(gcc_tooldir)/sys-root'
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
+ CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
+], [
+ TARGET_SYSTEM_ROOT=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=0'
+ CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
+])
+AC_SUBST(TARGET_SYSTEM_ROOT)
+AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+AC_SUBST(CROSS_SYSTEM_HEADER_DIR)
+
 # Determine the host, build, and target systems
 AC_CANONICAL_SYSTEM
 
@@ -1173,12 +1188,9 @@ fi
 # This prevents libgcc2 from containing any code which requires libc
 # support.
 inhibit_libc=
-if [test x$host != x$target] && [test x$with_headers = x]; then
+if { test x$host != x$target && test "x$with_headers" = x &&
+     test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
        inhibit_libc=-Dinhibit_libc
-else
-       if [test x$with_newlib = xyes]; then
-               inhibit_libc=-Dinhibit_libc
-       fi
 fi
 AC_SUBST(inhibit_libc)
 
Index: gcc/gcc.c
===================================================================
RCS file: /cvs/uberbaum/gcc/gcc.c,v
retrieving revision 1.336
diff -u -p -r1.336 gcc.c
--- gcc/gcc.c 10 Aug 2002 20:58:43 -0000 1.336
+++ gcc/gcc.c 23 Aug 2002 01:12:34 -0000
@@ -192,6 +192,11 @@ static int target_help_flag;
 
 static int report_times;
 
+/* Nonzero means place this string before uses of /, so that include
+   and library files can be found in an alternate location.  */
+
+static const char *target_system_root = TARGET_SYSTEM_ROOT;
+
 /* Nonzero means write "temp" files in source directory
    and use the source file's name in them, and don't delete them.  */
 
@@ -278,6 +283,8 @@ static int access_check		PARAMS ((const 
 static char *find_a_file	PARAMS ((struct path_prefix *, const char *, int));
 static void add_prefix		PARAMS ((struct path_prefix *, const char *,
 					 const char *, int, int, int *));
+static void add_sysrooted_prefix PARAMS ((struct path_prefix *, const char *,
+					  const char *, int, int, int *));
 static void translate_options	PARAMS ((int *, const char *const **));
 static char *skip_whitespace	PARAMS ((char *));
 static void delete_if_ordinary	PARAMS ((const char *));
@@ -2683,6 +2690,32 @@ add_prefix (pprefix, prefix, component, 
   pl->next = (*prev);
   (*prev) = pl;
 }
+
+/* Same as add_prefix, but prepending target_system_root to prefix.  */
+static void
+add_sysrooted_prefix (pprefix, prefix, component, priority,
+		      require_machine_suffix, warn)
+     struct path_prefix *pprefix;
+     const char *prefix;
+     const char *component;
+     /* enum prefix_priority */ int priority;
+     int require_machine_suffix;
+     int *warn;
+{
+  if (!IS_ABSOLUTE_PATHNAME (prefix))
+    abort ();
+
+  if (target_system_root)
+    {
+      prefix = concat (target_system_root, prefix, NULL);
+      /* We have to override this because GCC's notion of sysroot
+	 moves along with GCC.  */
+      component = "GCC";
+    }
+
+  add_prefix (pprefix, prefix, component, priority,
+	      require_machine_suffix, warn);
+}
 
 /* Execute the command specified by the arguments on the current line of spec.
    When using pipes, this includes several piped-together commands
@@ -3823,6 +3856,15 @@ warranty; not even for MERCHANTABILITY o
 	      concat (tooldir_prefix, "lib", dir_separator_str, NULL),
 	      "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL);
 
+  if (target_system_root && gcc_exec_prefix)
+    {
+      char *tmp_prefix = make_relative_prefix (argv[0],
+					       standard_bindir_prefix,
+					       target_system_root);
+      if (tmp_prefix)
+	target_system_root = tmp_prefix;
+    }
+
   /* More prefixes are enabled in main, after we read the specs file
      and determine whether this is cross-compilation or not.  */
 
@@ -5006,6 +5048,14 @@ do_spec_1 (spec, inswitch, soft_matched_
 	    }
 	    break;
 
+	  case 'R':
+	    /* We assume there is a directory
+	       separator at the end of this string.  */
+	    if (target_system_root)
+	      obstack_grow (&obstack, target_system_root, 
+			    strlen (target_system_root));
+	    break;
+
 	  case 'S':
 	    value = do_spec_1 (startfile_spec, 0, NULL);
 	    if (value != 0)
@@ -5900,34 +5950,51 @@ main (argc, argv)
   if (access (specs_file, R_OK) == 0)
     read_specs (specs_file, TRUE);
 
-  /* If not cross-compiling, look for startfiles in the standard places.
-     Similarly, don't add the standard prefixes if startfile handling
-     will be under control of startfile_prefix_spec.  */
-  if (*cross_compile == '0' && *startfile_prefix_spec == 0)
+  /* If not cross-compiling, look for executables in the standard
+     places.  */
+  if (*cross_compile == '0')
     {
       if (*md_exec_prefix)
 	{
 	  add_prefix (&exec_prefixes, md_exec_prefix, "GCC",
 		      PREFIX_PRIORITY_LAST, 0, NULL);
-	  add_prefix (&startfile_prefixes, md_exec_prefix, "GCC",
-		      PREFIX_PRIORITY_LAST, 0, NULL);
 	}
+    }
+
+  /* Look for startfiles in the standard places.  */
+  if (*startfile_prefix_spec != 0
+      && do_spec_2 (startfile_prefix_spec) == 0
+      && do_spec_1 (" ", 0, NULL) == 0)
+    {
+      int ndx;
+      for (ndx = 0; ndx < argbuf_index; ndx++)
+	add_sysrooted_prefix (&startfile_prefixes, argbuf[ndx], "BINUTILS",
+			      PREFIX_PRIORITY_LAST, 0, NULL);
+    }
+  /* We should eventually get rid of all these and stick to
+     startfile_prefix_spec exclusively.  */
+  else if (*cross_compile == '0' || target_system_root)
+    {
+      if (*md_exec_prefix)
+	add_sysrooted_prefix (&startfile_prefixes, md_exec_prefix, "GCC",
+			      PREFIX_PRIORITY_LAST, 0, NULL);
 
       if (*md_startfile_prefix)
-	add_prefix (&startfile_prefixes, md_startfile_prefix, "GCC",
-		    PREFIX_PRIORITY_LAST, 0, NULL);
+	add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix,
+			      "GCC", PREFIX_PRIORITY_LAST, 0, NULL);
 
       if (*md_startfile_prefix_1)
-	add_prefix (&startfile_prefixes, md_startfile_prefix_1, "GCC",
-		    PREFIX_PRIORITY_LAST, 0, NULL);
+	add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix_1,
+			      "GCC", PREFIX_PRIORITY_LAST, 0, NULL);
 
       /* If standard_startfile_prefix is relative, base it on
 	 standard_exec_prefix.  This lets us move the installed tree
 	 as a unit.  If GCC_EXEC_PREFIX is defined, base
 	 standard_startfile_prefix on that as well.  */
       if (IS_ABSOLUTE_PATHNAME (standard_startfile_prefix))
-	add_prefix (&startfile_prefixes, standard_startfile_prefix, "BINUTILS",
-		    PREFIX_PRIORITY_LAST, 0, NULL);
+	add_sysrooted_prefix (&startfile_prefixes,
+			      standard_startfile_prefix, "BINUTILS",
+			      PREFIX_PRIORITY_LAST, 0, NULL);
       else
 	{
 	  if (gcc_exec_prefix)
@@ -5942,33 +6009,14 @@ main (argc, argv)
 		      NULL, PREFIX_PRIORITY_LAST, 0, NULL);
 	}
 
-      add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
-		  "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL);
-      add_prefix (&startfile_prefixes, standard_startfile_prefix_2,
-		  "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL);
+      add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_1,
+			    "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL);
+      add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_2,
+			    "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL);
 #if 0 /* Can cause surprises, and one can use -B./ instead.  */
       add_prefix (&startfile_prefixes, "./", NULL,
 		  PREFIX_PRIORITY_LAST, 1, NULL);
 #endif
-    }
-  else
-    {
-      if (!IS_ABSOLUTE_PATHNAME (standard_startfile_prefix)
-	  && gcc_exec_prefix)
-	add_prefix (&startfile_prefixes,
-		    concat (gcc_exec_prefix, machine_suffix,
-			    standard_startfile_prefix, NULL),
-		    "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL);
-    }
-
-  if (*startfile_prefix_spec != 0
-      && do_spec_2 (startfile_prefix_spec) == 0
-      && do_spec_1 (" ", 0, NULL) == 0)
-    {
-      int ndx;
-      for (ndx = 0; ndx < argbuf_index; ndx++)
-	add_prefix (&startfile_prefixes, argbuf[ndx], "BINUTILS",
-		    PREFIX_PRIORITY_LAST, 0, NULL);
     }
 
   /* Process any user specified specs in the order given on the command
Index: gcc/config/interix.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/interix.h,v
retrieving revision 1.7
diff -u -p -r1.7 interix.h
--- gcc/config/interix.h 7 May 2002 21:07:16 -0000 1.7
+++ gcc/config/interix.h 23 Aug 2002 01:12:34 -0000
@@ -70,19 +70,6 @@ for windows/multi thread */
   && strcmp (STR, "Tbss"))
 
 
-#if 0	
-/* don't do this until we can sort out the default path issues. MK */
-#undef STANDARD_EXEC_PREFIX
-#define STANDARD_EXEC_PREFIX ""
-
-#undef STANDARD_STARTFILE_PREFIX
-#define STANDARD_STARTFILE_PREFIX ""
-
-#undef TOOLDIR_BASE_PREFIX
-#define TOOLDIR_BASE_PREFIX ""
-
-#endif /* 0 */
-
 #define STDC_0_IN_SYSTEM_HEADERS 1
 
 #define HANDLE_SYSV_PRAGMA
Index: gcc/config/sh/linux.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/sh/linux.h,v
retrieving revision 1.9
diff -u -p -r1.9 linux.h
--- gcc/config/sh/linux.h 13 Jun 2002 19:23:27 -0000 1.9
+++ gcc/config/sh/linux.h 23 Aug 2002 01:12:34 -0000
@@ -55,6 +55,7 @@ do { \
 #undef LIB_SPEC
 #define LIB_SPEC \
   "%{shared: -lc} \
+   %{!static:-rpath-link %R/lib:%R/usr/lib} \
    %{!shared: %{pthread:-lthread} \
      %{profile:-lc_p} %{!profile: -lc}}"
 
Index: gcc/config/mips/linux.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/mips/linux.h,v
retrieving revision 1.52
diff -u -p -r1.52 linux.h
--- gcc/config/mips/linux.h 21 Aug 2002 02:41:49 -0000 1.52
+++ gcc/config/mips/linux.h 23 Aug 2002 01:12:34 -0000
@@ -252,3 +252,9 @@ void FN ()							\
 /* The current Linux binutils uses MIPS_STABS_ELF and doesn't support
    COFF.  */
 #undef SDB_DEBUGGING_INFO
+
+#undef LIB_SPEC
+#define LIB_SPEC "\
+%{!static:-rpath-link %R/lib:%R/usr/lib} \
+%{!shared: %{pthread:-lthread} \
+  %{profile:-lc_p} %{!profile: -lc}}"
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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