summaryrefslogtreecommitdiffstats
path: root/package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2015-07-17 11:31:13 -0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-18 11:16:53 +0200
commitc51697185fdb5d165531f3adf3e8c4cd75509513 (patch)
tree47fa3be563bc8831ee4b167de8b143850ee889bf /package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
parent2b33dc30b834aedea8c14999edbd7b6417f412a1 (diff)
downloadbuildroot-c51697185fdb5d165531f3adf3e8c4cd75509513.tar.gz
buildroot-c51697185fdb5d165531f3adf3e8c4cd75509513.zip
gcc: bump 5.x series to version 5.2.0
Also rename the BR2_GCC_VERSION_5_1_X symbol to BR2_GCC_VERSION_5_X to reflect this change to match the new versioning scheme. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch')
-rw-r--r--package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch b/package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
new file mode 100644
index 0000000000..c852131258
--- /dev/null
+++ b/package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
@@ -0,0 +1,80 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000)
+Subject: libstdc++, libgfortran gthr workaround for musl
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61
+
+libstdc++, libgfortran gthr workaround for musl
+
+On behalf of szabolcs.nagy@arm.com
+
+[libstdc++-v3/]
+2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
+ * configure.host (os_include_dir): Set to "os/generic" for linux-musl*.
+
+[libgfortran/]
+2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*.
+ * configure: Regenerate.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/libgfortran/acinclude.m4
+===================================================================
+--- a/libgfortran/acinclude.m4
++++ b/libgfortran/acinclude.m4
+@@ -100,7 +100,7 @@
+ [Define to 1 if the target supports #pragma weak])
+ fi
+ case "$host" in
+- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
+ AC_DEFINE(GTHREAD_USE_WEAK, 0,
+ [Define to 0 if the target shouldn't use #pragma weak])
+ ;;
+Index: b/libgfortran/configure
+===================================================================
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -26447,7 +26447,7 @@
+
+ fi
+ case "$host" in
+- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
+
+ $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
+
+Index: b/libstdc++-v3/config/os/generic/os_defines.h
+===================================================================
+--- a/libstdc++-v3/config/os/generic/os_defines.h
++++ b/libstdc++-v3/config/os/generic/os_defines.h
+@@ -33,4 +33,9 @@
+ // System-specific #define, typedefs, corrections, etc, go here. This
+ // file will come before all others.
+
++// Disable the weak reference logic in gthr.h for os/generic because it
++// is broken on every platform unless there is implementation specific
++// workaround in gthr-posix.h and at link-time for static linking.
++#define _GLIBCXX_GTHREAD_USE_WEAK 0
++
+ #endif
+Index: b/libstdc++-v3/configure.host
+===================================================================
+--- a/libstdc++-v3/configure.host
++++ b/libstdc++-v3/configure.host
+@@ -271,6 +271,9 @@
+ freebsd*)
+ os_include_dir="os/bsd/freebsd"
+ ;;
++ linux-musl*)
++ os_include_dir="os/generic"
++ ;;
+ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+ if [ "$uclibc" = "yes" ]; then
+ os_include_dir="os/uclibc"
OpenPOWER on IntegriCloud