From: Nikita Karetnikov <nikita@karetnikov.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: GFortran can’t find system headers
Date: Thu, 17 Oct 2013 16:59:53 +0400 [thread overview]
Message-ID: <87ppr4giie.fsf@karetnikov.org> (raw)
In-Reply-To: <87hacijnke.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 15 Oct 2013 22:17:53 +0200")
[-- Attachment #1.1: Type: text/plain, Size: 1344 bytes --]
> 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?
> 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. I’ve attached my version, how can I make it look
better?
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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: gcc.diff --]
[-- Type: text/x-diff, Size: 3620 bytes --]
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index cececca..46c4804 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -47,7 +47,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; TODO: Add `armel.*gnueabi', `hf', etc.
'())))
-(define-public gcc-4.7
+(define* (inherit-gcc name* version* source* #:key (languages '("c" "c++")))
(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")))
(if libc
(string-append "--with-native-system-header-dir=" libc
"/include")
@@ -88,15 +89,9 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(maybe-target-tools))))))
(package
- (name "gcc")
- (version "4.7.3")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gcc/gcc-"
- version "/gcc-" version ".tar.bz2"))
- (sha256
- (base32
- "1hx9h64ivarlzi4hxvq42as5m9vlr5cyzaaq4gzj4i619zmkfz1g"))))
+ (name name*)
+ (version version*)
+ (source source*)
(build-system gnu-build-system)
(inputs `(("gmp" ,gmp)
("mpfr" ,mpfr)
@@ -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"))))))
+
(define-public gcc-4.8
(package (inherit gcc-4.7)
(version "4.8.1")
@@ -211,6 +217,18 @@ Go. It also includes standard libraries for these languages.")
(base32
"04sqn0ds17ys8l6zn7vyyvjz1a7hsk4zb0381vlw9wnr7az48nsl"))))))
+(define-public gfortran-4.8
+ (let ((version "4.8.1"))
+ (inherit-gcc "gfortran" version
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-"
+ version "/gcc-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "04sqn0ds17ys8l6zn7vyyvjz1a7hsk4zb0381vlw9wnr7az48nsl")))
+ #:languages '("fortran"))))
+
(define-public isl
(package
(name "isl")
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2013-10-17 12:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 2:59 GFortran can’t find system headers Nikita Karetnikov
2013-10-15 20:17 ` Ludovic Courtès
2013-10-17 12:59 ` Nikita Karetnikov [this message]
2013-10-17 15:29 ` Ludovic Courtès
2013-10-19 8:58 ` GCC front-ends (was: GFortran can’t find system headers) Nikita Karetnikov
2013-10-26 20:08 ` GCC front-ends Ludovic Courtès
2013-10-27 10:39 ` Andreas Enge
2013-10-28 13:07 ` Ludovic Courtès
2013-10-29 8:39 ` Andreas Enge
2013-10-29 10:32 ` Ludovic Courtès
2013-10-28 23:23 ` Nikita Karetnikov
2013-10-28 23:23 ` Ludovic Courtès
2013-10-28 23:38 ` Nikita Karetnikov
2013-10-31 20:13 ` [PATCH] gnu: Add GCC front ends for Fortran, Go, Objective C, and Objective C++ Nikita Karetnikov
2013-10-31 22:19 ` Ludovic Courtès
2013-11-01 21:00 ` Nikita Karetnikov
2013-11-01 22:41 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppr4giie.fsf@karetnikov.org \
--to=nikita@karetnikov.org \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.