Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
23
Star
30
Fork
165
src-openEuler
/
gcc
Closed
Code
Issues
30
Pull Requests
12
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
2203版本gcc编译高版本gcc,编译时不带--disable-bootstrap选项,编译失败
Done
#IBSL4A
Bug
胡宇彪
Opened this issue
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信息、图片等 **【缺陷详情及分析指导参考链接】**
Comments (
2
)
Sign in
to comment
Status
Done
Backlog
已挂起
Fixing
Confirmed
Done
Accepted
Canceled
Assignees
Not set
Haijian.Zhang
haijianzhang
Assignee
Collaborator
+Assign
+Mention
Labels
sig/Compiler
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(2)
1
https://gitee.com/src-openeuler/gcc.git
git@gitee.com:src-openeuler/gcc.git
src-openeuler
gcc
gcc
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register