unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* enabling all supported languages in GCC
@ 2016-05-19  8:20 Ricardo Wurmus
  2016-05-19 13:10 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2016-05-19  8:20 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: enabling all supported languages in GCC
  2016-05-19  8:20 enabling all supported languages in GCC Ricardo Wurmus
@ 2016-05-19 13:10 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-05-19 13:10 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

Hello!

Ricardo Wurmus <rekado@elephly.net> 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’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-19 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19  8:20 enabling all supported languages in GCC Ricardo Wurmus
2016-05-19 13:10 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).