[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GFortran can’t find system headers
From: |
Ludovic Courtès |
Subject: |
Re: GFortran can’t find system headers |
Date: |
Thu, 17 Oct 2013 17:29:34 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Nikita Karetnikov <address@hidden> skribis:
>> Instead, what should do is preserve the arguments; the value associated
>> with #:configure-flags should be changed to replace any
>> --enable-languages=.* flag with yours. See ‘gcc-boot0’ in base.scm for
>> how to do that.
>
> Are you talking about the ‘substitute-keyword-arguments’ part?
Yes.
>> Alternately, you could turn the current ‘gcc-4.8’ definition into a
>> ‘make-gcc-4.8’ procedure like this:
>
>> (define* (make-gcc-4.8 #:key languages)
>> (package
>> ...
>
>> #:configure-flags ... ,(string-join languages ",")
>
>> ...))
>
>> (define gcc-4.8
>> (make-gcc-4.8 #:languages '("c" "c++")))
>
>> That would probably be easier to work with.
>
> I don’t like the above version because it doesn’t allow to choose the
> version of GCC.
Just add a ‘gcc’ parameter.
> Also, ‘/nix/store/nxpzxlvg5z5qq10wzxrzk9hjyhxyicxq-gfortran-4.8.1/bin’
> contains these programs:
>
> c++ gcc-ranlib i686-pc-linux-gnu-gcc-4.8.1
> cpp gcov i686-pc-linux-gnu-gcc-ar
> g++ gfortran i686-pc-linux-gnu-gcc-nm
> gcc i686-pc-linux-gnu-c++ i686-pc-linux-gnu-gcc-ranlib
> gcc-ar i686-pc-linux-gnu-g++ i686-pc-linux-gnu-gfortran
> gcc-nm i686-pc-linux-gnu-gcc
>
> Are C++ and C-related programs supposed to be there?
Yes, the C and C++ front-ends are always compiled.
> -(define-public gcc-4.7
> +(define* (inherit-gcc name* version* source* #:key (languages '("c" "c++")))
I would really ‘make-gcc’, or maybe ‘custom-gcc’.
Good news: the stars in these parameter names are no longer needed
(commit 59fbeb8).
> (let* ((stripped? #t) ; TODO: make this a
> parameter
> (maybe-target-tools
> (lambda ()
> @@ -68,13 +68,14 @@ where the OS part is overloaded to denote a specific
> ABI---into GCC
> ;; contents of (maybe-target-tools).
> (list 'quasiquote
> (append
> - '("--enable-plugin"
> - "--enable-languages=c,c++"
> + `("--enable-plugin"
> + ,(string-append "--enable-languages="
> + (string-join languages ","))
> "--disable-multilib"
>
> - "--with-local-prefix=/no-gcc-local-prefix"
> + "--with-local-prefix=/no-gcc-local-prefix")
>
> - ,(let ((libc (assoc-ref %build-inputs "libc")))
> + '(,(let ((libc (assoc-ref %build-inputs "libc")))
I guess this line shouldn’t have changed.
> @@ -200,6 +195,17 @@ Go. It also includes standard libraries for these
> languages.")
> (license gpl3+)
> (home-page "http://gcc.gnu.org/"))))
>
> +(define-public gcc-4.7
> + (let ((version "4.7.3"))
> + (inherit-gcc "gcc" version
> + (origin
> + (method url-fetch)
> + (uri (string-append "mirror://gnu/gcc/gcc-"
> + version "/gcc-" version ".tar.bz2"))
> + (sha256
> + (base32
> +
> "1hx9h64ivarlzi4hxvq42as5m9vlr5cyzaaq4gzj4i619zmkfz1g"))))))
I guess this triggers a complete rebuild, right? (That means it would
go in ‘core-updates’.)
Using the ‘substitute-keyword-arguments’ hack as in base.scm would allow
you to avoid that.
Also, the ‘origin’ thing should be factorized:
(define (gcc-source version)
(origin ...))
It’s good that you’re tackling this! Then we can also build the
Objective-C front-end, and then start GNUstepping.
Thanks,
Ludo’.
- GFortran can’t find system headers, Nikita Karetnikov, 2013/10/14
- Re: GFortran can’t find system headers, Ludovic Courtès, 2013/10/15
- Re: GFortran can’t find system headers, Nikita Karetnikov, 2013/10/17
- Re: GFortran can’t find system headers,
Ludovic Courtès <=
- GCC front-ends (was: GFortran can’t find system headers), Nikita Karetnikov, 2013/10/19
- Re: GCC front-ends, Ludovic Courtès, 2013/10/26
- Re: GCC front-ends, Andreas Enge, 2013/10/27
- Re: GCC front-ends, Ludovic Courtès, 2013/10/28
- Re: GCC front-ends, Andreas Enge, 2013/10/29
- Re: GCC front-ends, Ludovic Courtès, 2013/10/29
- Re: GCC front-ends, Nikita Karetnikov, 2013/10/28
- Re: GCC front-ends, Ludovic Courtès, 2013/10/28
- Re: GCC front-ends, Nikita Karetnikov, 2013/10/28
- [PATCH] gnu: Add GCC front ends for Fortran, Go, Objective C, and Objective C++., Nikita Karetnikov, 2013/10/31