Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
8137882e42
!14 add sw_64 loongarch64 support and master 代码归一
From: @panchenbo 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-09-26 06:46:57 +00:00
panchenbo
9c877f429c add sw_64 loongarch64 support and master 代码归一 2023-09-26 14:28:58 +08:00
openeuler-ci-bot
003d99f096
!7 将riscv64架构加入autoconf.h
From: @laokz 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-07-10 03:05:39 +00:00
wangyangdahai
5974af342d fix riscv64 arch autoconf.h include path 2023-07-02 13:51:47 +08:00
openeuler-ci-bot
89038244d9
!6 Update the config.guess and config.sub files to support the loongarch64 architecture
From: @dpdwaj 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-01-10 01:48:07 +00:00
doupengda
939c210ce2 update config.guess and config.sub file 2023-01-06 14:33:08 +08:00
openeuler-ci-bot
15affac51c !2 libecap delete -Sgit from %autosetup, and delete BuildRequires git
From: @chenyanpanHW
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2021-08-19 08:22:26 +00:00
chenyanpanHW
3763ac51eb
delete -Sgit from %autosetup, and delete BuildRequires git 2021-07-30 22:58:39 +08:00
openeuler-ci-bot
55b9fe49d0 !1 add libecap.yaml
From: @xiezhipeng1
Reviewed-by: @overweight
Signed-off-by: @overweight
2020-11-05 16:38:54 +08:00
Zhipeng Xie
d19afc4bfe add libecap.yaml
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-10-16 02:01:06 -04:00
5 changed files with 97 additions and 1 deletions

View File

@ -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-* \

View File

@ -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-* \

View File

@ -38,12 +38,18 @@
#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
#error "The libecap-devel package is not usable with the architecture."
#endif

View File

@ -1,12 +1,14 @@
Name: libecap
Version: 1.0.1
Release: 4
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,5 +65,18 @@ make check
%doc README
%changelog
* Mon Sep 25 2023 panchenbo <panchenbo@kylinsec.com.cn> - 1.0.1-8
- add loongarch64 sw_64 support and code integration
* Fri Jan 6 2023 doupengda <doupengda@loongson.cn> 1.0.1-7
- update config.guess and config.sub
- fix SOURCE1 file autoconf.h '__loongarch64__' to '__loongarch64'
* Fri Dec 16 2022 zhangzhixin <zhixin.zhang@i-soft.com.cn> - 1.0.1-6
- Add sw64 arch patch
* Thu Dec 1 2022 zhaozhen <zhaozhen@loongson.cn> - 1.0.1-5
- Add loongarch64 support
* Wed Aug 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.1-4
- Package init

4
libecap.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: NA
src_repo: NA
tag_prefix:
seperator: .