logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

0004-libstdc-gthr-workaround-for-musl.patch (1381B)


  1. SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
  2. SPDX-FileCopyrightText: 2015 Szabolcs Nagy <szabolcs.nagy@arm.com>
  3. SPDX-License-Identifier: GPL-2.0-or-later
  4. Backported from upstream commit 85da5c3024f731e719c4093314da8edcd1056527
  5. libstdc++ gthr workaround for musl
  6. [libstdc++-v3/]
  7. 2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
  8. * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
  9. * configure.host (os_include_dir): Set to "os/generic" for linux-musl*.
  10. From-SVN: r222329
  11. --- gcc-4.7.4/libstdc++-v3/config/os/generic/os_defines.h
  12. +++ gcc-4.7.4/libstdc++-v3/config/os/generic/os_defines.h
  13. @@ -33,4 +33,9 @@
  14. // System-specific #define, typedefs, corrections, etc, go here. This
  15. // file will come before all others.
  16. +// Disable the weak reference logic in gthr.h for os/generic because it
  17. +// is broken on every platform unless there is implementation specific
  18. +// workaround in gthr-posix.h and at link-time for static linking.
  19. +#define _GLIBCXX_GTHREAD_USE_WEAK 0
  20. +
  21. #endif
  22. --- gcc-4.7.4/libstdc++-v3/configure.host
  23. +++ gcc-4.7.4/libstdc++-v3/configure.host
  24. @@ -242,6 +242,9 @@ case "${host_os}" in
  25. freebsd*)
  26. os_include_dir="os/bsd/freebsd"
  27. ;;
  28. + linux-musl*)
  29. + os_include_dir="os/generic"
  30. + ;;
  31. gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
  32. if [ "$uclibc" = "yes" ]; then
  33. os_include_dir="os/uclibc"