diff --git a/0006-Sw64-Atomic-and-Locking-Implementation.patch b/0006-Sw64-Atomic-and-Locking-Implementation.patch index 7ea05206c46020a9a549357714e37e3ff593481c..37c7a52904a0a63ff808c5b12392de38771de0bd 100644 --- a/0006-Sw64-Atomic-and-Locking-Implementation.patch +++ b/0006-Sw64-Atomic-and-Locking-Implementation.patch @@ -851,7 +851,7 @@ index 00000000..db3320fc + +#define __arch_exchange_16_int(mem, value, mb1, mb2) \ + ({ \ -+ unsigned long __tmp, __addr64, __sval, __tmp1; \ ++ unsigned long __tmp, __addr64, __sval; \ + __typeof (*mem) __ret; \ + __asm__ __volatile__(" bic %[__addr16],7,%[__addr64]\n" \ + " inslh %[__value],%[__addr16],%[__sval]\n" \ diff --git a/0013-Sw64-math-support.patch b/0013-Sw64-math-support.patch index e0b24b7edbffbf2763576fa9703b5e415769d007..b39065e5738f1398915504ed44c6bfc4d1f7a267 100644 --- a/0013-Sw64-math-support.patch +++ b/0013-Sw64-math-support.patch @@ -296,7 +296,7 @@ index 00000000..e09c4b28 +# define cfloat_versions_compat(func) \ + compat_symbol (libm, __c1_##func, func, GLIBC_2_1) +#else -+# define cfloat_versions_compat (func) ++# define cfloat_versions_compat(func) +#endif + +#define cfloat_versions(func) \ diff --git a/0024-Sw64-Change-libdir-from-lib-to-lib64.patch b/0024-Sw64-Change-libdir-from-lib-to-lib64.patch new file mode 100644 index 0000000000000000000000000000000000000000..465047925e33aa34aa3cf947b74825f7c3d5481e --- /dev/null +++ b/0024-Sw64-Change-libdir-from-lib-to-lib64.patch @@ -0,0 +1,56 @@ +From 6013c6ed5b1eb3b566127fa7147f673f239c976f Mon Sep 17 00:00:00 2001 +From: wangy +Date: Thu, 13 Feb 2025 11:49:37 +0800 +Subject: [PATCH] SW_64: Change libdir from lib to lib64, and rename the + dynamic linker from ld-linux.so.2 to ld-linux-sw-64.so.2. + +--- + sysdeps/unix/sysv/linux/sw_64/configure | 12 ++++++++++++ + sysdeps/unix/sysv/linux/sw_64/configure.ac | 2 ++ + sysdeps/unix/sysv/linux/sw_64/shlib-versions | 2 +- + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/sysdeps/unix/sysv/linux/sw_64/configure b/sysdeps/unix/sysv/linux/sw_64/configure +index a8d00a78..6b15dfb2 100644 +--- a/sysdeps/unix/sysv/linux/sw_64/configure ++++ b/sysdeps/unix/sysv/linux/sw_64/configure +@@ -3,3 +3,15 @@ + + # We did historically export the unwinder from glibc. + libc_cv_gcc_unwind_find_fde=yes ++ ++test -n "$libc_cv_slibdir" || ++case "$prefix" in ++/usr | /usr/) ++ libc_cv_slibdir='/lib64' ++ libc_cv_rtlddir='/lib64' ++ if test "$libdir" = '${exec_prefix}/lib'; then ++ libdir='${exec_prefix}/lib64'; ++ libc_cv_complocaledir='${exec_prefix}/lib/locale' ++ fi ++ ;; ++esac +diff --git a/sysdeps/unix/sysv/linux/sw_64/configure.ac b/sysdeps/unix/sysv/linux/sw_64/configure.ac +index d837c72e..0e98c54f 100644 +--- a/sysdeps/unix/sysv/linux/sw_64/configure.ac ++++ b/sysdeps/unix/sysv/linux/sw_64/configure.ac +@@ -3,3 +3,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + + # We did historically export the unwinder from glibc. + libc_cv_gcc_unwind_find_fde=yes ++ ++LIBC SLIBDIR RTLDDIR([lib64], [lib64]) +diff --git a/sysdeps/unix/sysv/linux/sw_64/shlib-versions b/sysdeps/unix/sysv/linux/sw_64/shlib-versions +index 58b0bd8e..cb251989 100644 +--- a/sysdeps/unix/sysv/linux/sw_64/shlib-versions ++++ b/sysdeps/unix/sysv/linux/sw_64/shlib-versions +@@ -16,5 +16,5 @@ libresolv=2.1 + libutil=1.1 + %endif + +-ld=ld-linux.so.2 ++ld=ld-linux-sw-64.so.2 + libcrypt=1.1 +-- +2.18.1 + diff --git a/glibc.spec b/glibc.spec index d35911576a5569673a610b4ad6d780cd2cc417b8..d975f4ff7fceeb5b6ea7f907040c4d1f668508a1 100644 --- a/glibc.spec +++ b/glibc.spec @@ -67,7 +67,7 @@ ############################################################################## Name: glibc Version: 2.38 -Release: 68 +Release: 69 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -408,6 +408,8 @@ Patch9040: backport-Fix-UB-on__dl_map_object_from_fd.patch Patch9041: backport-Fix-handling-of-symbol-versions-which-hash-to-zero.patch Patch9042: AArch64-modify_the_SVE_memcpy_implementation_for_32-byte_aligned_access.patch +Patch9043: 0024-Sw64-Change-libdir-from-lib-to-lib64.patch + Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext @@ -766,6 +768,9 @@ pushd $builddir %ifarch %{ix86} --disable-multi-arch \ %endif +%ifarch sw_64 + --with-cpu=sw8a \ +%endif %if %{without werror} --disable-werror \ %endif @@ -980,7 +985,7 @@ touch devel.filelist touch nscd.filelist touch nss_modules.filelist touch nss-devel.filelist -%ifnarch loongarch64 +%ifnarch loongarch64 sw_64 touch libnsl.filelist %endif touch debugutils.filelist @@ -1041,7 +1046,7 @@ cat master.filelist \ -e '%{_prefix}/share' \ -e '/var/db/Makefile' \ -e '/libnss_.*\.so[0-9.]*$' \ -%ifnarch loongarch64 +%ifnarch loongarch64 sw_64 -e '/libnsl' \ %endif -e 'glibc-benchtests' \ @@ -1116,7 +1121,7 @@ grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist ############################################################################## # libnsl subpackage ############################################################################## -%ifnarch loongarch64 +%ifnarch loongarch64 sw_64 grep -E '%{_lib}/libnsl\.so\.[0-9]+$' master.filelist > libnsl.filelist test $(wc -l < libnsl.filelist) -eq 1 %endif @@ -1296,10 +1301,12 @@ pushd build-%{target} LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true %if %{with valgrind} +%ifnarch sw_64 elf/ld.so --library-path .:elf:nptl:dlfcn \ /usr/bin/valgrind --error-exitcode=1 \ elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true %endif +%endif popd %endif # %{run_glibc_tests} @@ -1563,7 +1570,7 @@ fi %files -f nss-devel.filelist nss-devel -%ifnarch loongarch64 +%ifnarch loongarch64 sw_64 %files -f libnsl.filelist -n libnsl %endif @@ -1587,6 +1594,9 @@ fi %endif %changelog +* Mon Oct 20 2025 swcompiler - 2.38-69 +- Sw64:Change libdir from lib to lib64 + * Thu Sep 18 2025 Long Wei - 2.38-68 - aarch64: Optimize memcpy_sve by using 32-byte alignment