diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2015-09-11 17:57:39 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-09-11 17:57:39 +0000 |
commit | 0fdb4a458b08a802302801915801685b62c16f10 (patch) | |
tree | d788c39e9a92da680dbf143255260093cfe7a4f0 /toolchain/gcc/patches/5.2.0/209-musl_libstdc++.patch | |
parent | 5caee877dc2a7e848b2edf68f7f34e9e9163d228 (diff) | |
download | mtk-20170518-0fdb4a458b08a802302801915801685b62c16f10.zip mtk-20170518-0fdb4a458b08a802302801915801685b62c16f10.tar.gz mtk-20170518-0fdb4a458b08a802302801915801685b62c16f10.tar.bz2 |
gcc: update gcc 5.x musl patches
This replaces the musl patches for gcc with the versions which are in
gcc trunk.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 46873
Diffstat (limited to 'toolchain/gcc/patches/5.2.0/209-musl_libstdc++.patch')
-rw-r--r-- | toolchain/gcc/patches/5.2.0/209-musl_libstdc++.patch | 84 |
1 files changed, 65 insertions, 19 deletions
diff --git a/toolchain/gcc/patches/5.2.0/209-musl_libstdc++.patch b/toolchain/gcc/patches/5.2.0/209-musl_libstdc++.patch index 2c8f636..861bc76 100644 --- a/toolchain/gcc/patches/5.2.0/209-musl_libstdc++.patch +++ b/toolchain/gcc/patches/5.2.0/209-musl_libstdc++.patch @@ -1,26 +1,72 @@ +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 +--- + +--- a/libgfortran/acinclude.m4 ++++ b/libgfortran/acinclude.m4 +@@ -100,7 +100,7 @@ void foo (void); + [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]) + ;; +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -26447,7 +26447,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con + + fi + case "$host" in +- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) ++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + + $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.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 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host -@@ -274,6 +274,13 @@ case "${host_os}" in +@@ -273,6 +273,9 @@ case "${host_os}" in + freebsd*) os_include_dir="os/bsd/freebsd" ;; ++ linux-musl*) ++ os_include_dir="os/generic" ++ ;; gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) -+ # check for musl by target -+ case "${host_os}" in -+ *-musl*) -+ os_include_dir="os/generic" -+ ;; -+ *) -+ if [ "$uclibc" = "yes" ]; then os_include_dir="os/uclibc" - elif [ "$bionic" = "yes" ]; then -@@ -282,6 +289,9 @@ case "${host_os}" in - os_include_dir="os/gnu-linux" - fi - ;; -+ -+ esac -+ ;; - hpux*) - os_include_dir="os/hpux" - ;; |