1 From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
2 Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000)
3 Subject: libstdc++, libgfortran gthr workaround for musl
4 X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61
6 libstdc++, libgfortran gthr workaround for musl
8 On behalf of szabolcs.nagy@arm.com
11 2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
13 * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
14 * configure.host (os_include_dir): Set to "os/generic" for linux-musl*.
17 2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
19 * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*.
20 * configure: Regenerate.
24 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4
27 Index: b/libgfortran/acinclude.m4
28 ===================================================================
29 --- a/libgfortran/acinclude.m4
30 +++ b/libgfortran/acinclude.m4
32 [Define to 1 if the target supports #pragma weak])
35 - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
36 + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
37 AC_DEFINE(GTHREAD_USE_WEAK, 0,
38 [Define to 0 if the target shouldn't use #pragma weak])
40 Index: b/libgfortran/configure
41 ===================================================================
42 --- a/libgfortran/configure
43 +++ b/libgfortran/configure
44 @@ -26447,7 +26447,7 @@
48 - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
49 + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
51 $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
53 Index: b/libstdc++-v3/config/os/generic/os_defines.h
54 ===================================================================
55 --- a/libstdc++-v3/config/os/generic/os_defines.h
56 +++ b/libstdc++-v3/config/os/generic/os_defines.h
58 // System-specific #define, typedefs, corrections, etc, go here. This
59 // file will come before all others.
61 +// Disable the weak reference logic in gthr.h for os/generic because it
62 +// is broken on every platform unless there is implementation specific
63 +// workaround in gthr-posix.h and at link-time for static linking.
64 +#define _GLIBCXX_GTHREAD_USE_WEAK 0
67 Index: b/libstdc++-v3/configure.host
68 ===================================================================
69 --- a/libstdc++-v3/configure.host
70 +++ b/libstdc++-v3/configure.host
73 os_include_dir="os/bsd/freebsd"
76 + os_include_dir="os/generic"
78 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
79 if [ "$uclibc" = "yes" ]; then
80 os_include_dir="os/uclibc"