blob: 268cabbc85dcb58eb97dd620ee1eb5e1c666a1a2 [file] [log] [blame]
From f914545ac97af24e269cdbd78dbdabce6c0b2e84 Mon Sep 17 00:00:00 2001
From: Dan Padgett <dpadgett@google.com>
Date: Tue, 29 Mar 2016 18:32:28 -0700
Subject: [PATCH 15/17] Build golang support
---
package/gcc/5.3.0/110-libgo-runtime-initialize-variable.patch | 11 +++++++++++
package/gcc/gcc-final/gcc-final.mk | 2 +-
package/gcc/gcc.mk | 2 +-
3 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 package/gcc/5.3.0/110-libgo-runtime-initialize-variable.patch
diff --git a/package/gcc/5.3.0/110-libgo-runtime-initialize-variable.patch b/package/gcc/5.3.0/110-libgo-runtime-initialize-variable.patch
new file mode 100644
index 0000000..f9306e7
--- /dev/null
+++ b/package/gcc/5.3.0/110-libgo-runtime-initialize-variable.patch
@@ -0,0 +1,11 @@
+--- a/libgo/runtime/mprof.goc 2014-07-19 14:36:26.000000000 -0700
++++ b/libgo/runtime/mprof.goc 2016-03-29 22:13:19.272547481 -0700
+@@ -403,7 +403,7 @@
+
+ func Stack(b Slice, all bool) (n int) {
+ byte *pc, *sp;
+- bool enablegc;
++ bool enablegc = false;
+
+ sp = runtime_getcallersp(&b);
+ pc = (byte*)(uintptr)runtime_getcallerpc(&b);
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index dbdb615..dfcf883 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -52,7 +52,7 @@ endef
# Languages supported by the cross-compiler
-GCC_FINAL_CROSS_LANGUAGES-y = c
+GCC_FINAL_CROSS_LANGUAGES-y = c,go
GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_BUILDROOT_FORTRAN) += fortran
GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 07883d0..d5e403a 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -49,7 +49,7 @@ define HOST_GCC_APPLY_PATCHES
endef
HOST_GCC_EXCLUDES = \
- libjava/* libgo/* \
+ libjava/* \
gcc/testsuite/* libstdc++-v3/testsuite/*
define HOST_GCC_FAKE_TESTSUITE
--
2.8.0.rc3.226.g39d4020