This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] missing #ifndef inhibit_libc in gcc/config/rs6000/linux.h
On Tue, Oct 28, 2003 at 03:55:22PM -0800, Richard Henderson wrote:
> On Tue, Oct 28, 2003 at 05:48:18PM -0500, dank@kegel.com wrote:
> > > On Tuesday 28 October 2003 22:21, Dan Kegel wrote:
> > >>> Hmm, in my eyes this patch just makes it easier to build broken
> > >>> cross compilers and we shouldn't do that. There are proper linux
> > >>> cross build instructions on the web, eg.
> > >>> http://kegel.com/crosstool/, that don't use and need inhibit_libc
> > >>> IIRC.
> > >>
> > >> inhibit_libc isn't a hack per se; it's an internal part of the
> > >> implementation of --without-headers and --with-newlib. Perhaps the
> > >> proposed patch
> > >> solves a problem even for users who are simply setting
> > >> --without-headers and/or --with-newlib?
> > >>
> > >> See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8180 ...
> > >
> > > You are right, it is not a hack per se, but I consider it a hack if you
> > > use it on _linux_. As you know building a proper linux toolchain from
> > > scratch requires a proper procedure if you don't want to end up with
> > > subtle ABI differences. The linux headers (kernel and glibc) are freely
> > > available and I see no use in avoiding them, just to end up with a
> > > compiler that isn't a fully compatible linux platform compiler.
> > Sadly, in order to build a proper Linux toolchain, inhibit_libc
> > is absolutely required, even on Linux. This is because you have
> > to first build a bootstrap compiler without glibc.
>
> This is a lie. The glibc "make install-headers" works without
> a target compiler. You have to have *some* compiler, to do some
> amount of preprocessing, but it'll happily work with the native
> compiler.
>
> I did this not two minutes ago.
The trick that you may be missing, Dan, is that you need to have a
_sufficiently recent_ compiler on the host; or else you need to patch
glibc's configure script. You can't do it without any compiler because
of some stupid autoconf CPP sanity check, and because it explicitly
checks the versions, but a native gcc 3.3.1 works perfectly fine.
I think you also need a recent compiler because of one of the -M
options used in generating stdio_lim.h.dT.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer