This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] m68k: Add support for fido.


Ian Lance Taylor wrote:
> Kazu Hirata <kazu@codesourcery.com> writes:
> 
>> +fido-*-elf*)
>> +	default_m68k_cpu=fidoa
>> +	case $with_cpu in
>> +	"" | "fidoa")
>> +		;;
>> +	*)
>> +		echo "Cannot accept --with-cpu=$with_cpu"
>> +		exit 1
>> +		;;
>> +	esac
>> +	with_cpu=fidoa
>> +	tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h"
>> +	tm_defines="${tm_defines} MOTOROLA=1 USE_GAS"
>> +	tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
>> +	extra_parts="crtbegin.o crtend.o"
>> +	;;
> 
> It seems to me that most targets are moving in the direction of using
> --with-arch/--with-tune/--with-cpu rather than having separate
> configuration names for each possible target.
> 
> Does anybody have an opinion on whether we should encourage that by
> avoiding adding new configuration triplets like fido-elf?

I don't like the config.gcc duplication caused by this patch; most of
the configuration is identical to the m68k-*-elf* case,
but now we have do places to change.

However, I'm not sure about the larger point you're raising.  I think
that using --with- options would be abstract better, but I also think
that fido users are unlikely to want ColdFire multilibs, which would be
a consequence of using the generic m68k-*-elf* configuration with
--with-cpu.  (I still think we're going to want to find a way to specify
multilibs at configure-time.)  In any case, for good or ill, fido is now
recognized in config.sub, so we need a case for it config.gcc.

I think what we should do is change the m68k-*-elf* case to also handle
fido-*-elf*, but then have a sub-case for fido-*-elf* that overrides:

1. default_m68k_cpu to fidoa

2. does not include m68k/t-mlibs for fido.

Like so:

m68020-*-elf* | m68k-*-elf* | fido*-*-elf*)
        case ${target} in
            fido*-*-elf*)
              default_m68k_cpu=fidoa;;
            *)
              default_m68k_cpu=68020
              ;;
        esac
        default_cf_cpu=5206
        tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h
elfos.h m68k/m68kemb.h m68k/m68020-elf.h"
        tm_defines="${tm_defines} MOTOROLA=1 USE_GAS"
        tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"

        case ${target} in
            fido*-*-elf*)
              ;;
            *)
              tmake_file="$tmake_file m68k/t-mlibs"
              ;;
        esac
        extra_parts="crtbegin.o crtend.o"
        ;;

In any case, the config/68k parts of the change are OK, unless the 68K
maintainers object within 48 hours.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]