This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [PATCH]: Turn on all for Linux/ia32
On Thu, Mar 02, 2000 at 01:22:31PM -0500, Ian Lance Taylor wrote:
>
> I think this needs more work. I don't mind in principle supporting
> --enable-targets=all for gas, although I'm concerned that it is
> misleading since it does not actually support all targets.
>
> Your patch will run the `all' case through the whole target switch.
> That doesn't make sense given the way it is written and the different
> cases it goes through. I think it only works because the shell
> variables happen to have been set in the earlier loop iteration.
>
> I think it would be cleaner to handle the `all' case separately.
> Right now it is nearly meaningless, but perhaps it can become more
> meaningful over time. I don't think putting `all' in canon_targets is
> really the right approach for the assembler.
>
> Ian
How about this patch? I can limit it to Linux only. But I thought
why not support others.
--
H.J. Lu (hjl@gnu.org)
---
2000-03-02 H.J. Lu (hjl@gnu.org)
* configure.in: Support --enable-targets=all on ia32.
* configure: Regenerated.
Index: configure.in
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/configure.in,v
retrieving revision 1.1.1.16
diff -u -p -r1.1.1.16 configure.in
--- configure.in 2000/02/25 22:34:51 1.1.1.16
+++ configure.in 2000/03/02 20:03:52
@@ -59,8 +59,13 @@ te_file=generic
install_tooldir=install-exec-tooldir
canon_targets=""
+all_targets=no
if test -n "$enable_targets" ; then
for t in `echo $enable_targets | sed 's/,/ /g'`; do
+ if test $t = "all"; then
+ all_targets=yes
+ continue
+ fi
result=`$ac_config_sub $t 2>/dev/null`
if test -n "$result" ; then
canon_targets="$canon_targets $result"
@@ -518,6 +523,25 @@ changequote([,])dnl
emulations="$emulations $emulation"
done
+
+# Turn on all targets if possible
+if test ${all_targets} = "yes"; then
+ case ${target_cpu_type} in
+ i386)
+ case ${obj_format} in
+ aout)
+ emulations="$emulations i386coff i386elf"
+ ;;
+ coff)
+ emulations="$emulations i386aout i386elf"
+ ;;
+ elf)
+ emulations="$emulations i386aout i386coff"
+ ;;
+ esac
+ ;;
+ esac
+fi
# Assign floating point type. Most processors with FP support
# IEEE FP. On those that don't support FP at all, usually IEEE