loongarch-uclibc.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. diff -Nur gcc-15.3.0.orig/gcc/config/loongarch/uclibc.h gcc-15.3.0/gcc/config/loongarch/uclibc.h
  2. --- gcc-15.3.0.orig/gcc/config/loongarch/uclibc.h 1970-01-01 01:00:00.000000000 +0100
  3. +++ gcc-15.3.0/gcc/config/loongarch/uclibc.h 2026-06-28 10:42:54.366223029 +0200
  4. @@ -0,0 +1,23 @@
  5. +/* Definitions for uCLibc C library support.
  6. + Copyright (C) 2024-2025 Free Software Foundation, Inc.
  7. +
  8. +This file is part of GCC.
  9. +
  10. +GCC is free software; you can redistribute it and/or modify
  11. +it under the terms of the GNU General Public License as published by
  12. +the Free Software Foundation; either version 3, or (at your option)
  13. +any later version.
  14. +
  15. +GCC is distributed in the hope that it will be useful,
  16. +but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. +GNU General Public License for more details.
  19. +
  20. +You should have received a copy of the GNU General Public License
  21. +along with GCC; see the file COPYING3. If not see
  22. +<http://www.gnu.org/licenses/>. */
  23. +
  24. +
  25. +#ifndef LA_DEFAULT_TARGET_UCLIBC
  26. +#define LA_DEFAULT_TARGET_UCLIBC
  27. +#endif
  28. diff -Nur gcc-15.3.0.orig/gcc/config.gcc gcc-15.3.0/gcc/config.gcc
  29. --- gcc-15.3.0.orig/gcc/config.gcc 2026-06-12 08:09:06.107518032 +0200
  30. +++ gcc-15.3.0/gcc/config.gcc 2026-06-28 10:47:51.591407374 +0200
  31. @@ -2588,6 +2588,9 @@
  32. tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file}"
  33. case ${target} in
  34. *-linux-musl*) tm_file="${tm_file} loongarch/musl.h"
  35. + ;;
  36. + *-linux-uclibc*) tm_file="${tm_file} loongarch/uclibc.h"
  37. + ;;
  38. esac
  39. tm_file="${tm_file} loongarch/gnu-user.h loongarch/linux.h loongarch/loongarch-driver.h"
  40. extra_options="${extra_options} linux-android.opt"
  41. @@ -5108,6 +5111,7 @@
  42. case ${target} in
  43. *-linux-gnu*) triplet_os="linux-gnu";;
  44. *-linux-musl*) triplet_os="linux-musl";;
  45. + *-linux-uclibc*) triplet_os="linux-uclibc";;
  46. *-elf*) triplet_os="elf";;
  47. *)
  48. echo "Unsupported target ${target}." 1>&2