Hi, We error in the case where both --with-tune and --with-cpu are specified at configure time. In this case, we cannot distinguish this situation from the situation where --with-tune was specified at configure time and -mcpu was passed on the command line, so we give -mcpu precedence.
This might be surprising if you expect the precedence rules we give to the command line options, but we can't change this precedence without breaking our definition of -mcpu. We also promote the warning which used to be thrown in the case of --with-arch and --with-cpu to an error. I've marked this is an RFC as it isn't clear that configure should be catching something like this. Other blatant errors in configuration options like passing "--with-languages=c,c++" pass without event. Tested with a few combinations of configure options with no issues and the expected behaviour. Any opinions, and if not, OK for trunk? Thanks, James --- gcc/ 2014-05-30 James Greenhalgh <james.greenha...@arm.com> * config.gcc (supported_defaults): Error when passing either --with-tune or --with-arch in conjunction with --with-cpu for ARM.
diff --git a/gcc/config.gcc b/gcc/config.gcc index c3f3ea6..7e82700 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3560,7 +3560,13 @@ case "${target}" in esac if test "x$with_arch" != x && test "x$with_cpu" != x; then - echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2 + echo "Switch \"--with-arch\" may not be used with switch \"--with-cpu\"" 1>&2 + exit 1 + fi + + if test "x$with_cpu" != x && test "x$with_tune" != x; then + echo "Switch \"--with-tune\" may not be used with switch \"--with-cpu\"" 1>&2 + exit 1 fi # Add extra multilibs