From 42a794b170f85cd2a016ed78a62e2367e9bd1de0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 4 Sep 2016 10:05:00 +0200 Subject: gccgo: fix bulding and package libgo --- toolchain/gcc/Makefile | 8 +------- toolchain/gcc/patches/6.2.0/go-libgcc.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 toolchain/gcc/patches/6.2.0/go-libgcc.patch (limited to 'toolchain') 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 \ -- cgit v1.2.3