This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC PATCH]: Sparc gold support
David Miller <davem@davemloft.net> writes:
>> The entries in configure.tgt have two purposes. One is to tell gold
>> which combinations to build. The other is to set the default to use
>> when there is no input file. So I think we need to add
>> targ_extra_size and targ_extra_big_endian. Those will be used to set
>> target_32_little, etc., but won't change default_size, etc.
>
> This should match your suggestion:
This is OK with a ChangeLog entry (or I'll commit it, if you like, to
rebuild configure with the identical tool).
Thanks.
Ian
> Index: configure.ac
> ===================================================================
> RCS file: /cvs/src/src/gold/configure.ac,v
> retrieving revision 1.29
> diff -u -p -r1.29 configure.ac
> --- configure.ac 11 Apr 2008 21:24:29 -0000 1.29
> +++ configure.ac 15 Apr 2008 03:21:53 -0000
> @@ -107,24 +107,25 @@ for targ in $target $canon_targets; do
> AC_MSG_ERROR("unsupported target $targ")
> else
> targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
> - if test "$targ_size" = "32"; then
> - if test "$targ_big_endian" = "false"; then
> - targ_32_little=yes
> - elif test "$targ_big_endian" = "true"; then
> - targ_32_big=yes
> - else
> - AC_MSG_ERROR("bad configure.tgt endian $targ_big_endian")
> - fi
> - elif test "$targ_size" = "64"; then
> - if test "$targ_big_endian" = "false"; then
> - targ_64_little=yes
> - elif test "$targ_big_endian" = "true"; then
> - targ_64_big=yes
> - else
> - AC_MSG_ERROR("bad configure.tgt endian $targ_big_endian")
> - fi
> - else
> - AC_MSG_ERROR("bad configure.tgt size $targ_size")
> + if test "$targ_size" = "32" -o "$targ_extra_size" = "32"; then
> + if test "$targ_big_endian" = "true" \
> + -o "$targ_extra_big_endian" = "true"; then
> + targ_32_big=yes
> + fi
> + if test "$targ_big_endian" = "false" \
> + -o "$targ_extra_big_endian" = "false"; then
> + targ_32_little=yes
> + fi
> + fi
> + if test "$targ_size" = "64" -o "$targ_extra_size" = "64"; then
> + if test "$targ_big_endian" = "true" \
> + -o "$targ_extra_big_endian" = "true"; then
> + targ_64_big=yes
> + fi
> + if test "$targ_big_endian" = "false" \
> + -o "$targ_extra_big_endian" = "false"; then
> + targ_64_little=yes
> + fi
> fi
>
> if test "$target" = "$targ"; then
> Index: configure.tgt
> ===================================================================
> RCS file: /cvs/src/src/gold/configure.tgt,v
> retrieving revision 1.1
> diff -u -p -r1.1 configure.tgt
> --- configure.tgt 6 Feb 2008 20:32:10 -0000 1.1
> +++ configure.tgt 15 Apr 2008 03:21:53 -0000
> @@ -29,10 +29,12 @@
> # canonicalized GNU configuration triplet. It sets the following
> # shell variables:
>
> -# targ_obj object file to include in the link, with no extension
> -# targ_machine ELF machine code for this target
> -# targ_size size of this target--32 or 64
> -# targ_big_endian whether the target is big-endian--true or false
> +# targ_obj object file to include in the link, with no extension
> +# targ_machine ELF machine code for this target
> +# targ_size size of this target--32 or 64
> +# targ_extra_size extra targ_size setting for the target
> +# targ_big_endian whether the target is big-endian--true or false
> +# targ_extra_big_endian extra targ_big_endian setting for the target
>
> # If the target is not recognized targ_obj is set to "UNKNOWN".
>
> @@ -49,6 +51,22 @@ x86_64*)
> targ_size=64
> targ_big_endian=false
> ;;
> +sparc-*)
> + targ_obj=sparc
> + targ_machine=EM_SPARC
> + targ_size=32
> + targ_extra_size=64
> + targ_big_endian=true
> + targ_extra_big_endian=false
> + ;;
> +sparc64-*)
> + targ_obj=sparc
> + targ_machine=EM_SPARCV9
> + targ_size=64
> + targ_extra_size=32
> + targ_big_endian=true
> + targ_extra_big_endian=false
> + ;;
> *)
> targ_obj=UNKNOWN
> ;;