代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gcc_secure 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
gcc_secure_exclude=`rpm --eval %{gcc_secure_exclude}`
if ! cat /.build.command | egrep "$gcc_secure_exclude" &>/dev/null; then
sec_opt='-fPIC -D_FORTIFY_SOURCE=2 -O2 -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wtrampolines -fsigned-char'
fs_opt=''
if [[ "$@" =~ "-O0" ]]; then
#openjdk set O0 can not use FS
sec_opt=`echo $sec_opt | sed 's/ -D_FORTIFY_SOURCE=2 -O2 / /'`
fi
if [ -d '/home/abuild/rpmbuild/SOURCES' ]; then
configfile=/home/abuild/rpmbuild/SOURCES/config_for_secure
else
configfile=/root/rpmbuild/SOURCES/config_for_secure
fi
if [ -f $configfile ]; then
rpm_name=`cat $configfile| grep rpm_name| awk -F: '{print $NF}'`
sec_opt=`cat $configfile| grep sec_opt| awk -F: '{print $NF}'`
fs_opt=`cat $configfile| grep fs_opt| awk -F: '{print $NF}'`
fi
if [[ x$rpm_name = "xnumactl" ]] && [[ "$@" =~ "-march=x86-64" ]];then
#numactl i686 use asm can't add -fPIC
sec_opt=`echo $sec_opt | sed 's/-fPIC / /'`
fi
if [[ x$rpm_name = "xglibc" ]] || [[ x$rpm_name = "xcompat-glibc" ]];then
#glibc supply fs define, can not add fs for glibc self
/usr/bin/gcc_normal $sec_opt "$@" $fs_opt --specs=/usr/share/gcc_secure/openeuler_gcc_secure.opt.pie --specs=/usr/share/gcc_secure/openeuler_gcc_secure.opt.ld
else
/usr/bin/gcc_normal $sec_opt "$@" $fs_opt --specs=/usr/share/gcc_secure/openeuler_gcc_secure.opt.pie --specs=/usr/share/gcc_secure/openeuler_gcc_secure.opt.ld --specs=/usr/share/gcc_secure/openeuler_gcc_secure.opt.fs
fi
else
/usr/bin/gcc_normal "$@"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。