Can you have a try to force nan=legacy? martin krastev <blu.dark@xxxxxxxxx> 于2018年8月1日周三 上午6:29写道: > > Hi YunQiang, > > Nope, I haven't passed to the config anything beyond what I already posted in the original post. > > I'll drop --with-float=hard next and see what happens, as a shot in the dark. > > Best regards, > Martin > > On Tue, 31 Jul 2018 at 12:29, YunQiang Su <wzssyqa@xxxxxxxxx> wrote: >> >> Jonathan Wakely <jwakely.gcc@xxxxxxxxx> 于2018年7月31日周二 下午4:37写道: >> > >> > On Tue, 31 Jul 2018 at 07:25, martin krastev <blu.dark@xxxxxxxxx> wrote: >> > > >> > > Hello, >> > > >> > > I'm trying to build gcc-7.3.0 (md5 747d5010b7c6938b480bc6e4d7c4be9a of >> > > tar.gz) natively on a MACHTYPE=mipsel-unknown-linux-gnu MIPS p5600 machine >> > > under Debian Stretch. I'm getting an illegal instruction during libstdc++ >> > > build phase: >> > >> > This mailing list is for discussion of GCC development, not help using >> > or building GCC. Your mail would be appropriate on the gcc-help list, >> > which I've CC'd. Please remove gcc@ from further replies and use the >> > gcc-help@ list. >> > >> > > libtool: compile: /home/gru/proj/gcc_build/./gcc/xgcc -shared-libgcc >> > > -B/home/gru/proj/gcc_build/./gcc -nostdinc++ >> > > -L/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/src >> > > -L/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/src/.libs >> > > -L/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/libsupc++/.libs >> > > -B/usr/local/mipsel-linux-gnu/bin/ -B/usr/local/mipsel-linux-gnu/lib/ >> > > -isystem /usr/local/mipsel-linux-gnu/include -isystem >> > > /usr/local/mipsel-linux-gnu/sys-include >> > > -I/home/gru/proj/gcc-7.3.0/libstdc++-v3/../libgcc >> > > -I/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/mipsel-linux-gnu >> > > -I/home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include >> > > -I/home/gru/proj/gcc-7.3.0/libstdc++-v3/libsupc++ -D_GLIBCXX_SHARED >> > > -std=gnu++14 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi >> > > -fdiagnostics-show-location=once -ffunction-sections -fdata-sections >> > > -frandom-seed=cow-ops.lo -g -O2 -D_GNU_SOURCE -minterlink-mips16 -c >> > > /home/gru/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/filesystem/cow-ops.cc >> > > -fPIC -DPIC -D_GLIBCXX_SHARED -o cow-ops.o >> > > In file included from >> > > /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/vector:64:0, >> > > from >> > > /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/experimental/bits/fs_path.h:39, >> > > from >> > > /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/experimental/filesystem:39, >> > > from >> > > /home/gru/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/filesystem/dir.cc:29, >> > > from >> > > /home/gru/proj/gcc_build/../gcc-7.3.0/libstdc++-v3/src/filesystem/cow-dir.cc:26: >> > > /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/bits/stl_vector.h: >> > > In member function 'void std::vector<_Tp, >> > > _Alloc>::_M_move_assign(std::vector<_Tp, _Alloc>&&, std::true_type) [with >> > > _Tp = std::experimental::filesystem::v1::path::_Cmpt; _Alloc = >> > > std::allocator<std::experimental::filesystem::v1::path::_Cmpt>]': >> > > /home/gru/proj/gcc_build/mipsel-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:1531:9: >> > > internal compiler error: Illegal instruction >> > > vector __tmp(get_allocator()); >> > > ^~~~~ >> > > 0x159a473 crash_signal >> > > /home/gru/proj/gcc_build/../gcc-7.3.0/gcc/toplev.c:337 >> > > Please submit a full bug report, >> > > with preprocessed source if appropriate. >> > > Please include the complete backtrace with any bug report. >> > > See <https://gcc.gnu.org/bugs/> for instructions. >> > > Makefile:523: recipe for target 'cow-dir.lo' failed >> > > make[6]: *** [cow-dir.lo] Error 1 >> > > >> > > >> > > I have configured and launched the build as: >> > > >> > > $ CPATH=/usr/include/mipsel-linux-gnu/ >> > > LIBRARY_PATH=/usr/lib/mipsel-linux-gnu/ $PWD/../gcc-7.3.0/configure >> > > --enable-languages=c,c++ --with-float=hard --disable-multiarch >> > > --target=mipsel-linux-gnu >> > > $ CPATH=/usr/include/mipsel-linux-gnu >> > > LIBRARY_PATH=/usr/lib/mipsel-linux-gnu make -j2 >> > > >> > > I've clearly misconfigured the build -- xgcc ended up with a wrong ISA, but >> > > I can't figure out how. What am I missing? >> > >> >> Do you pass some option like march=p6500 etc or native? >> I guess the problem is about nan=2008 vs nan=legacy. >> >> > The most common reason for SIGILL is that one of the support libraries >> > (gmp, mpfr, or mpc) has been built with the wrong ISA. I wouldn't >> > expect that to fail on that line in libstdc++, but it's worth >> > checking. >> > >> > The simplest way to build those libraries for use with GCC is to put >> > their sources in the GCC source tree, as done by the >> > contrib/download_prerequisites script. See >> > https://gcc.gnu.org/wiki/InstallingGCC for more info. >> >> >> >> -- >> YunQiang Su -- YunQiang Su