代码拉取完成,页面将自动刷新
【标题描述】 -O3 -flto -flto-partition=one -ficp -fipa-prefetch选项编译SQLite报ICE:lto1: internal compiler error: Segmentation fault(during IPA pass: sra)
一、缺陷信息
【环境信息】
软件信息
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/10.3.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,objc,obj-c++,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --without-cloog --enable-gnu-indirect-function --build=aarch64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --disable-bootstrap --with-multilib-list=lp64 --enable-bolt
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 (GCC)
【问题复现步骤】
1.配置工具链:
export PATH=/usr/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
2.将编译器工具链中的./libexec/gcc/aarch64-linux-gnu/10.3.1/liblto_plugin.so.0.0.0拷贝至系统/usr/lib64/bfd-plugins目录,并进行软连接
ln -s liblto_plugin.so.0.0.0 liblto_plugin.so.0
ln -s liblto_plugin.so.0.0.0 liblto_plugin.so
3.获取源码:https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
4.执行以下命令进行编译安装
tar -zxvf sqlite-autoconf-3280000.tar.gz
cd sqlite-autoconf-3280000
./configure --prefix=/path/sqlite CFLAGS="-O3 -flto -flto-partition=one -ficp -fipa-prefetch " CPPFLAGS=" -O3 -flto -flto-partition=one -ficp -fipa-prefetch"
make -j4
【实际结果】