From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29896 invoked by alias); 20 Feb 2003 10:05:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29618 invoked from network); 20 Feb 2003 10:02:29 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 20 Feb 2003 10:02:29 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h1KA2RH03053; Thu, 20 Feb 2003 05:02:27 -0500 Received: from free.redhat.lsd.ic.unicamp.br (free.redhat.lsd.ic.unicamp.br [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.7/8.12.7) with ESMTP id h1KA2PuJ029181; Thu, 20 Feb 2003 07:02:25 -0300 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.7/8.12.7/Submit) id h1KA2PmZ029177; Thu, 20 Feb 2003 07:02:25 -0300 To: gcc-patches@gcc.gnu.org, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Unify --with-sysroot defaults From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Thu, 20 Feb 2003 10:05:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-02/txt/msg00472.txt.bz2 --=-=-= Content-length: 389 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). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sysroot-defaults.patch Content-length: 3576 Index: gcc/ChangeLog from Alexandre Oliva * 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 * 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 * 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" ;; --=-=-= Content-length: 289 -- 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 --=-=-=--