guix-devel
[Top][All Lists]
Advanced

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

Re: GCC front-ends


From: Nikita Karetnikov
Subject: Re: GCC front-ends
Date: Tue, 29 Oct 2013 03:23:28 +0400

> 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?

> GNAT and GCJ are definitely trickier, so I’d suggest to leave them for now.

OK.

> 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.

Backtrace:
In ice-9/boot-9.scm:
 157: 14 [catch #t #<catch-closure 8ab5bf0> ...]
In unknown file:
   ?: 13 [apply-smob/1 #<catch-closure 8ab5bf0>]
In ice-9/boot-9.scm:
  63: 12 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 11 [eval # #]
In ice-9/boot-9.scm:
2320: 10 [save-module-excursion #<procedure 8acdde0 at ice-9/boot-9.scm:3961:3 
()>]
3966: 9 [#<procedure 8acdde0 at ice-9/boot-9.scm:3961:3 ()>]
1645: 8 [%start-stack load-stack ...]
1650: 7 [#<procedure 8ad0df8 ()>]
In unknown file:
   ?: 6 [primitive-load 
"/nix/store/m8axi2v9cbj2s0kfpifxp874sxplwwwg-gfortran-4.8.2-guile-builder"]
In ice-9/eval.scm:
 387: 5 [eval # ()]
 387: 4 [eval # ()]
 387: 3 [eval # ()]
 386: 2 [eval # ()]
 393: 1 [eval #<memoized remove> ()]
In unknown file:
   ?: 0 [memoize-variable-access! #<memoized remove> #<directory # 8a43630>]

ERROR: In procedure memoize-variable-access!:
ERROR: Unbound variable: remove

Attachment: pgpzQCeC_vEpk.pgp
Description: PGP signature


reply via email to

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