• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved Why does FreeBSD source code include a /gnu directory?

Kais Ben Salah

New Member


Messages: 2

#1
While I was browsing source code of the master FreeBSD repository, I noticed a /gnu directory containing a clone of various tools from the GNU Project (such as gcc, gperf, gdb, binutils ..). This seems little weird since GCC support (and the dependency on GNU toolchain) has been replaced from a while by LLVM. Also, it sounds unnecessary to include the source code of the used toolchain on the OS project (Linux doesn't do that for example).

Why the /gnu directory is still on FreeBSD's main source code repository?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,492
Messages: 25,656

#2

sidetone

Aspiring Daemon

Thanks: 213
Messages: 762

#3
While I was browsing source code of the master FreeBSD repository, I noticed a /gnu directory containing a clone of various tools from the GNU Project (such as gcc, gperf, gdb, binutils ..). This seems little weird since GCC support (and the dependency on GNU toolchain) has been replaced from a while by LLVM.
GNU's toolchain is not fully replaced by LLVM yet. All of LLVM's binutil replacements or (BSD's implementation of) elfutils don't yet compile the full base system and kernel. Most of them, however, compile most ports. It seems like they are working on it for FreeBSD current.

They also have programs in base, that are needed for some ports, like Groff for documentation. It's kind of redundant, since many GNU ports want to download bloated megabytes of gettext and jadetex dependencies to get a few kilobytes of documentation.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,492
Messages: 25,656

#4
Also note that some other architectures still require GCC (MIPS? Forgot which ones exactly). So it cannot be completely removed until every supported architecture can be build using LLVM.