public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RFC: Replace -isysroot with --sysroot?
@ 2004-12-01 18:21 Hans-Peter Nilsson
  2004-12-01 20:27 ` Mike Stump
  2004-12-01 22:12 ` Richard Sandiford
  0 siblings, 2 replies; 12+ messages in thread
From: Hans-Peter Nilsson @ 2004-12-01 18:21 UTC (permalink / raw)
  To: gcc

As it stands, -isysroot only affects header include search path.
The name is then right: for me, the leading "i" stands for
include path.  However, it's not really useful (at a glance at
least); you're likely to want the system path changed to that
same path as well.

So, can we add --sysroot, to affect the search paths as the
configure-option --with-sysroot=... does, but as a compile-time
option.

Is this acceptable for 4.0?

(Please, I do *not* want -isysroot to work as the universal
dynamic gcc-runtime sysroot option.)

brgds, H-P

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 18:21 RFC: Replace -isysroot with --sysroot? Hans-Peter Nilsson
@ 2004-12-01 20:27 ` Mike Stump
  2004-12-01 20:43   ` Hans-Peter Nilsson
                     ` (2 more replies)
  2004-12-01 22:12 ` Richard Sandiford
  1 sibling, 3 replies; 12+ messages in thread
From: Mike Stump @ 2004-12-01 20:27 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gcc

On Dec 1, 2004, at 10:20 AM, Hans-Peter Nilsson wrote:
> As it stands, -isysroot only affects header include search path.
> The name is then right: for me, the leading "i" stands for
> include path.  However, it's not really useful (at a glance at
> least);

We find it useful.

> So, can we add --sysroot, to affect the search paths as the
> configure-option --with-sysroot=... does, but as a compile-time
> option.

How is this different than what we already do when the compiler is run 
from an alternate place?

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 20:27 ` Mike Stump
@ 2004-12-01 20:43   ` Hans-Peter Nilsson
  2004-12-01 20:51   ` Daniel Jacobowitz
  2004-12-01 21:34   ` Hans-Peter Nilsson
  2 siblings, 0 replies; 12+ messages in thread
From: Hans-Peter Nilsson @ 2004-12-01 20:43 UTC (permalink / raw)
  To: mrs; +Cc: hans-peter.nilsson, gcc

> From: Mike Stump <mrs@apple.com>
> Date: Wed, 1 Dec 2004 12:27:17 -0800

> On Dec 1, 2004, at 10:20 AM, Hans-Peter Nilsson wrote:
> > So, can we add --sysroot, to affect the search paths as the
> > configure-option --with-sysroot=... does, but as a compile-time
> > option.
(I missed a question mark)

> How is this different than what we already do when the compiler is run 
> from an alternate place?

Not very different at all, except that you don't need to move
the compiler et al to the place where you have headers and
libraries.  But I'd rather compare the suggested --sysroot to
--with-sysroot; they should behave the same.

This is useful for cross-compiling, where you have different
projects/products and where you've put all headers and libraries
somewhere that's to be copied to the target (you supposedly
don't want to install a different compiler for each).  Moving
the installed compiler is different.

brgds, H-P

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 20:27 ` Mike Stump
  2004-12-01 20:43   ` Hans-Peter Nilsson
@ 2004-12-01 20:51   ` Daniel Jacobowitz
  2004-12-01 22:12     ` Mike Stump
  2004-12-01 21:34   ` Hans-Peter Nilsson
  2 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2004-12-01 20:51 UTC (permalink / raw)
  To: Mike Stump; +Cc: Hans-Peter Nilsson, gcc

On Wed, Dec 01, 2004 at 12:27:17PM -0800, Mike Stump wrote:
> On Dec 1, 2004, at 10:20 AM, Hans-Peter Nilsson wrote:
> >As it stands, -isysroot only affects header include search path.
> >The name is then right: for me, the leading "i" stands for
> >include path.  However, it's not really useful (at a glance at
> >least);
> 
> We find it useful.

Could you give an example?  Most of the time I've needed to use a
different set of headers, I've wanted a different set of libraries too.
That's why there's a single --with-sysroot option for both.

-- 
Daniel Jacobowitz

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 20:27 ` Mike Stump
  2004-12-01 20:43   ` Hans-Peter Nilsson
  2004-12-01 20:51   ` Daniel Jacobowitz
