RFC & patch: Rework MIPS command-line handling

cgd@broadcom.com cgd@broadcom.com
Tue Jul 16 18:57:00 GMT 2002


At Tue, 16 Jul 2002 18:51:38 -0700, H. J. Lu wrote:
> On Tue, Jul 16, 2002 at 05:29:01PM -0700, cgd@broadcom.com wrote:
> > 
> > Similarly, if I ship mipsisa64sb1-linux tools to customers, my strong
> > hope is that they won't need to name -march=sb1 on every command
> > line... because that's the whole bloody reason a specific target other
> > than mips-linux was used for the build.
> 
> Does gcc support that? It is a nice thing to have. However, given the
> varieties of MIPS cpus, I don't know if it is feasible. Maybe something
> like --with-default-target=xxx.

Uh, there are _lots_ of different cpu types supported in config.sub
for mips.

Right now the configury for mips linux looks like:

mips*-*-linux*)                         # Linux MIPS, either endian.
        tm_file="dbxelf.h elfos.h svr4.h linux.h mips/linux.h"
        case $machine in
        mipsisa32*-*)
                tm_file="$tm_file mips/isa32-linux.h"
                target_cpu_default="MASK_SOFT_FLOAT"
                ;;
        esac
        tmake_file="t-slibgcc-elf-ver t-linux mips/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o
        crtendS.o"
        gnu_ld=yes
        gas=yes
        if test x$enable_threads = xyes; then
                thread_file='posix'
        fi
        ;;

that plus upcoming changes from Eric or Richard (i forget which) to
make default CPU done via a define rather than string match on the
name make it really easy.

There's something to be said for trying to do the CPU name -> default
ISA/arch selection more generically (i.e., so they're OS-independent),
but in the absence of that it would be obvious where to poke the right
code in.



cgd



More information about the Binutils mailing list