Re: Remakeing 4.10 kernel using GCC 4.1

From: Philip Paeps (philip+usenet_at_paeps.cx)
Date: 11/08/05


Date: 8 Nov 2005 22:05:33 GMT

The Doctor <doctor@doctor.nl2k.ab.ca> wrote:
> Subject: Re: Remakeing 4.10 kernel using GCC 4.1

What makes you believe that this should work?

Unlike Linux, FreeBSD is a complete operating system, not just a kernel. The
FreeBSD kernel and indeed the rest of the operating system are not expected to
compile using any toolchain other than the one provided by the project.

Of course, you're free to *use* any other compiler you like on FreeBSD, and it
will probably work too (certainly if installed using the ports tree), but you
shouldn't expect to be able to build FreeBSD itself using a toolchain other
than the one that comes with the system.

Some efforts have been made to make FreeBSD buildable using ICC on x86, but
I'm not sure how successful these efforts have been, or indeed if they are
still alive.

> I run into this in the make depend:
> cc1: error: unrecognized command line option "-fformat-extensions"
> *** Error code 1
>
> Stop in /usr/src/sys/compile/LOCAL.
> -su-2.05b#
>
> How do I get rid of -fformat-extensions ?

By applying one of the many, many patches FreeBSD developers have made to the
gcc compiler. The patch will probably also need modifying to work on the
specific gcc version you're trying to use, and it will most certainly not be
the only patch you need to apply in order to build a FreeBSD kernel with it.

...and even if you get a kernel to build, chances are very slim that it will
boot or run properly without making even more modifications to the compiler
and the rest of the toolchain.

Briefly: you can use GCC 4.1 from the ports for your own development to your
heart's content, and it will work just fine, but building FreeBSD with it,
will cause much more pain than it's worth.

I'm sure GCC 4.1 will make its way to the FreeBSD base-system in due time.
That is, when the toolchain maintainers get around to making the huge effort
it takes to get FreeBSD to build with it. If you want to expedite the
process, I'm sure they'll be happy to hear from you!

 - Philip

-- 
Philip Paeps                              Please don't email any replies
philip@paeps.cx                               I follow the newsgroup.
  If your next pot of chili tastes better, it probably is
  because of something left out, rather than added.


Relevant Pages

  • Re: FreeBSD DRIVER DEVELOPMENT
    ... FreeBSD 4stable uses GCC 2.94.4 There are lots of good IDEs and tools in the ... AFAIK this is something that is not really possible on any operating system. ...
    (freebsd-questions)
  • Re: sun4v arch
    ... level architectural and implementation details of the FreeBSD kernel ... of FreeBSD 5.2" and "FreeBSD Architecture Handbook". ... Is the documentation at http://www.opensparc.net/opensparc-t1/index.html ...
    (freebsd-current)
  • Re: sun4v arch
    ... level architectural and implementation details of the FreeBSD kernel ... of FreeBSD 5.2" and "FreeBSD Architecture Handbook". ... Is the documentation at http://www.opensparc.net/opensparc-t1/index.html ...
    (freebsd-hackers)
  • Re: sun4v arch
    ... level architectural and implementation details of the FreeBSD kernel ... of FreeBSD 5.2" and "FreeBSD Architecture Handbook". ... Is the documentation at http://www.opensparc.net/opensparc-t1/index.html ...
    (freebsd-stable)
  • Is there a tool to create FFS with Linux or a bootloader which can boot from floppy images on harddi
    ... I'm pretty sure that I've read of FreeBSD ... GRUB should be able to boot FreeBSD kernel directly. ...
    (comp.os.linux.misc)