登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
就在本周六,成都站 Gitee Talk | 模力方舟 AI 应用开发沙龙抢占最后席位!聚焦 AI 开发全链路,结识技术同频人~
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
22
Star
28
Fork
162
src-openEuler
/
gcc
代码
Issues
28
Pull Requests
9
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
2203版本gcc编译高版本gcc,编译时不带--disable-bootstrap选项,编译失败
待办的
#IBSL4A
缺陷
胡宇彪
创建于
2025-03-11 19:26
**【缺陷描述】:2203版本gcc编译高版本gcc,编译时不带--disable-bootstrap选项,编译失败** **一、缺陷信息** **【缺陷所属的os版本】(如openEuler-22.03-LTS,参考命令"cat /etc/os-release"结果)** openEuler-22.03-LTS **【缺陷所属软件及版本号】** gcc-10.3.1-67.oe2203sp4.x86_64 **【环境信息】** oe-2203版本的环境 **【问题复现步骤】:请描述具体的操作步骤** 1.创建oe-2203版本的环境 2.下载oe-2403-LTS-SP1版本的gcc并删除gcc.spec中 编译gcc时的--disable-bootstrap 选项 ``` # Add Secure Compilation Options OPT_FLAGS="$OPT_FLAGS -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now" OPT_LDFLAGS="$OPT_LDFLAGS -Wl,-z,relro,-z,now" # Disable bootstrap for saving compilation time export extra_ldflags_libobjc="-Wl,-z,relro,-z,now" export FCFLAGS="$OPT_FLAGS" CC="$CC" CXX="$CXX" \ CFLAGS="$OPT_FLAGS" \ CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \ | sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \ CFLAGS_FOR_TARGET="$OPT_FLAGS" \ CXXFLAGS_FOR_TARGET="$OPT_FLAGS" \ XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" GCJFLAGS="$OPT_FLAGS" \ - ../configure --disable-bootstrap --disable-libgcj --without-cloog\ + ../configure --disable-libgcj --without-cloog\ --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo}${enableld},lto \ $CONFIGURE_OPTS ``` 3.使用oe-2203版本gcc编译oe-2403-LTS-SP1版本的gcc ``` rpmbuild -ba gcc.spec ``` **【实际结果】**,请描述出问题的结果和影响 编译失败报错如下: ``` /root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/xgcc -B/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/ -B/usr/x86_64-openEuler-linux/bin/ -B/usr/x86_64-openEuler-linux/lib/ -isystem /usr/x86_64-openEuler-linux/include -isystem /usr/x86_64-openEuler-linux/sys-include -fno-checking -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -O2 -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _gcov_pow2_profiler.o -MT _gcov_pow2_profiler.o -MD -MP -MF _gcov_pow2_profiler.dep -DL_gcov_pow2_profiler -c ../../../libgcc/libgcov-profiler.c In file included from ../.././gcc/options.h:8, from ../.././gcc/tm.h:22, from ../../../libgcc/libgcov.h:44, from ../../../libgcc/libgcov-profiler.c:26: ../../../libgcc/../gcc/config/i386/i386-opts.h:25: error: unterminated #ifndef 25 | #ifndef I386_OPTS_H | /root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/xgcc -B/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/ -B/usr/x86_64-openEuler-linux/bin/ -B/usr/x86_64-openEuler-linux/lib/ -isystem /usr/x86_64-openEuler-linux/include -isystem /usr/x86_64-openEuler-linux/sys-include -fno-checking -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -O2 -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _gcov_pow2_profiler_atomic.o -MT _gcov_pow2_profiler_atomic.o -MD -MP -MF _gcov_pow2_profiler_atomic.dep -DL_gcov_pow2_profiler_atomic -c ../../../libgcc/libgcov-profiler.c make[3]: *** [Makefile:923: _gcov_interval_profiler_atomic.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory '/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/x86_64-openEuler-linux/libgcc' make[2]: *** [Makefile:20388: all-stage1-target-libgcc] Error 2 make[2]: Leaving directory '/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux' make[1]: *** [Makefile:26125: stage1-bubble] Error 2 make[1]: Leaving directory '/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux' make: *** [Makefile:1073: all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.NAPUz5 (%build) ``` **【期望结果】**,请描述出期望的结果和影响 编译成功 **【其他相关附件信息】** 比如系统message日志/组件日志、dump信息、图片等 **【缺陷详情及分析指导参考链接】**
**【缺陷描述】:2203版本gcc编译高版本gcc,编译时不带--disable-bootstrap选项,编译失败** **一、缺陷信息** **【缺陷所属的os版本】(如openEuler-22.03-LTS,参考命令"cat /etc/os-release"结果)** openEuler-22.03-LTS **【缺陷所属软件及版本号】** gcc-10.3.1-67.oe2203sp4.x86_64 **【环境信息】** oe-2203版本的环境 **【问题复现步骤】:请描述具体的操作步骤** 1.创建oe-2203版本的环境 2.下载oe-2403-LTS-SP1版本的gcc并删除gcc.spec中 编译gcc时的--disable-bootstrap 选项 ``` # Add Secure Compilation Options OPT_FLAGS="$OPT_FLAGS -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now" OPT_LDFLAGS="$OPT_LDFLAGS -Wl,-z,relro,-z,now" # Disable bootstrap for saving compilation time export extra_ldflags_libobjc="-Wl,-z,relro,-z,now" export FCFLAGS="$OPT_FLAGS" CC="$CC" CXX="$CXX" \ CFLAGS="$OPT_FLAGS" \ CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \ | sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \ CFLAGS_FOR_TARGET="$OPT_FLAGS" \ CXXFLAGS_FOR_TARGET="$OPT_FLAGS" \ XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" GCJFLAGS="$OPT_FLAGS" \ - ../configure --disable-bootstrap --disable-libgcj --without-cloog\ + ../configure --disable-libgcj --without-cloog\ --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo}${enableld},lto \ $CONFIGURE_OPTS ``` 3.使用oe-2203版本gcc编译oe-2403-LTS-SP1版本的gcc ``` rpmbuild -ba gcc.spec ``` **【实际结果】**,请描述出问题的结果和影响 编译失败报错如下: ``` /root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/xgcc -B/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/ -B/usr/x86_64-openEuler-linux/bin/ -B/usr/x86_64-openEuler-linux/lib/ -isystem /usr/x86_64-openEuler-linux/include -isystem /usr/x86_64-openEuler-linux/sys-include -fno-checking -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -O2 -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _gcov_pow2_profiler.o -MT _gcov_pow2_profiler.o -MD -MP -MF _gcov_pow2_profiler.dep -DL_gcov_pow2_profiler -c ../../../libgcc/libgcov-profiler.c In file included from ../.././gcc/options.h:8, from ../.././gcc/tm.h:22, from ../../../libgcc/libgcov.h:44, from ../../../libgcc/libgcov-profiler.c:26: ../../../libgcc/../gcc/config/i386/i386-opts.h:25: error: unterminated #ifndef 25 | #ifndef I386_OPTS_H | /root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/xgcc -B/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/./gcc/ -B/usr/x86_64-openEuler-linux/bin/ -B/usr/x86_64-openEuler-linux/lib/ -isystem /usr/x86_64-openEuler-linux/include -isystem /usr/x86_64-openEuler-linux/sys-include -fno-checking -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -O2 -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _gcov_pow2_profiler_atomic.o -MT _gcov_pow2_profiler_atomic.o -MD -MP -MF _gcov_pow2_profiler_atomic.dep -DL_gcov_pow2_profiler_atomic -c ../../../libgcc/libgcov-profiler.c make[3]: *** [Makefile:923: _gcov_interval_profiler_atomic.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory '/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux/x86_64-openEuler-linux/libgcc' make[2]: *** [Makefile:20388: all-stage1-target-libgcc] Error 2 make[2]: Leaving directory '/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux' make[1]: *** [Makefile:26125: stage1-bubble] Error 2 make[1]: Leaving directory '/root/rpmbuild/BUILD/gcc-12.3.0/obj-x86_64-openEuler-linux' make: *** [Makefile:1073: all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.NAPUz5 (%build) ``` **【期望结果】**,请描述出期望的结果和影响 编译成功 **【其他相关附件信息】** 比如系统message日志/组件日志、dump信息、图片等 **【缺陷详情及分析指导参考链接】**
评论 (
2
)
登录
后才可以发表评论
状态
待办的
待办的
已挂起
修复中
已确认
已完成
已验收
已取消
负责人
未设置
Haijian.Zhang
haijianzhang
负责人
协作者
+负责人
+协作者
标签
sig/Compiler
DEFECT/UNFIXED
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (33)
标签 (33)
master
openEuler-24.03-LTS-Next
openEuler-25.09
openEuler-24.03-LTS-SP2
openEuler-24.03-LTS-SP1
openEuler-25.03
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-20.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.09
openEuler-22.03-LTS-SP1
openEuler-22.03-LTS-Next
openEuler-22.03-LTS
openEuler-22.03-LTS-SP2
openEuler-20.03-LTS-SP1
openEuler-20.03-LTS-SP3
openEuler-23.09
upgrade-gcc-12
openEuler-23.03
openEuler-22.03-LTS-LoongArch
openEuler-22.09
openEuler-22.03-LTS-performance
openEuler-20.03-LTS-SP2
openEuler-21.09
openEuler-20.03-LTS-Next
openEuler-20.03-LTS
openEuler-21.03-performance
openEuler-20.09
openEuler-21.03
openEuler-20.03-LTS-performance
openEuler1.0
openEuler1.0-base
openEuler-24.03-LTS-SP2-update-20250912
openEuler-22.03-LTS-SP4-update-20250829
openEuler-24.03-LTS-SP2-update-20250725
openEuler-24.03-LTS-SP2-update-20250718
openEuler-24.03-LTS-SP2-release
openEuler-25.03-release
openEuler-20.03-LTS-SP4-update-20250221
openEuler-24.03-LTS-update-20250117
openEuler-24.03-LTS-SP1-release
openEuler-22.03-LTS-SP4-update-20241220
openEuler-22.03-LTS-SP4-update-before-20241025
openEuler-24.03-LTS-update-20241101
openEuler-22.03-LTS-SP4-release
openEuler-24.09-release
openEuler-24.03-LTS-release
openEuler-22.03-LTS-SP3-release
openEuler-23.09-rc5
openEuler-22.03-LTS-Next-release-20221230
openEuler-22.03-LTS-SP1-release
openEuler-22.09-release
openEuler-22.09-rc5
openEuler-22.09-20220829
openEuler-22.03-LTS-20220331
openEuler-22.03-LTS-round5
openEuler-22.03-LTS-round3
openEuler-22.03-LTS-round2
openEuler-22.03-LTS-round1
openEuler-20.03-LTS-SP3-release
openEuler-20.03-LTS-SP2-20210624
openEuler-21.03-20210330
openEuler-20.09-20200929
openEuler-20.03-LTS-20200606
openEuler-20.03-LTS-tag
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)
1
https://gitee.com/src-openeuler/gcc.git
git@gitee.com:src-openeuler/gcc.git
src-openeuler
gcc
gcc
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册