@ 2004-12-01 21:34   ` Hans-Peter Nilsson
  2004-12-01 21:53     ` Daniel Jacobowitz
  2 siblings, 1 reply; 12+ messages in thread
From: Hans-Peter Nilsson @ 2004-12-01 21:34 UTC (permalink / raw)
  To: mrs; +Cc: hans-peter.nilsson, gcc

> From: Mike Stump <mrs@apple.com>
> Date: Wed, 1 Dec 2004 12:27:17 -0800
> On Dec 1, 2004, at 10:20 AM, Hans-Peter Nilsson wrote:
> > So, can we add --sysroot, to affect the search paths as the
> > configure-option --with-sysroot=... does, but as a compile-time
> > option.
> 
> How is this different than what we already do when the compiler is run 
> from an alternate place?

I'm reading your question differently this time so I'm answering
again. :-)

Aside from the conceptual difference, the actual difference
would be that the suggested --sysroot= only affects the
target-specific bits, i.e. not cc1 and other host-executables.

brgds, H-P

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 21:34   ` Hans-Peter Nilsson
@ 2004-12-01 21:53     ` Daniel Jacobowitz
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2004-12-01 21:53 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: mrs, gcc

On Wed, Dec 01, 2004 at 10:34:08PM +0100, Hans-Peter Nilsson wrote:
> > From: Mike Stump <mrs@apple.com>
> > Date: Wed, 1 Dec 2004 12:27:17 -0800
> > On Dec 1, 2004, at 10:20 AM, Hans-Peter Nilsson wrote:
> > > So, can we add --sysroot, to affect the search paths as the
> > > configure-option --with-sysroot=... does, but as a compile-time
> > > option.
> > 
> > How is this different than what we already do when the compiler is run 
> > from an alternate place?
> 
> I'm reading your question differently this time so I'm answering
> again. :-)
> 
> Aside from the conceptual difference, the actual difference
> would be that the suggested --sysroot= only affects the
> target-specific bits, i.e. not cc1 and other host-executables.

Also, note that we relocate the sysroot when we detect that the
compiler has been moved - but only if the sysroot was inside the
original prefix, which sometimes it isn't.

-- 
Daniel Jacobowitz

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 20:51   ` Daniel Jacobowitz
@ 2004-12-01 22:12     ` Mike Stump
  2004-12-01 22:17       ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: Mike Stump @ 2004-12-01 22:12 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Hans-Peter Nilsson, gcc

On Dec 1, 2004, at 12:50 PM, Daniel Jacobowitz wrote:
> Could you give an example?  Most of the time I've needed to use a
> different set of headers, I've wanted a different set of libraries too.
> That's why there's a single --with-sysroot option for both.

Ah, yes, we find it useful in that exact combination.  Te way in which 
we get it is a linker flag, -sysroot /usr/dev/sdk-previousos, and the 
compiler arranges to pass that flag when isysroot is given.

The reason why we do it that way is the linker `knows' about a few 
places and we don't want to teach the compiler any more about the 
linker.

I'd say, push this into binutils's ld, autoconf for it, and then we can 
just use it.


On Dec 1, 2004, at 12:43 PM, Hans-Peter Nilsson wrote:
> This is useful for cross-compiling, where you have different
> projects/products and where you've put all headers and libraries
> somewhere that's to be copied to the target (you supposedly
> don't want to install a different compiler for each).  Moving
> the installed compiler is different.

Oops, sorry, yes, conceptually, we want the same thing.

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 18:21 RFC: Replace -isysroot with --sysroot? Hans-Peter Nilsson
  2004-12-01 20:27 ` Mike Stump
