[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: enabling all supported languages in GCC
From: |
Ludovic Courtès |
Subject: |
Re: enabling all supported languages in GCC |
Date: |
Thu, 19 May 2016 15:10:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hello!
Ricardo Wurmus <address@hidden> skribis:
> 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.
This problem is specific to Objective C(++), no?
For Fortran, Ada, and Go(?), people run a command other than ‘gcc’, so I
guess these work fine.
Regardless, definitely worth fixing!
> 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.
I think the --enable-languages option will inevitable lead to building
all the front-ends and run-time support libraries, which is undesirable.
> * 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.
I haven’t checked, but I’m guessing we’ll have to manually tweak
lang-spec.h rather than use --enable-languages.
Thanks,
Ludo’.