From 952a83cdcb29f41782b2516e115748e3ed32497d Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@uclibc-ng.org>
Date: Fri, 12 Aug 2016 07:50:09 +0200
Subject: bfin: add workaround for libgcc issues

---
 toolchain/gcc/patches/6.1.0/bfin-workaround.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 toolchain/gcc/patches/6.1.0/bfin-workaround.patch

(limited to 'toolchain/gcc')

diff --git a/toolchain/gcc/patches/6.1.0/bfin-workaround.patch b/toolchain/gcc/patches/6.1.0/bfin-workaround.patch
new file mode 100644
index 000000000..7b57a285b
--- /dev/null
+++ b/toolchain/gcc/patches/6.1.0/bfin-workaround.patch
@@ -0,0 +1,15 @@
+diff -Nur gcc-6.1.0.orig/libgcc/Makefile.in gcc-6.1.0/libgcc/Makefile.in
+--- gcc-6.1.0.orig/libgcc/Makefile.in	2016-02-25 13:23:52.000000000 +0100
++++ gcc-6.1.0/libgcc/Makefile.in	2016-08-11 21:15:13.841764686 +0200
+@@ -932,7 +932,11 @@
+ 	{ $(NM) $(SHLIB_NM_FLAGS) $(libgcc-s-objects); echo %%; \
+ 	  cat libgcc.map.in; \
+ 	} | $(AWK) -f $(SHLIB_MKMAP) $(SHLIB_MKMAP_OPTS) > tmp-$@
++ifeq ($(cpu_type),bfin)
++	sed -e 's/__/_/' tmp-$@ > $@
++else
+ 	mv tmp-$@ $@
++endif
+ libgcc_s$(SHLIB_EXT): libgcc.map
+ mapfile = libgcc.map
+ endif
-- 
cgit v1.2.3