Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
From 525f3a42d474303b2222dab3d2e0e1af7431c5b3 Mon Sep 17 00:00:00 2001 | ||
From: Jacco Ligthart <jacco@redsleeve.org> | ||
Date: Sun, 30 Jun 2019 21:14:23 +0200 | ||
Subject: [PATCH] patched for and enabled gcc-go | ||
|
||
--- | ||
SOURCES/gcc8-progbits-arm.patch | 17 +++++++++++++++++ | ||
SPECS/gcc.spec | 11 +++++++++-- | ||
2 files changed, 26 insertions(+), 2 deletions(-) | ||
create mode 100644 SOURCES/gcc8-progbits-arm.patch | ||
|
||
diff --git a/SOURCES/gcc8-progbits-arm.patch b/SOURCES/gcc8-progbits-arm.patch | ||
new file mode 100644 | ||
index 0000000..ab8c749 | ||
--- /dev/null | ||
+++ b/SOURCES/gcc8-progbits-arm.patch | ||
@@ -0,0 +1,17 @@ | ||
+--- libgo/go/cmd/go/internal/work/buildid.go (revision 264245) | ||
++++ libgo/go/cmd/go/internal/work/buildid.go (working copy) | ||
+@@ -337,8 +337,12 @@ func (b *Builder) gccgoBuildIDELFFile(a | ||
+ } | ||
+ fmt.Fprintf(&buf, "\n") | ||
+ if cfg.Goos != "solaris" { | ||
+- fmt.Fprintf(&buf, "\t"+`.section .note.GNU-stack,"",@progbits`+"\n") | ||
+- fmt.Fprintf(&buf, "\t"+`.section .note.GNU-split-stack,"",@progbits`+"\n") | ||
++ secType := "@progbits" | ||
++ if cfg.Goarch == "arm" { | ||
++ secType = "%progbits" | ||
++ } | ||
++ fmt.Fprintf(&buf, "\t"+`.section .note.GNU-stack,"",%s`+"\n", secType) | ||
++ fmt.Fprintf(&buf, "\t"+`.section .note.GNU-split-stack,"",%s`+"\n", secType) | ||
+ } | ||
+ | ||
+ if cfg.BuildN || cfg.BuildX { | ||
diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec | ||
index b727508..1925fc7 100644 | ||
--- a/SPECS/gcc.spec | ||
+++ b/SPECS/gcc.spec | ||
@@ -17,7 +17,7 @@ | ||
%if 0%{?rhel} > 7 | ||
%global build_ada 0 | ||
%global build_objc 0 | ||
-%global build_go 0 | ||
+%global build_go 1 | ||
%global build_libgccjit 0 | ||
%else | ||
%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 | ||
@@ -104,7 +104,7 @@ | ||
Summary: Various compilers (C, C++, Objective-C, ...) | ||
Name: gcc | ||
Version: %{gcc_version} | ||
-Release: %{gcc_release}.5%{?dist} | ||
+Release: %{gcc_release}.5%{?dist}.redsleeve | ||
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have | ||
# GCC Runtime Exception. | ||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD | ||
@@ -283,6 +283,7 @@ Patch1000: nvptx-tools-no-ptxas.patch | ||
Patch1001: nvptx-tools-build.patch | ||
Patch1002: nvptx-tools-glibc.patch | ||
|
||
+Patch10000: gcc8-progbits-arm.patch | ||
|
||
# On ARM EABI systems, we do want -gnueabi to be part of the | ||
# target triple. | ||
@@ -895,6 +896,8 @@ fi | ||
# This test causes fork failures, because it spawns way too many threads | ||
rm -f gcc/testsuite/go.test/test/chan/goroutines.go | ||
|
||
+%patch10000 -p0 -b .arm-progbits~ | ||
+ | ||
%build | ||
|
||
# Undo the broken autoconf change in recent Fedora versions | ||
@@ -3157,6 +3160,10 @@ fi | ||
%endif | ||
|
||
%changelog | ||
+* Sat Jun 29 2019 Bjarne Saltbaek <bjarne@redsleeve.org> 8.2.1-3.5.redsleeve | ||
+- Enabled gcc-go build on EL8 | ||
+- Added patch from gcc-go on arm | ||
+ | ||
* Mon Dec 10 2018 Marek Polacek <polacek@redhat.com 8.2.1-3.5 | ||
- remove python2 dependecy (#1595385) | ||
|
||
-- | ||
2.18.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- libgo/go/cmd/go/internal/work/buildid.go (revision 264245) | ||
+++ libgo/go/cmd/go/internal/work/buildid.go (working copy) | ||
@@ -337,8 +337,12 @@ func (b *Builder) gccgoBuildIDELFFile(a | ||
} | ||
fmt.Fprintf(&buf, "\n") | ||
if cfg.Goos != "solaris" { | ||
- fmt.Fprintf(&buf, "\t"+`.section .note.GNU-stack,"",@progbits`+"\n") | ||
- fmt.Fprintf(&buf, "\t"+`.section .note.GNU-split-stack,"",@progbits`+"\n") | ||
+ secType := "@progbits" | ||
+ if cfg.Goarch == "arm" { | ||
+ secType = "%progbits" | ||
+ } | ||
+ fmt.Fprintf(&buf, "\t"+`.section .note.GNU-stack,"",%s`+"\n", secType) | ||
+ fmt.Fprintf(&buf, "\t"+`.section .note.GNU-split-stack,"",%s`+"\n", secType) | ||
} | ||
|
||
if cfg.BuildN || cfg.BuildX { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters