l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No luck with libc compilation - missing l4/arch.h file (?)


From: Marcus Brinkmann
Subject: Re: No luck with libc compilation - missing l4/arch.h file (?)
Date: Thu, 24 Feb 2005 09:37:39 +0100
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Thu, 24 Feb 2005 09:07:19 +0100,
Bas Wijnen <address@hidden> wrote:
> 
> [1  <multipart/signed (8bit)>]
> [1.1  <text/plain; UTF-8 (8bit)>]
> I was also compiling the libc things yesterday and got it working.  I
> just did ln -s /l4/include/* /usr/local/include, which isn't very nice,
> but acceptable to me (because there isn't much in /usr/local/include on
> my system anyway).  My program didn't use any hurd libs though, I guess
> I need more links to make them work.

Yeah, yeah, such hackery will work for now, I did this myself.  But if
you go that route, you need to know even more about black magic than
if you simply set up a proper cross compilation environment.  Just a
couple of points:

1. GCC must not insert direct TLS seg refs in the code ("%gs:OFFSET"
   with OFFSET anything but 0).  This is enabled by default on
   -linux-gnu, and even for -gnu without my patch. My patch disables
   it by default for -gnu.  I am not sure what code could generate
   such refs, though.  Maybe none at this time.

2. If you want to link static applications without the long ugly
   command line in the README, you must use a proper specs file and
   the right -B options etc to have gcc use and find the right crt
   files and libraries.  This is what the cheap-cross compiler we used
   for the Hurd on Mach does.  It's an interesting setup, but it
   requires a wrapper script and the specs file in place.

Of course, all this only applies if you start to do serious glibc
based development.  All of the current root servers don't use any of
that (they have their own crt files etc).  But then, why would you
bother compiling libc in the first place if you don't want to start
developing based on it? :)

> Anyway, I'm writing a walkthrough in the form of a script to get the
> thing running.  I'll probably post it soon (but not before FOSDEM).

Sure.  If you really want to get us ahead of where we have already
been a zillion times though, it would be nice if you could work out
how to get proper "make install-header" targets with automake, so that
we can have a clean and proper bootstrap procedure without dirty tricks.
It can't be much that is required to get this working properly.

> Marcus: please commit the patch that Dawid attached in his first e-mail,
> the README is confusing as it is (and wrong).

That has already happened.

> Also, there should be a
> note about linking the include and library files.

I hope I have made sufficiently clear why there should not be such a note.

Thanks,
Marcus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]