From 5123d161bc361c9d3f68972337f35de6ccf164a3 Mon Sep 17 00:00:00 2001 From: wxiat Date: Mon, 15 May 2023 15:50:54 +0800 Subject: [PATCH] sw 20230515 --- 0001-sw-20230515.patch | 110 +++++++++++++++++++++++++++++++++++++++++ gettext.spec | 6 ++- 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 0001-sw-20230515.patch diff --git a/0001-sw-20230515.patch b/0001-sw-20230515.patch new file mode 100644 index 0000000..26fd252 --- /dev/null +++ b/0001-sw-20230515.patch @@ -0,0 +1,110 @@ +From 070d22bdb189a7b5de61babf996fa0148573c9c6 Mon Sep 17 00:00:00 2001 +From: wxiat +Date: Mon, 15 May 2023 15:46:22 +0800 +Subject: [PATCH] sw 20230515 + +--- + gettext-runtime/configure | 2 +- + gettext-runtime/intl/dcigettext.c | 2 +- + gettext-runtime/m4/intdiv0.m4 | 2 +- + gettext-tools/configure | 7 ++++++- + gettext-tools/examples/hello-c++-kde/admin/libtool.m4.in | 2 +- + gettext-tools/gnulib-m4/fpieee.m4 | 5 +++++ + 6 files changed, 15 insertions(+), 5 deletions(-) + +diff --git a/gettext-runtime/configure b/gettext-runtime/configure +index f3968e1..b84be2c 100755 +--- a/gettext-runtime/configure ++++ b/gettext-runtime/configure +@@ -16321,7 +16321,7 @@ else + + # Guess based on the CPU. + case "$host_cpu" in +- alpha* | i[34567]86 | x86_64 | m68k | s390*) ++ alpha* | sw_64* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; +diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c +index 83bd775..abec914 100644 +--- a/gettext-runtime/intl/dcigettext.c ++++ b/gettext-runtime/intl/dcigettext.c +@@ -70,7 +70,7 @@ extern int errno; + #ifdef _LIBC + /* Guess whether integer division by zero raises signal SIGFPE. + Set to 1 only if you know for sure. In case of doubt, set to 0. */ +-# if defined __alpha__ || defined __arm__ || defined __i386__ \ ++# if defined __alpha__ || defined __sw_64__ || defined __arm__ || defined __i386__ \ + || defined __m68k__ || defined __s390__ + # define INTDIV0_RAISES_SIGFPE 1 + # else +diff --git a/gettext-runtime/m4/intdiv0.m4 b/gettext-runtime/m4/intdiv0.m4 +index 744b99e..d4df55d 100644 +--- a/gettext-runtime/m4/intdiv0.m4 ++++ b/gettext-runtime/m4/intdiv0.m4 +@@ -69,7 +69,7 @@ int main () + # Guess based on the CPU. + changequote(,)dnl + case "$host_cpu" in +- alpha* | i[34567]86 | x86_64 | m68k | s390*) ++ alpha* | sw_64* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; +diff --git a/gettext-tools/configure b/gettext-tools/configure +index 0fa4093..59b00cc 100755 +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -8306,6 +8306,11 @@ fi + # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 + # and the GCC 4.1.2 manual). + case "$host_cpu" in ++ sw_64*) ++ if test -n "$GCC"; then ++ CPPFLAGS="$CPPFLAGS -mieee" ++ fi ++ ;; + alpha*) + # On Alpha systems, a compiler option provides the behaviour. + # See the ieee(3) manual page, also available at +@@ -18676,7 +18681,7 @@ else + + # Guess based on the CPU. + case "$host_cpu" in +- alpha* | i[34567]86 | x86_64 | m68k | s390*) ++ alpha* | sw_64* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; +diff --git a/gettext-tools/examples/hello-c++-kde/admin/libtool.m4.in b/gettext-tools/examples/hello-c++-kde/admin/libtool.m4.in +index 50bd616..3be64dd 100644 +--- a/gettext-tools/examples/hello-c++-kde/admin/libtool.m4.in ++++ b/gettext-tools/examples/hello-c++-kde/admin/libtool.m4.in +@@ -1967,7 +1967,7 @@ irix5* | irix6* | nonstopux*) + # This must be Linux ELF. + linux*) + case $host_cpu in +- alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* ) ++ alpha* | sw_64* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* ) + lt_cv_deplibs_check_method=pass_all ;; + # the debian people say, arm and glibc 2.3.1 works for them with pass_all + arm* ) +diff --git a/gettext-tools/gnulib-m4/fpieee.m4 b/gettext-tools/gnulib-m4/fpieee.m4 +index e11ac9f..0082594 100644 +--- a/gettext-tools/gnulib-m4/fpieee.m4 ++++ b/gettext-tools/gnulib-m4/fpieee.m4 +@@ -30,6 +30,11 @@ AC_DEFUN([gl_FP_IEEE], + # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 + # and the GCC 4.1.2 manual). + case "$host_cpu" in ++ sw_64*) ++ if test -n "$GCC"; then ++ CPPFLAGS="$CPPFLAGS -mieee" ++ fi ++ ;; + alpha*) + # On Alpha systems, a compiler option provides the behaviour. + # See the ieee(3) manual page, also available at +-- +2.31.1 + diff --git a/gettext.spec b/gettext.spec index 84d0c45..07aa4e7 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %bcond_with jar %bcond_with java %bcond_without check @@ -25,6 +25,7 @@ Patch1: gettext-po-send-mail.patch Patch2: gettext-0.19.8-its-segfault.patch # rhbz#1647044 Patch3: gettext-0.19.8.1-CVE-2018-18751.patch +Patch4: 0001-sw-20230515.patch Source2: msghack.py Source3: msghack.1 @@ -347,6 +348,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Mon May 15 2013 wxiat - 0.19.8.1-17.0.2 +- add sw patch + * Tue Sep 20 2022 Liwei Ge - 0.19.8.1-17.0.1 - Rebuild for loongarch -- Gitee