> I can generally build a kernel with EGCS, if I change how the .text and
> .data are laid out for initialized data.  It seems that the initialization
> code makes assumptions about the order or layout of the initialization
> data.  Once the stuff is made to act more like the version of GCC that
> FreeBSD uses, the kernel will most often build and work.

It really does appear to be a simple matter of first making egcs "take over"
the system compiler:

# cd /usr/ports/lang/egcs
# make all install PREFIX=/usr
# ln -fs /usr/bin/eg++ /usr/bin/c++
# ln -fs /usr/bin/egcc /usr/bin/cc
# cd /usr/src
remove cc from /usr/src/gnu/usr.bin/Makefile SUBDIR list
remove libstdc++ and libobjc from /usr/src/gnu/lib/Makefile SUBDIR list

Then make the world and the kernel.  I also haven't noticed that the
executables are any smaller or larger either way, and I've captured a
fair amount of "cc -v" output to ensure that egcs is, in fact, the
compiler being used. :)

- Jordan


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to