Danny Milosavljevic <dan...@scratchpost.org> writes: > ... 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.
Actually, the most recent patch is for 4.3, which is why I’ve packaged gcc-4.3: --8<---------------cut here---------------start------------->8--- commit cd40a5a8cf241dd5a7944f93296d6e8c71c072b0 Author: Ricardo Wurmus <rek...@elephly.net> Date: Sat Oct 15 14:55:36 2016 +0200 WIP gcc-4.3 for gcp for freepascal bootstrap diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 866f8478f..810f58174 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -342,6 +342,39 @@ Go. It also includes runtime support libraries for these languages.") (license gpl3+) (home-page "https://gcc.gnu.org/")))) +;; The GNU Pascal compiler gpc inherits from this package. +(define-public gcc-4.3 + (package (inherit gcc-4.7) + (version "4.3.5") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "0svy81i6yfm1r5jydmylv5djrd9wc3ishsx1rx8ckgcxqd2ygihh")))) + (arguments + (substitute-keyword-arguments (package-arguments gcc-4.7) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'pre-configure 'modernize + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; FIXME: this is a hack needed to be able to reuse the build + ;; phases of gcc-4.7. + (mkdir-p "libstdc++-v3/python/") + (zero? (system* "touch" "libstdc++-v3/python/Makefile.in")) + + ;; This is to avoid searching for headers in the libc package's + ;; "/usr/include" directory. + (let ((libc (assoc-ref %build-inputs "libc"))) + (substitute* '("gcc/configure" + "gcc/Makefile.in") + (("/usr/include") + (string-append libc "/include")))) + #t)))))) + ;; Use older texinfo because it's more tolerant + (native-inputs `(("texinfo" ,texinfo-4))))) + (define-public gcc-4.8 (package (inherit gcc-4.7) (version "4.8.5") --8<---------------cut here---------------end--------------->8--- I took the GCC diff from https://github.com/hebisch/gpc.git, which is the main author’s repository. I almost got GPC to build, but it fails some time during stage 2 or so IIRC. The error did not seem to be a problem with GPC itself, but with how we do things in Guix. I don’t have my branch in order right now, but if you’re interested I could share a bit more of my work. (I started this only because I also wanted to package Hedgewars.) -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net