Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Unify --with-sysroot defaults
@ 2003-02-20 10:05 Alexandre Oliva
  2003-02-20 14:50 ` Nick Clifton
  2003-02-20 15:22 ` Daniel Jacobowitz
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Oliva @ 2003-02-20 10:05 UTC (permalink / raw)
  To: gcc-patches, binutils, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sysroot-defaults.patch --]
[-- Type: text/x-patch, Size: 3576 bytes --]

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.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@redhat.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@redhat.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"
    ;;

[-- Attachment #3: Type: text/plain, Size: 289 bytes --]


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

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

end of thread, other threads:[~2003-02-20 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 10:05 Unify --with-sysroot defaults Alexandre Oliva
2003-02-20 14:50 ` Nick Clifton
2003-02-20 15:22 ` Daniel Jacobowitz

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