Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Aug 2000 06:02:15 +0200
From:      Farid Hajji <farid.hajji@ob.kamp.net>
To:        hackers@freebsd.org
Subject:   Moving FreeBSD towards glibc (or: FreeBSD and Hurd/Mach)
Message-ID:  <200008260402.e7Q42FV29123@mail-ob.kamp.net>

next in thread | raw e-mail | index | archive | help
Hello,

[please Cc: to me, since I'm not subscribed to this list. Thanks]

are there plans to replace FreeBSD's libc with GNU glibc in the near
or medium future? Linux moved also from it's own libc5 to glibc (=libc6)
some time ago and it may be useful to do the same in FreeBSD too.

The reason I'm asking this is to investigate further, wether the Hurd
can be dropped into a FreeBSD system as an alternative to the current
FreeBSD kernel.

As you probably know, Keio University and NTT provide a RT-Mach/Lites
package that can be installed into a FreeBSD 2.2.8 system and which,
when booted, provides binary compatibility with the means of the system
call redirection feature of Mach. Such a system feels like an original
FreeBSD system and is a good development platform for Mach programming.

The Lites server used by RT-Mach is a user-land single OS-Server that
contains most of the 4.4 BSD-Lite code to emulate a *BSD kernel. It is
still monolithic in the sense that it is a single task with multiple
threads.

As opposed to the single-OS Server Lites, the Hurd is a set of
OS-Servers that run on top of Mach and that seek to replace Unix. They
actually provide Unix API compatibility through the current version of
glibc which translates Unix calls into (mainly) RPCs to the
appropriate Hurd servers.

The Hurd is still under development but is already working reasonably
well for development purposes. Actually, people at Debian are trying
to put up a debian-style distribution of GNU/Hurd, that will resemble
Debian/Linux. Once such a systems is ready, Hurd-0.3 will be released.

As FreeBSD user, I strongly dislike the debian style currently favorized
but there is not much that can be done against it. What I'm trying to do,
is to figure out how to add binary compatibility to the Hurd in the same
way than is done with RT-Mach/Lites, so that ultimatly, the Hurd/Mach
can be added as an alternative kernel to a current FreeBSD distribution.

This is one way how the Hurd can be installed in a FreeBSD distribution:

1. Replace libc with glibc and create a glibc-based FreeBSD distribution.
   The Hurd/Glibc/Mach can now be compiled like a regular FreeBSD port
   and installed in a subdirectory somewhere (say: /usr/local/hurd).
   Rebooting the Mach kernel would load the Hurd servers first and
   would then invoke the regular FreeBSD rc scripts. Each FreeBSD binary
   that is linked against FreeBSD glibc would now be transparently
   relinked against the Hurd's glibc, which would call the servers and
   Mach in appropriate ways. Other libs [that don't contain traps]
   can be used unchanged.

2. Statically linked binaries and other binaries (like Linux etc...)
   would need more work to be supported. There, the syscall redirection
   mechanism of Mach would still be needed. Should this mechanism be
   implemented in the Hurd, providing binary compatibility to FreeBSD
   could be possible, even without having to move FreeBSD to glibc
   in the first place. An easier and probably faster way would be to
   provide specially compiled versions of those static programs that
   would be used instead of the FreeBSD ones while running the Hurd.

   Yet having the possibility to transparently link FreeBSD binaries
   against the Hurd's glibc instead of the hypothetical FreeBSD glibc
   would have the enormous advantage to reduce the syscall overhead
   that is induced by the syscall redirection facility.

What would you suggest?

-Farid.

-- 
Farid Hajji -- Unix Systems and Network Admin | Phone: +49-2131-67-555
Broicherdorfstr. 83, D-41564 Kaarst, Germany  | farid.hajji@ob.kamp.net
- - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -
Murphy's Law fails only when you try to demonstrate it, and thus succeeds.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008260402.e7Q42FV29123>