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 --- a/libgfortran/acinclude.m4
28 +++ b/libgfortran/acinclude.m4
29 @@ -100,7 +100,7 @@ void foo (void);
30 [Define to 1 if the target supports #pragma weak])
33 - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
34 + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
35 AC_DEFINE(GTHREAD_USE_WEAK, 0,
36 [Define to 0 if the target shouldn't use #pragma weak])
38 --- a/libgfortran/configure
39 +++ b/libgfortran/configure
40 @@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con
44 - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
45 + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
47 $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
49 --- a/libstdc++-v3/config/os/generic/os_defines.h
50 +++ b/libstdc++-v3/config/os/generic/os_defines.h
52 // System-specific #define, typedefs, corrections, etc, go here. This
53 // file will come before all others.
55 +// Disable the weak reference logic in gthr.h for os/generic because it
56 +// is broken on every platform unless there is implementation specific
57 +// workaround in gthr-posix.h and at link-time for static linking.
58 +#define _GLIBCXX_GTHREAD_USE_WEAK 0
61 --- a/libstdc++-v3/configure.host
62 +++ b/libstdc++-v3/configure.host
63 @@ -273,6 +273,9 @@ case "${host_os}" in
65 os_include_dir="os/bsd/freebsd"
68 + os_include_dir="os/generic"
70 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
71 if [ "$uclibc" = "yes" ]; then
72 os_include_dir="os/uclibc"