public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Wrapper cross-compiler does not work anymore with gcc-3.3
@ 2004-06-27 16:19 Santiago Vila
  2004-06-29  0:51 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Santiago Vila @ 2004-06-27 16:19 UTC (permalink / raw)
  To: gcc-bugs

Hello.

There is a Debian package called gcc-i386-gnu which is a cross-compiler
for i386-gnu (i.e. the Hurd). This package is created by a script
called make-cross, written by Gordon Matzigkeit, and it's basically a
shell wrapper around the "normal" gcc installed in the system. In fact,
at the end of the script, it does something like this:

exec /usr/bin/gcc-3.2 -b i386-gnu -nostdinc \
        $gpp_args -isystem /usr/lib/gcc-lib/i386-gnu/3.2.3/include \
        -isystem /usr/i386-gnu/include \
        ${1+"$@"} $rpath_link

The problem: This trick does not work anymore with gcc-3.3.
It tries to execute /usr/bin/i386-gnu-gcc-3.3.3, which does not exist.
[ There is a small discussion about this in http://bugs.debian,org/236456 ]

I'm not sure whether or not I should consider this as a bug in gcc,
for breaking this wrapper script. In either case, what I would like to
know is:

Is there still a way to make a cheap cross-compiler by wrapping gcc,
or should I consider this method "no longer supported"?

Thanks.


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

* Re: Wrapper cross-compiler does not work anymore with gcc-3.3
  2004-06-27 16:19 Wrapper cross-compiler does not work anymore with gcc-3.3 Santiago Vila
@ 2004-06-29  0:51 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2004-06-29  0:51 UTC (permalink / raw)
  To: Santiago Vila; +Cc: gcc-bugs

Santiago Vila wrote:
> exec /usr/bin/gcc-3.2 -b i386-gnu -nostdinc \
>         $gpp_args -isystem /usr/lib/gcc-lib/i386-gnu/3.2.3/include \
>         -isystem /usr/i386-gnu/include \
>         ${1+"$@"} $rpath_link

The behaviour of the -b and -V options were changed because they were 
never reliable.  They happened to work for some people in some cases, 
but they never worked for everyone in all cases.  This has been a 
continual source of problems ever since the options were added.  This is 
because different gcc targets/versions can have subtly different gcc 
drivers and/or driver/cc1 interfaces, and if you aren't using the right 
driver/cc1 pair bad things can happen.

The new implementation of the -b and -V options solves this problem by 
invoking the correct gcc driver directly instead of just invoking cc1. 
The -b and -V options are now reliable, and will work for everyone in 
all cases.  This does mean now that you have to have the alternate gcc 
driver, whereas before you didn't need it.  This also means that you 
might need to create a link so that gcc can find the alternative gcc 
driver.  This is the only way that we can guarantee that the -b and -V 
options will work correctly.

The old behaviour is unlikely to be re-added, because it was never safe 
to use it.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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

end of thread, other threads:[~2004-06-29  0:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-27 16:19 Wrapper cross-compiler does not work anymore with gcc-3.3 Santiago Vila
2004-06-29  0:51 ` Jim Wilson

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