public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: joseph@codesourcery.com
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [09/25] Specs cleanup: CRIS
Date: Fri, 14 Jan 2011 23:28:00 -0000	[thread overview]
Message-ID: <201101142221.p0EMLuWI018791@ignucius.se.axis.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1101142047520.23499@digraph.polyomino.org.uk>	(joseph@codesourcery.com)

> Date: Fri, 14 Jan 2011 20:56:03 +0000 (UTC)
> From: "Joseph S. Myers" <joseph@codesourcery.com>

> On Fri, 14 Jan 2011, Hans-Peter Nilsson wrote:
> 
> > Come to think of it, IIRC I've seen you in the front-line
> > arguing against differences between native and cross builds.
> > Don't you think at some level requiring an extra option, the
> > sysroot, for "well-working" cross-builds (and cross-testing) is
> > at least a wart?  (Perhaps fold that sysroot stuff so that all
> > cross-toolchains in fact are automatically sysrooted to their
> > prefix?)
> 
> Sysrooting to the prefix is inappropriate since lib/ is for host 
> libraries, not target ones.  Sysrooting to prefix/$target is also 
> inappropriate (except maybe for GNU Hurd) since the native system layout 
> puts various things in /usr/include and /usr/lib, rather than /include and 
> /lib.
>
> I think non-sysroot toolchains should be considered the special, somewhat 
> deprecated case for cross tools to GNU/Linux targets (more generally: for 
> crosses to any target for which the concept of a native filesystem layout 
> makes sense), and sysrooted ones the case that is closer to the native 
> case.

It sounds like you believe sysroot is the preferable method for
cross-builds, yet arguing against defaulting to it, only from
the point that there's currently no suitable sysroot-point
within --prefix.  How about making up one?  Or wait, seems like
there already is one, ${exec_prefix}/${target_noncanonical}/sys-root
(used for --with-sysroot=yes).  Looks like we could just flip
the default, defaulting to --with-sysroot=yes for cross-builds.
Old-style installations would have to add --without-sysroot to
build scripts to "stay out".  Maybe I'm missing something: that
sounds way too simple to not have happened yet...

> (And it would be good to have an option for GCC to install all its 
> libraries in the sysroot paths rather than $target/lib etc., to reduce 
> differences further and settle on one set of paths for all libraries.)

I'm not sure I understand that correctly; does "make install"
not install target libraries in the configured sysroot if
--with-sysroot is given?  Now *there's* a wart!

> As for testing, if it's build-tree testing with a mixture of installed 
> glibc libraries and build-tree GCC libraries, the problem there is 
> differences between an installed compiler and a build tree one and I think 
> it's up to the test harness to pass all required -B, -rpath-link etc. 
> options if those options aren't needed with an installed
> compiler.

Sure, that's one of the reasons I ok'd your patch. ;-)
(It was likely not building that required those -rpath-links,
rather testing.  I definitely have to revisit.)

>  (And 
> the real solution is installed testing with staged installs: test 
> something closer to how the compilers will be used by making build-tree 
> testing actually create a temporary tree with the new compilers and the 
> installed binutils, glibc etc. binaries, so no special -B options are 
> needed and everything runs from a single tree.)

Yes, but... the half-way-installation method still has to
consider that it's not the final installation point.
Alternatively, everything done at "make all" would have to
change to prepare for installation anywhere (or at least both
$prefix and within the build tree) rather than just $prefix.
A decent amount of work just waiting for Someone. ;-)
Anyway, we're now digressing; this'd be a universal change, not
strictly tied to cross-builds.

