guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: Add fpc. (version 2)


From: Danny Milosavljevic
Subject: Re: [PATCH] gnu: Add fpc. (version 2)
Date: Mon, 5 Jun 2017 15:20:24 +0200

Hi,

to experiment, I tried this:

(define-module (wip pascal)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix hg-download)
  #:use-module (guix utils)
  #:use-module (guix build-system python)
  #:use-module (guix build-system gnu)
  #:use-module (guix gexp)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages pkg-config))

(define-public gpc
  (let ((base (custom-gccx gcc-4.7 "gpc" '("pascal"))))
    (package
      (inherit base)
      (name "gpc")
      (native-inputs
       `(("tar" ,tar)
; REQUIRED: bash, bzip2, GNU sed, GNU awk, GNU m4, bison (at least version 
2.0), flex (version 2.5.27), autoconf (version 2.12), texinfo (at least version 
4.2), help2man.
; ENV before configure:
;          FLEX=/path/to/flex
;          LEX=/path/to/flex
;          BISON=/path/to/bison
;          YACC=/path/to/bison
;          INTLBISON=/path/to/bison
         ("gpc"
          ,(origin
             (method url-fetch)
             (uri "http://www.gnu-pascal.de/alpha/gpc-20060325.tar.bz2";)
             (sha256
              (base32
               "1vadkpwm0087knb2lx48fk7mkv646ivwm84iy42qjw8z7svdrz8q"))))
          ,@(package-native-inputs base)))
      (arguments
       (substitute-keyword-arguments (package-arguments base)
        ((#:phases phases)
         `(modify-phases ,phases
           (add-after 'unpack 'unpack-submodule-sources
            (lambda* (#:key inputs #:allow-other-keys)
             (let ((unpack (lambda (source target)
                             (with-directory-excursion target
                               (zero? (system* "tar" "xvf"
                                               (assoc-ref inputs source)
                                               "--strip-components=1"))))))
              (unpack "gpc" "gcc")))))))))))

... and this ...

$ git diff gnu/packages/gcc.scm
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 866f8478f..8370a54c9 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -512,6 +512,8 @@ as the 'native-search-paths' field."
                                      ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc.*)"))
                #t))))))))
 
+(define-public custom-gccx custom-gcc)
+
 (define %generic-search-paths
   ;; This is the language-neutral search path for GCC.  Entries in $CPATH are
   ;; not considered "system headers", which means GCC can raise warnings for

... but it turns out that gpc patches gcc parts - and the most recent patch is 
for gcc 4.0.3 - which we don't carry.

The patch contains:
- Turns walk_subtrees off for functions (WTF).
- Adds debugging info for (bit)sets and array bounds with a floating-point 
expression (WTF).
- Adds support for bitstrings (latter is in gcc/stor-layout.c and used in 
gcc/expr.c).  (OK)
- ! static GTY(()) unsigned int tmp_var_id_num = 155419; (WTF)

It may be that these kinds of bitstrings are integrated in gcc proper already - 
I don't know.



reply via email to

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