https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84260
Bug ID: 84260 Summary: gcc for mips produces an error when called with --help=<class> Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: niva at niisi dot msk.ru Target Milestone: --- Gcc configured for a mips target: Target: mips64-niisi_ocrv_posix-elf Configured with: /home/sap/src/bt23j-gcc-7.3.1/configure --target=mips64-niisi_ocrv_posix-elf --prefix=/home/sap/local-bt23jj-7.3 --enable-threads=posix --disable-shared --enable-libgomp --enable-libatomic --enable-lto --enable-languages=c,c++ --program-transform-name='s,^,bt23jj-,' --disable-tls --enable-serial-configure --disable-__cxa_atexit --with-sysroot --with-gmp=/home/sap/gcc-infra --with-mpfr=/home/sap/gcc-infra --with-mpc=/home/sap/gcc-infra Thread model: posix gcc version 7.3.0 (GCC) produces the following error when called with --help=target (or other class): cc1: error: position-independent code requires ‘-mabicalls’ The error is issued in mips_option_override because it is called earlier than finish_options where the proper default value global_options.x_flag_pic=0 is set. When mips_option_override is called, global_options.x_flag_pic==-1. Probably mips_option_override should check the condition (flag_pic > 0).