From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: Add fpc. (version 2) Date: Mon, 05 Jun 2017 21:55:50 +0200 Message-ID: <87vaoaryyh.fsf@elephly.net> References: <87poj9xwzp.fsf@openmailbox.org> <87lgtxxial.fsf@openmailbox.org> <87efzpxfxh.fsf@openmailbox.org> <87a8adxct0.fsf@openmailbox.org> <20170314224527.7bee1241@scratchpost.org> <87mvcfg1nv.fsf@elephly.net> <20170605152024.732db174@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHy6m-0004Hb-1Z for guix-devel@gnu.org; Mon, 05 Jun 2017 15:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHy6i-0003Y1-OJ for guix-devel@gnu.org; Mon, 05 Jun 2017 15:56:12 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21079) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHy6i-0003WV-G6 for guix-devel@gnu.org; Mon, 05 Jun 2017 15:56:08 -0400 In-reply-to: <20170605152024.732db174@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org Danny Milosavljevic 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 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