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]

Unify --with-sysroot defaults


Currently, GCC accepts --with-sysroot without an argument, whereas ld
and gdb don't. Also, GCC's default sysroot is not considered
relocatable, even though the whole point of picking that default was
such that it was.  This patch arranges for all three tools to use the
same relocatable default.  Ok to install in ld and gdb?  (I'll install
it in gcc when I get approval for the others).

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva at redhat dot com>

	* configure.in (TARGET_SYSTEM_ROOT): Set default to
	${exec_prefix}/${target_alias}/sys-root.  Match explicit
	'${exec_prefix}' (in addition to the expansion thereof) as
	relocatable.
	* configure: Rebuilt.

Index: gcc/configure.in
===================================================================
RCS file: /cvs/uberbaum/gcc/configure.in,v
retrieving revision 1.643
diff -u -p -r1.643 configure.in
--- gcc/configure.in 14 Feb 2003 17:28:55 -0000 1.643
+++ gcc/configure.in 20 Feb 2003 10:01:29 -0000
@@ -490,7 +490,7 @@ AC_ARG_WITH(sysroot,
 [  --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR.],
 [
  case ${with_sysroot} in
- yes) TARGET_SYSTEM_ROOT='${gcc_tooldir}/sys-root' ;;
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
  esac
    
@@ -507,7 +507,8 @@ AC_ARG_WITH(sysroot,
   test_prefix=$exec_prefix
  fi
  case ${TARGET_SYSTEM_ROOT} in
- ${test_prefix}*)
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
    TARGET_SYSTEM_ROOT_DEFINE="$t"
    ;;
Index: ld/ChangeLog
from  Alexandre Oliva  <aoliva at redhat dot com>

	* configure.in (TARGET_SYSTEM_ROOT): Set default to
	${exec_prefix}/${target_alias}/sys-root.  Match explicit
	'${exec_prefix}' (in addition to the expansion thereof) as
	relocatable.
	* configure: Rebuilt.

Index: ld/configure.in
===================================================================
RCS file: /cvs/uberbaum/ld/configure.in,v
retrieving revision 1.22
diff -u -p -r1.22 configure.in
--- ld/configure.in 6 Jan 2003 16:13:57 -0000 1.22
+++ ld/configure.in 20 Feb 2003 10:01:33 -0000
@@ -34,7 +34,7 @@ AC_ARG_WITH(sysroot,
 [  --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
 [
  case ${with_sysroot} in
- yes) AC_ERROR(with-sysroot must specify path) ;;
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
  esac
 
@@ -51,7 +51,8 @@ AC_ARG_WITH(sysroot,
   test_prefix=$exec_prefix
  fi
  case ${TARGET_SYSTEM_ROOT} in
- ${test_prefix}*)
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
    TARGET_SYSTEM_ROOT_DEFINE="$t"
    ;;
Index: gdb/ChangeLog
from  Alexandre Oliva  <aoliva at redhat dot com>

	* configure.in (TARGET_SYSTEM_ROOT): Set default to
	${exec_prefix}/${target_alias}/sys-root.  Match explicit
	'${exec_prefix}' (in addition to the expansion thereof) as
	relocatable.
	* configure: Rebuilt.

Index: gdb/configure.in
===================================================================
RCS file: /cvs/uberbaum/gdb/configure.in,v
retrieving revision 1.124
diff -u -p -r1.124 configure.in
--- gdb/configure.in 17 Feb 2003 21:56:29 -0000 1.124
+++ gdb/configure.in 20 Feb 2003 10:01:36 -0000
@@ -905,7 +905,7 @@ AC_ARG_WITH(sysroot,
 [  --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
 [
  case ${with_sysroot} in
- yes) AC_ERROR(with-sysroot must specify path) ;;
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
  esac
 
@@ -921,7 +921,8 @@ AC_ARG_WITH(sysroot,
   test_prefix=$exec_prefix
  fi
  case ${TARGET_SYSTEM_ROOT} in
- ${test_prefix}*)
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
    TARGET_SYSTEM_ROOT_DEFINE="$t"
    ;;
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot 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]