summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/Makefile8
-rw-r--r--toolchain/gcc/patches/6.2.0/go-libgcc.patch12
2 files changed, 13 insertions, 7 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index a9d17dde1..1561b7710 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -21,11 +21,6 @@ TARGET_CFLAGS:= $(filter-out -msep-data,$(TARGET_CFLAGS))
TARGET_CXXFLAGS:= $(filter-out -msep-data,$(TARGET_CXXFLAGS))
endif
-ifeq ($(ADK_TOOLCHAIN_WITH_GO),y)
-TARGET_CFLAGS+= -lpthread -lrt
-TARGET_CXXFLAGS+= -lpthread -lrt
-endif
-
GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \
--with-bugurl="http://www.openadk.org/" \
--build=$(GNU_HOST_NAME) \
@@ -76,8 +71,7 @@ endif
ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_DSBT),y)
GCC_FINAL_CONFOPTS+= --disable-shared
else
-# uClibc/glibc uses libgcc_s.so.1 for pthread_cancel with dlopen
-GCC_FINAL_CONFOPTS+= --enable-shared='libstdc++,libgcc' --enable-cxx-flags='-fPIC'
+GCC_FINAL_CONFOPTS+= --enable-shared --enable-cxx-flags='-fPIC'
endif
ifeq ($(ADK_TOOLCHAIN_WITH_SSP),y)
diff --git a/toolchain/gcc/patches/6.2.0/go-libgcc.patch b/toolchain/gcc/patches/6.2.0/go-libgcc.patch
new file mode 100644
index 000000000..391306974
--- /dev/null
+++ b/toolchain/gcc/patches/6.2.0/go-libgcc.patch
@@ -0,0 +1,12 @@
+diff -Nur gcc-6.2.0.orig/gotools/Makefile.in gcc-6.2.0/gotools/Makefile.in
+--- gcc-6.2.0.orig/gotools/Makefile.in 2016-02-03 22:58:02.000000000 +0100
++++ gcc-6.2.0/gotools/Makefile.in 2016-09-04 09:29:15.582198715 +0200
+@@ -259,7 +259,7 @@
+ @NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET)
+ GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
+ AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
+-GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
++GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) -lgcc_s $(AM_LDFLAGS) -o $@
+ cmdsrcdir = $(srcdir)/../libgo/go/cmd
+ go_cmd_go_files = \
+ $(cmdsrcdir)/go/alldocs.go \