guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC front-ends


From: Ludovic Courtès
Subject: Re: GCC front-ends
Date: Tue, 29 Oct 2013 00:23:58 +0100
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Nikita Karetnikov <address@hidden> skribis:

>> That’s a bug, which may have been fixed in 4.8.2 no?  I’d rather not
>> workaround that if it’s been/being fixed.
>
> No, it has not been fixed.  Well, the previous patch didn’t contain any
> workarounds.  However, users would have to pass ‘-g’ each time they
> decide to compile anything.  Otherwise, their binaries will not work.
> Can we do anything about it?

I’d say that it’s not our business (above all, I’m surprised the Go
front-end is this broken.)

>> So the mapping has to be done in builder-side code, not in host-side
>> code, like ‘gcc-cross-boot0’ does.
>
>> Something like:
>
>>   `(cons "--enable-languages=" ,(string-join languages ",")
>>          (remove (cut string-match "--enable-languages.*" <>) ,flags))
>
> (define (custom-gcc gcc name languages)
>   (package (inherit gcc)
>     (name name)
>     (arguments
>      (substitute-keyword-arguments (package-arguments gcc)
>        ((#:configure-flags flags)
>         `(cons "--enable-languages=" ,(string-join languages ",")
>                (remove (cut string-match "--enable-languages.*" <>)
>                        ,flags)))
>        ((#:modules _)
>         '((guix build gnu-build-system)
>           (guix build utils)
>           (srfi srfi-1)))))))
>
> (define-public gfortran-4.8
>   (custom-gcc gcc-4.8 "gfortran" '("fortran")))
>
> The above code fails.

Argh, you also need (srfi srfi-26) for ‘cut’, sorry about that.

HTH,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]