[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
enabling all supported languages in GCC
From: |
Ricardo Wurmus |
Subject: |
enabling all supported languages in GCC |
Date: |
Thu, 19 May 2016 10:20:30 +0200 |
User-agent: |
mu4e 0.9.13; emacs 24.5.1 |
Hi Guix,
we have some problems with GCC. Since the “gcc” executables produced by
the “custom-gcc” procedure did not provide a functioning “gcc” for C and
C++ one could not just install, say, “gfortran” into a profile and have
both a fortran compiler and a C compiler.
To fix this we added a phase to the “custom-gcc” to delete executables
such as “gcc” that are also provided by the C compiler, such that
installing “gfortran” would not break the C compiler.
Still, it is currently not possible to use GCC with languages other than
C or C++. Installing “gcc-objc” along with the regular GCC, for
example, you won’t get a working compiler for Objective C as the default
GCC’s “gcc” binary does not know about the Objective C language. Even
setting COMPILER_PATH to point at the tools for the Objective C compiler
won’t fix this.
I propose this:
* enable all languages in GCC by default so that their “lang-spec.h”
headers are included. This does not mean we should build all language
frontends. We only want to ensure that the “gcc” won’t refuse to
compile something just because it doesn’t know about the language.
* when installing “gcc”, set COMPILER_PATH to use additional languages.
I don’t know if this is feasible or if there’s a different way to
achieve this. It may even be enough to patch GCC’s “gcc/Makefile.in”
such that “lang_specs_files” holds the names of all supported languages,
which will ensure that all available “lang-spec.h” files end up being
included.
If you have other ideas for fixing GCC for languages other than C and
C++ please do comment.
~~ Ricardo
- enabling all supported languages in GCC,
Ricardo Wurmus <=