Hi Marcus: > I could also disable the -mlittle-endian and -mbig-endian options if > the binutils is too old, but it's questionable if getting a "I don't > understand -mbig-endian" from gcc is more useful than getting it from > gas. And it would be more work for the user to fix it since then they > would have to also rebuild gcc after upgrading binutils.
Sounds reasonable to me, I am ok with keeping it as it is without binutils change. I tried to run with gcc testsuite on spike + pk, seems got a bunch extra fail cases, could you take a look for that? ========= Summary of gcc testsuite ========= | # of unexpected case / # of unique unexpected case | gcc | g++ | gfortran | rv64gc/ lp64/ medlow | 476 / 109 | 131 / 25 | - | Makefile:914: recipe for target 'report-gcc-newlib' failed I've setup test env via riscv-gnu-toolchain, you can reproduce by following command: $ git clone g...@github.com:riscv/riscv-gnu-toolchain.git -b big-endian riscv-gnu-toolchain-be $ cd riscv-gnu-toolchain-be $ mkdir build && cd build $ ../configure --prefix=`pwd`/install --with-arch=rv64gc --with-multilib-generator="rv64gc-lp64--" $ make report SIM=spike -j`nproc` On Sat, Jan 30, 2021 at 3:54 AM Marcus Comstedt <mar...@mc.pp.se> wrote: > > > Hi Kito, > > Kito Cheng <kito.ch...@gmail.com> writes: > > > You can add a check in configure.ac and config.in to detect whether > > binutils is supported or not. > > here is example, search HAVE_AS_MISA_SPEC in this patch: > > https://github.com/gcc-mirror/gcc/commit/4b81528241ca682025d92558ff6aeec91dafdca8 > > Ok, but I specifically _don't_ want to require a newer binutils for > the little endian triplets (unless there is also some other RISC-V > change meaning that the newer binutils is needed anyway, in which case > this point becomes moot). > > I could check the binutils version in the case of big endian triplets > only, but since older binutils can't be built for those triplets > anyway (due to config.sub), I don't think it would do much. > > I could also disable the -mlittle-endian and -mbig-endian options if > the binutils is too old, but it's questionable if getting a "I don't > understand -mbig-endian" from gcc is more useful than getting it from > gas. And it would be more work for the user to fix it since then they > would have to also rebuild gcc after upgrading binutils. > > > // Marcus > >