From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: enabling all supported languages in GCC Date: Thu, 19 May 2016 10:20:30 +0200 Message-ID: <87eg8yihm9.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3JCF-0000FO-Hr for guix-devel@gnu.org; Thu, 19 May 2016 04:20:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3JCC-0000UK-9s for guix-devel@gnu.org; Thu, 19 May 2016 04:20:43 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:24721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3JCC-0000U0-1H for guix-devel@gnu.org; Thu, 19 May 2016 04:20:40 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Guix-devel 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