fix build error for loongarch64

This commit is contained in:
Wenlong Zhang 2024-06-07 06:41:38 +00:00
parent f1291b2c33
commit cce24c9952
3 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,7 @@
%global debug_package %{nil}
Name: coredns
Version: 1.7.0
Release: 1.2
Release: 1.3
Summary: CoreDNS is a DNS server/forwarder, written in Go
License: Apache-2.0
URL: https://coredns.io
@ -11,6 +11,7 @@ Source1: vendor.tar.gz
Source1000: net_loong64.tar.gz
Source1001: net_sw64.tar.gz
Source1002: sys_loong64.tar.gz
BuildRequires: golang >= 1.13
BuildRequires: fdupes
@ -28,13 +29,14 @@ Help document for the coredns package.
%prep
%setup -q -a1
%ifarch loongarch64 sw_64
%ifarch sw_64 loongarch64
%__rm -rf vendor/golang.org/x/{sys,net}
%__cp -af %{_prefix}/lib/golang/src/cmd/vendor/golang.org/x/sys vendor/golang.org/x/
%ifarch loongarch64
%__tar xf %{SOURCE1000} -C vendor/golang.org/x/
%__tar xf %{SOURCE1002} -C vendor/golang.org/x/
%endif
%ifarch sw_64
%__cp -af %{_prefix}/lib/golang/src/cmd/vendor/golang.org/x/sys vendor/golang.org/x/
%__tar xf %{SOURCE1001} -C vendor/golang.org/x/
%endif
%endif
@ -84,6 +86,9 @@ install -m 0644 man/coredns-*.7 %{buildroot}/%{_mandir}/man7
%{_mandir}/man7/coredns-*
%changelog
* Fri Jun 07 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 1.7.0-1.3
- fix build error for loongarch64
* Thu Aug 10 2023 herengui <herengui@kylinsec.com.cn> - 1.7.0-1.2
- Type:enhancement
- ID:NA

Binary file not shown.

BIN
sys_loong64.tar.gz Normal file

Binary file not shown.