!9 LLVM平行宇宙:支持使用clang构建telnet

From: @ren-yi43 
Reviewed-by: @sunsuwan 
Signed-off-by: @sunsuwan
This commit is contained in:
openeuler-ci-bot 2023-08-30 02:32:12 +00:00 committed by Gitee
commit f66583b278
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
Name: telnet
Epoch: 1
Version: 0.17
Release: 78
Release: 79
Summary: Client and Server programs for the Telnet communication protocol
License: BSD
Url: http://web.archive.org/web/20070819111735/www.hcs.harvard.edu/~dholland/computers/old-netkit.html
@ -63,11 +63,11 @@ mv -f telnet telnet-NETKIT
%autosetup -T -D -a 1 -n netkit-telnet-%{version} -p1
%build
%{_configure} --with-c-compiler=gcc --prefix=%{_prefix} --exec-prefix=%{_exec_prefix}
%{_configure} --with-c-compiler=%{__cc} --prefix=%{_prefix} --exec-prefix=%{_exec_prefix}
sed -i 's,-O2,\$(CC_FLAGS),;s,LDFLAGS=.*,LDFLAGS=\$(LD_FLAGS),;s,^MANDIR=.*$,MANDIR=%{_mandir},' MCONFIG
sed -i 's,install [+-]s,install,g' ./telnet/GNUmakefile ./telnetd/Makefile ./telnetlogin/Makefile ./telnet-NETKIT/Makefile
%make_build CC_FLAGS="$RPM_OPT_FLAGS -fpie" LD_FLAGS="$LD_FLAGS -z now -pie"
%make_build CC_FLAGS="$RPM_OPT_FLAGS -fpie -Wno-error=int-conversion" LD_FLAGS="$LD_FLAGS -z now -pie"
%install
install -d %{buildroot}{%{_bindir},%{_sbindir},%{_mandir}/man{1,5,8}}
@ -100,6 +100,12 @@ install -pm644 %{SOURCE3} %{buildroot}%{_unitdir}/telnet.socket
%{_mandir}/man1/telnet.1*
%changelog
* Wed Aug 30 2023 renyi <977713017@qq.com> - 1:0.17-79
- Type:Feature
- ID:NA
- SUG:NA
- DESC:add clang compile support
* Tue Dec 15 2020 xihaochen <xihaochen@huawei.com> - 1:0.17-78
- Type:requirement
- ID:NA