all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: manolis837@gmail.com
To: 46380@debbugs.gnu.org
Cc: Manolis Ragkousis <manolis837@gmail.com>
Subject: [bug#46380] [PATCH] gnu: gccgo: Add version 10.
Date: Mon,  8 Feb 2021 14:00:19 +0200	[thread overview]
Message-ID: <20210208120019.2946404-1-manolis837@gmail.com> (raw)

From: Manolis Ragkousis <manolis837@gmail.com>

* gnu/packages/patches/gcc-10-libgo-runpath.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/gcc.scm (gccgo-10): New package.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/gcc.scm                          | 21 +++++++++++++++++++
 .../patches/gcc-10-libgo-runpath.patch        | 16 ++++++++++++++
 3 files changed, 38 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-10-libgo-runpath.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f908f51074..302d3e2aa8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1030,6 +1030,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gcc-6-fix-buffer-size.patch	\
   %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch	\
   %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch	\
+  %D%/packages/patches/gcc-10-libgo-runpath.patch		\
   %D%/packages/patches/gcc-libvtv-runpath.patch			\
   %D%/packages/patches/gcc-strmov-store-file-names.patch	\
   %D%/packages/patches/gcc-4-compile-with-gcc-5.patch		 \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 9b2a5556f6..d113cce2da 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -773,6 +773,27 @@ provides the GNU compiler for the Go programming language."))
               ;; a cyclic dependency.  <http://debbugs.gnu.org/18101>
               #:separate-lib-output? #f))
 
+(define-public gccgo-10
+  (custom-gcc (package
+                (inherit gcc-10)
+                (source
+                 (origin
+                   (inherit (package-source gcc-10))
+                   (patches
+                    (append
+                     (origin-patches (package-source gcc-10))
+                     (search-patches "gcc-10-libgo-runpath.patch")))))
+                (synopsis "Go frontend to GCC")
+                (description
+                 "This package is part of the GNU Compiler Collection and
+provides the GNU compiler for the Go programming language."))
+              "gccgo" '("go")
+              %generic-search-paths
+              ;; Suppress the separate "lib" output, because otherwise the
+              ;; "lib" and "out" outputs would refer to each other, creating
+              ;; a cyclic dependency.  <http://debbugs.gnu.org/18101>
+              #:separate-lib-output? #f))
+
 (define %objc-search-paths
   (list (search-path-specification
          (variable "OBJC_INCLUDE_PATH")
diff --git a/gnu/packages/patches/gcc-10-libgo-runpath.patch b/gnu/packages/patches/gcc-10-libgo-runpath.patch
new file mode 100644
index 0000000000..bf89d7b6d4
--- /dev/null
+++ b/gnu/packages/patches/gcc-10-libgo-runpath.patch
@@ -0,0 +1,16 @@
+gccgo needs libgo but it doesn't have $libdir in its RUNPATH.  This
+patch fixes that.
+
+diff --git a/libgo/Makefile.in b/libgo/Makefile.in
+index b835173585..64e45360aa 100644
+--- a/libgo/Makefile.in
++++ b/libgo/Makefile.in
+@@ -22,6 +22,8 @@
+ 
+ # Process this file with autoreconf to produce Makefile.in.
+ 
++libgo_llgo_la_LDFLAGS = -Wl,-rpath=$(libdir)
++
+ VPATH = @srcdir@
+ am__is_gnu_make = { \
+   if test -z '$(MAKELEVEL)'; then \
-- 
2.30.0





             reply	other threads:[~2021-02-08 18:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 12:00 manolis837 [this message]
2021-08-05 23:14 ` bug#46380: [PATCH] gnu: gccgo: Add version 10 Sarah Morgensen

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=20210208120019.2946404-1-manolis837@gmail.com \
    --to=manolis837@gmail.com \
    --cc=46380@debbugs.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.