summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolis Ragkousis <manolis837@gmail.com>2021-02-08 14:00:19 +0200
committerGuix Patches Tester <>2021-02-08 18:21:09 +0000
commit23414fe99ece25cc3a2b2a8a8126fb10e7092425 (patch)
treedb1ad3b27bda75d00f3500906ad6b104d54e18e1
parent4cd8bab7d4b345c5538b8d039d84a957df7a235f (diff)
downloadguix-patches-23414fe99ece25cc3a2b2a8a8126fb10e7092425.tar
guix-patches-23414fe99ece25cc3a2b2a8a8126fb10e7092425.tar.gz
gnu: gccgo: Add version 10.series-6899
* 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.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/gcc.scm21
-rw-r--r--gnu/packages/patches/gcc-10-libgo-runpath.patch16
3 files changed, 38 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index ae64a483b5..83c8478748 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1026,6 +1026,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 4d5aaa7070..3614b3cf26 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -786,6 +786,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 \