From 35083472d99d22a3d06c886f2fc6ee018176e5cb Mon Sep 17 00:00:00 2001 From: wangyangdahai Date: Sun, 2 Jul 2023 13:55:31 +0800 Subject: [PATCH 1/2] fix riscv64 arch autoconf.h include path --- autoconf.h | 2 ++ libecap.spec | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/autoconf.h b/autoconf.h index aa5de1c..3cb2f4d 100644 --- a/autoconf.h +++ b/autoconf.h @@ -44,6 +44,8 @@ #include "libecap/common/autoconf-sparc.h" #elif defined(__aarch64__) #include "libecap/common/autoconf-aarch64.h" +#elif defined(__riscv) +#include "libecap/common/autoconf-riscv64.h" #else #error "The libecap-devel package is not usable with the architecture." #endif diff --git a/libecap.spec b/libecap.spec index c62addf..16b21c1 100644 --- a/libecap.spec +++ b/libecap.spec @@ -1,6 +1,6 @@ Name: libecap Version: 1.0.1 -Release: 4 +Release: 5 Summary: an loadable eCAP adapter for Squid HTTP-Proxy License: BSD URL: http://www.e-cap.org/ @@ -63,5 +63,8 @@ make check %doc README %changelog +* Mon Jul 03 2023 wangyangdahai - 1.0.1-5 +- fix riscv64 arch autoconf.h include path + * Wed Aug 28 2019 openEuler Buildteam - 1.0.1-4 - Package init -- Gitee From 7ab31535450517335806c732742e0051853ad6aa Mon Sep 17 00:00:00 2001 From: panchenbo Date: Mon, 25 Sep 2023 10:18:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?add=20sw=5F64=20loongarch64=20support=20and?= =?UTF-8?q?=20Next=20=E4=BB=A3=E7=A0=81=E5=BD=92=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-support-not-upstream-modified-files.patch | 37 +++++++++++++++++++ ...-support-not-upstream-modified-files.patch | 34 +++++++++++++++++ autoconf.h | 4 ++ libecap.spec | 18 +++++++-- 4 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 1000-add-sw_64-support-not-upstream-modified-files.patch create mode 100644 1001-add-loongarch64-support-not-upstream-modified-files.patch diff --git a/1000-add-sw_64-support-not-upstream-modified-files.patch b/1000-add-sw_64-support-not-upstream-modified-files.patch new file mode 100644 index 0000000..fb70b01 --- /dev/null +++ b/1000-add-sw_64-support-not-upstream-modified-files.patch @@ -0,0 +1,37 @@ +diff -Naur libecap-1.0.1.org/cfgaux/config.guess libecap-1.0.1.sw/cfgaux/config.guess +--- libecap-1.0.1.org/cfgaux/config.guess 2022-03-09 03:56:18.232357080 +0000 ++++ libecap-1.0.1.sw/cfgaux/config.guess 2022-03-09 05:38:33.942357080 +0000 +@@ -917,6 +917,14 @@ + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-sunway-linux-gnu${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur libecap-1.0.1.org/cfgaux/config.sub libecap-1.0.1.sw/cfgaux/config.sub +--- libecap-1.0.1.org/cfgaux/config.sub 2022-03-09 03:56:18.232357080 +0000 ++++ libecap-1.0.1.sw/cfgaux/config.sub 2022-03-09 05:37:39.462357080 +0000 +@@ -242,6 +242,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -322,6 +323,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ diff --git a/1001-add-loongarch64-support-not-upstream-modified-files.patch b/1001-add-loongarch64-support-not-upstream-modified-files.patch new file mode 100644 index 0000000..136a023 --- /dev/null +++ b/1001-add-loongarch64-support-not-upstream-modified-files.patch @@ -0,0 +1,34 @@ +diff --git a/cfgaux/config.guess b/cfgaux/config.guess +index e8d59a5..8885282 100755 +--- a/cfgaux/config.guess ++++ b/cfgaux/config.guess +@@ -885,6 +885,9 @@ EOF + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +diff --git a/cfgaux/config.sub b/cfgaux/config.sub +index 7546199..6b4e215 100755 +--- a/cfgaux/config.sub ++++ b/cfgaux/config.sub +@@ -257,6 +257,7 @@ case $basic_machine in + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ ++ | loongarch32 | loongarch64 \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +@@ -343,6 +344,7 @@ case $basic_machine in + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ ++ | loongarch32-* | loongarch64-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ diff --git a/autoconf.h b/autoconf.h index 3cb2f4d..76cd57d 100644 --- a/autoconf.h +++ b/autoconf.h @@ -38,12 +38,16 @@ #include "libecap/common/autoconf-arm.h" #elif defined(__alpha__) #include "libecap/common/autoconf-alpha.h" +#elif defined(__sw_64__) +#include "libecap/common/autoconf-sw_64.h" #elif defined(__sparc__) && defined (__arch64__) #include "libecap/common/autoconf-sparc64.h" #elif defined(__sparc__) #include "libecap/common/autoconf-sparc.h" #elif defined(__aarch64__) #include "libecap/common/autoconf-aarch64.h" +#elif defined(__loongarch64) +#include "libecap/common/autoconf-loongarch64.h" #elif defined(__riscv) #include "libecap/common/autoconf-riscv64.h" #else diff --git a/libecap.spec b/libecap.spec index 16b21c1..7b54d2a 100644 --- a/libecap.spec +++ b/libecap.spec @@ -1,12 +1,14 @@ Name: libecap Version: 1.0.1 -Release: 5 +Release: 8 Summary: an loadable eCAP adapter for Squid HTTP-Proxy License: BSD URL: http://www.e-cap.org/ Source0: http://www.e-cap.org/archive/%{name}-%{version}.tar.gz Source1: autoconf.h +Patch1000: 1000-add-sw_64-support-not-upstream-modified-files.patch +Patch1001: 1001-add-loongarch64-support-not-upstream-modified-files.patch BuildRequires: git gcc gcc-c++ %description @@ -63,8 +65,18 @@ make check %doc README %changelog -* Mon Jul 03 2023 wangyangdahai - 1.0.1-5 -- fix riscv64 arch autoconf.h include path +* Mon Sep 25 2023 panchenbo - 1.0.1-8 +- add loongarch64 sw_64 support and code integration + +* Fri Jan 6 2023 doupengda 1.0.1-7 +- update config.guess and config.sub +- fix SOURCE1 file autoconf.h '__loongarch64__' to '__loongarch64' + +* Fri Dec 16 2022 zhangzhixin - 1.0.1-6 +- Add sw64 arch patch + +* Thu Dec 1 2022 zhaozhen - 1.0.1-5 +- Add loongarch64 support * Wed Aug 28 2019 openEuler Buildteam - 1.0.1-4 - Package init -- Gitee