@ 2004-12-01 22:12 ` Richard Sandiford
  2004-12-01 22:27   ` Mike Stump
  2004-12-01 22:40   ` Hans-Peter Nilsson
  1 sibling, 2 replies; 12+ messages in thread
From: Richard Sandiford @ 2004-12-01 22:12 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gcc

Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
> So, can we add --sysroot, to affect the search paths as the
> configure-option --with-sysroot=... does, but as a compile-time
> option.

FWIW, I have a patch to do this, but I've been sitting on it
because I assumed the answer to this...

> Is this acceptable for 4.0?

...would be "no".  The patch affects the linker too btw.

Richard

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 22:12     ` Mike Stump
@ 2004-12-01 22:17       ` Daniel Jacobowitz
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2004-12-01 22:17 UTC (permalink / raw)
  To: Mike Stump; +Cc: Hans-Peter Nilsson, gcc

On Wed, Dec 01, 2004 at 02:11:55PM -0800, Mike Stump wrote:
> On Dec 1, 2004, at 12:50 PM, Daniel Jacobowitz wrote:
> >Could you give an example?  Most of the time I've needed to use a
> >different set of headers, I've wanted a different set of libraries too.
> >That's why there's a single --with-sysroot option for both.
> 
> Ah, yes, we find it useful in that exact combination.  Te way in which 
> we get it is a linker flag, -sysroot /usr/dev/sdk-previousos, and the 
> compiler arranges to pass that flag when isysroot is given.
> 
> The reason why we do it that way is the linker `knows' about a few 
> places and we don't want to teach the compiler any more about the 
> linker.
> 
> I'd say, push this into binutils's ld, autoconf for it, and then we can 
> just use it.

The problem is that the compiler also needs to know the sysroot,
because it will search for startfiles (crt*).  This is the skew I was
talking about.  Yes, the linker will need an option too.

-- 
Daniel Jacobowitz

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 22:12 ` Richard Sandiford
@ 2004-12-01 22:27   ` Mike Stump
  2004-12-01 22:40   ` Hans-Peter Nilsson
  1 sibling, 0 replies; 12+ messages in thread
From: Mike Stump @ 2004-12-01 22:27 UTC (permalink / raw)
  To: Richard Sandiford; +Cc: Hans-Peter Nilsson, gcc

On Dec 1, 2004, at 2:12 PM, Richard Sandiford wrote:
>> Is this acceptable for 4.0?
>
> ...would be "no".  The patch affects the linker too btw.

While we've not seen the patch, I'd like to ask for this to be reviewed 
and considered for 4.0.0.  We find SDK builds to be important, and we 
are changing them around now, and would like the dust to settle and use 
the one standard mechanism to do this.

If all we can do is to decide that isysroot isn't useful without the 
library changing aspect of it, and that it should be called -sysroot 
instead, then, please, let's do that now.

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 22:12 ` Richard Sandiford
  2004-12-01 22:27   ` Mike Stump
@ 2004-12-01 22:40   ` Hans-Peter Nilsson
  2004-12-01 22:47     ` Richard Sandiford
  1 sibling, 1 reply; 12+ messages in thread
From: Hans-Peter Nilsson @ 2004-12-01 22:40 UTC (permalink / raw)
  To: rsandifo; +Cc: gcc

> From: Richard Sandiford <rsandifo@redhat.com>
> Date: Wed, 01 Dec 2004 22:12:24 +0000

> Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
> > So, can we add --sysroot, to affect the search paths as the
> > configure-option --with-sysroot=... does, but as a compile-time
> > option.
> 
> FWIW, I have a patch to do this, but I've been sitting on it
> because I assumed the answer to this...

Wonderful! I don't have to do anything! :-)

> > Is this acceptable for 4.0?
> 
> ...would be "no".  The patch affects the linker too btw.

But surely only when the --sysroot option is given?

Brgds, H-P

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

* Re: RFC: Replace -isysroot with --sysroot?
  2004-12-01 22:40   ` Hans-Peter Nilsson
@ 2004-12-01 22:47     ` Richard Sandiford
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Sandiford @ 2004-12-01 22:47 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gcc

Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
>> > Is this acceptable for 4.0?
>> 
>> ...would be "no".  The patch affects the linker too btw.
>
> But surely only when the --sysroot option is given?

Right.  I meant: the patch adds the option to the linker too.

Richard

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

end of thread, other threads:[~2004-12-01 22:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 18:21 RFC: Replace -isysroot with --sysroot? Hans-Peter Nilsson
2004-12-01 20:27 ` Mike Stump
2004-12-01 20:43   ` Hans-Peter Nilsson
2004-12-01 20:51   ` Daniel Jacobowitz
2004-12-01 22:12     ` Mike Stump
2004-12-01 22:17       ` Daniel Jacobowitz
2004-12-01 21:34   ` Hans-Peter Nilsson
2004-12-01 21:53     ` Daniel Jacobowitz
2004-12-01 22:12 ` Richard Sandiford
2004-12-01 22:27   ` Mike Stump
2004-12-01 22:40   ` Hans-Peter Nilsson
2004-12-01 22:47     ` Richard Sandiford

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