brgds, H-P

  reply	other threads:[~2011-01-14 22:22 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14  0:03 [00/25] Specs cleanup: introduction Joseph S. Myers
2011-01-14  0:04 ` [01/25] Specs cleanup: -b (ARM) Joseph S. Myers
2011-01-14 10:09   ` Richard Earnshaw
2011-01-14  0:05 ` [02/25] Specs cleanup: assembler -v/-V (SPARC) Joseph S. Myers
2011-01-14  9:18   ` Eric Botcazou
2011-01-14 18:18     ` Joseph S. Myers
2011-01-14  0:06 ` [03/25] Specs cleanup: -version Joseph S. Myers
2011-01-14 10:13   ` Richard Earnshaw
2011-01-14  0:07 ` [04/25] Specs cleanup: -Yd, Joseph S. Myers
2011-01-14  9:47   ` Eric Botcazou
2011-01-26 18:18   ` Ping " Joseph S. Myers
2011-01-26 19:34     ` Richard Guenther
2011-01-14  0:07 ` [05/25] Specs cleanup: -ibcs Joseph S. Myers
2011-01-14 10:37   ` Richard Guenther
2011-01-14  0:08 ` [06/25] Specs cleanup: %{save-temps: } Joseph S. Myers
2011-01-14  7:58   ` Michael Eager
2011-01-14 12:02   ` Richard Guenther
2011-01-14  0:09 ` [07/25] Specs cleanup: -gline Joseph S. Myers
2011-01-14  8:37   ` Michael Eager
2011-01-14  0:10 ` [09/25] Specs cleanup: CRIS Joseph S. Myers
2011-01-14  3:28   ` Hans-Peter Nilsson
2011-01-14 18:27     ` Joseph S. Myers
2011-01-14 19:41       ` Hans-Peter Nilsson
2011-01-14 21:31         ` Joseph S. Myers
2011-01-14 23:28           ` Hans-Peter Nilsson [this message]
2011-01-15  0:30             ` Joseph S. Myers
2011-01-15  1:14               ` Hans-Peter Nilsson
2011-01-15  9:08                 ` Joseph S. Myers
2011-01-25  9:23                   ` RFC: change the default for cross-targets to --with-sysroot=yes Hans-Peter Nilsson
2011-01-14  0:10 ` [08/25] Specs cleanup: AVR Joseph S. Myers
2011-01-14  5:37   ` Weddington, Eric
2011-01-14  0:11 ` [10/25] Specs cleanup: NetWare Joseph S. Myers
2011-01-14  0:12 ` [11/25] Specs cleanup: config/m32r/little.h Joseph S. Myers
2011-01-14 12:07   ` Nick Clifton
2011-01-14  0:12 ` [12/25] Specs cleanup: microblaze Joseph S. Myers
2011-01-14  7:27   ` Michael Eager
2011-01-14  0:13 ` [13/25] Specs cleanup: MIPS -bestGnum -no_archive -exact_version Joseph S. Myers
2011-01-14  0:14 ` [14/25] Specs cleanup: MIPS -call_shared -non_shared Joseph S. Myers
2011-01-14 12:58   ` Richard Sandiford
2011-01-14 18:42     ` Joseph S. Myers
2011-01-15 14:24       ` Richard Sandiford
2011-01-14  0:15 ` [15/25] Specs cleanup: config/rs6000/sysv4.h SHARED_LIB_SUPPORT Joseph S. Myers
2011-01-17 16:38   ` David Edelsohn
2011-01-25 23:10     ` Joseph S. Myers
2011-01-14  0:16 ` [16/25] Specs cleanup: config/rs6000/sysv4.h LINK_PATH_SPEC Joseph S. Myers
2011-01-17 17:00   ` David Edelsohn
2011-01-14  0:17 ` [17/25] Specs cleanup: rs6000 -profile Joseph S. Myers
2011-01-14  8:57   ` Nathan Sidwell
2011-01-26 18:26   ` Ping " Joseph S. Myers
2011-01-27 19:13     ` Krister Walfridsson
2011-01-14  0:17 ` [18/25] Specs cleanup: rs6000/vxworks.h -fvec* Joseph S. Myers
2011-01-14  9:03   ` Nathan Sidwell
2011-01-14  0:19 ` [19/25] Specs cleanup: SPARC -mcpu aliases Joseph S. Myers
2011-01-14  9:20   ` Eric Botcazou
2011-01-15 21:29   ` Eric Botcazou
2011-01-14  0:20 ` [21/25] Specs cleanup: SPU Joseph S. Myers
2011-01-17 17:06   ` Ulrich Weigand
2011-01-25 23:12     ` Joseph S. Myers
2011-01-27  9:23       ` [commit, spu] Remove ASM_SPEC (Re: [21/25] Specs cleanup: SPU) Ulrich Weigand
2011-01-14  0:20 ` [20/25] Specs cleanup: SPARC -sun4 -target Joseph S. Myers
2011-01-14  9:21   ` Eric Botcazou
2011-01-14  0:21 ` [22/25] Specs cleanup: -msse5 Joseph S. Myers
2011-01-14 10:40   ` Richard Guenther
2011-01-14  0:23 ` [23/25] Specs cleanup: -YP, Joseph S. Myers
2011-01-26 18:29   ` Ping " Joseph S. Myers
2011-01-26 19:37     ` Richard Guenther
2011-01-14  0:50 ` [24/25] Specs cleanup: -Ym, Joseph S. Myers
2011-01-14  9:44   ` Eric Botcazou
2011-01-26 18:40   ` Ping " Joseph S. Myers
2011-01-26 19:40     ` Richard Guenther
2011-01-14  0:56 ` [25/25] Specs cleanup: -Qn/-Qy Joseph S. Myers
2011-01-14  9:45   ` Eric Botcazou
2011-01-26 18:55   ` Ping " Joseph S. Myers
2011-01-26 19:44     ` Richard Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201101142221.p0EMLuWI018791@ignucius.se.axis.com \
    --to=hans-peter.nilsson@axis.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).