[Nix-dev] gcc on steroids

Lluís Batlle viriketo at gmail.com
Tue Dec 22 00:01:55 CET 2009


Hello,

I've been doing some additions related to gcc in stdenv-updates
recently. Most important:
- I enabled gnat-gcc, the gcc Ada compiler. Buildable through the
gcc-4.4 expression, bootstrapping from binary files the gentoo people
very kindly prepared (gnatboot expression in nixpkgs).
- I enabled ghdl, a gcc vhdl compiler written in Ada. This is not
distributed by the gcc people, but an addition a kind person writes
and publishes.

Ada is a first-class gcc language (like C or C++), and I think vhdl
too, through ghdl. As this, they have some interesting peculiarities
for nix:
- They provide a 'gcc' binary capable of understanding ada or vhdl. It
is not only about a binary with a new binary. This can provide
conflict with people wanting ghdl and gnat and gcc (C compiler) at
once in the profile.
- Each 'gcc' binary from gnat or ghdl needs the proper wrappers to
get, at least, access to the startfiles in glibc (crt?.o).
- Gnat programs (gnatmake, gnatlink, ...) require special wrappers,
not simply that of gcc.

By now, in order to get first working derivations, I have copied the
gcc-wrapper directory to gnat-directory and ghdl-directory, and
modified the peculiarities there. The 'diff' from the parent
gcc-wrapper should clarify.

I think that we should end up having one single gcc-wrapper, capable
of wrapping gnat, vhdl, gcc, g++, fortran, ...
Nevertheless, I can't say I can test much gnat. I can test these days
the vhdl compiler (I have a job on that until February). If anyone
wants to test gnat, perfect. Being able to build ghdl, and maybe gnat
again, look like good tests anyway.

As an additional concern, we are relying in the gentoo gnat prebuilt
binaries to bootstrap the ada compiler. I can try to make our own
'gnat-bootstrap-files'. I imagine you don't want it in the usual
bootstrap-files. Do you? :)  Do you think we should stop using the
gentoo gnat binary soon? I don't see much urgency here.

I also had to write some patches to make their build systems cope with
the store and the derivations. I will try to care pushing that
upstream.

If anyone feels any interest in this, please let know.
Regards,
Lluís.

PS: Please, don't ask me to get cross-built vhdl programs.



More information about the nix-dev mailing list