Rainer Orth <r...@cebitec.uni-bielefeld.de> writes:

> I think the following patch should fix all broken targets.  For those
> that previously had crtfastmath.o in EXTRA_PARTS, I'm adding it to
> config.gcc (extra_parts) explicitly.
>
> The non-Linux x86 glibc targets were missed before.  I move the
> extra_parts addition down so they all benefit from it.  The duplication
> with i386/t-linux64 shouldn't matter since gcc/Makefile.in
> (GCC_EXTRA_PARTS) merges them and removes duplicates.
>
> ia64*-*-elf* is also affected because it has its own extra_parts, which
> is now unnecessary.
>
> Unless I get confirmation that this patch breaks nothing and fixes the
> majority of affected targets, I'll leave it as is and work to remove the
> duplication over the weekend, moving
> extra_parts/EXTRA_PARTS/EXTRA_MULTILIB_PARTS and referenced source files
> over to libgcc.  While this is the way we want to go, it is clearly more
> risky than this stop gap measure.

Unfortunately, nobody reviewed the patch.  There's now also PR
bootstrap/49769 for Linux/SPARC.

I've started working on the extra_parts move this weekend, but didn't
find much time and it proved to be more involved than it seemed at
first.  It will be at least another week before it is ready, and far
more invasive than this one.

        Rainer


> 2011-07-14  Rainer Orth  <r...@cebitec.uni-bielefeld.de>
>
>       gcc:
>       * config.gcc (alpha*-*-linux*): Add crtfastmath.o to extra_parts.
>       (alpha*-*-freebsd*): Likewise.
>       (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu,
>       i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*,
>       i[34567]86-*-kopensolaris*-gnu): Add crtprec32.o, crtprec64.o,
>       crtprec80.o, crtfastmath.o to extra_parts for all targets.
>       (ia64*-*-elf*): Remove extra_parts.
>       (sparc-*-linux*): Add crtfastmath.o to extra_parts.
>       (sparc64-*-linux*): Likewise.
>       (sparc64-*-freebsd*): Likewise.
>
>       Revert:
>       * config.gcc (ia64*-*-freebsd*): Remove crtfastmath.o from extra_parts.
>       (ia64*-*-linux*): Likewise.
>       (mips64*-*-linux*): Likewise.
>       (mips*-*-linux*): Likewise.
>
> Index: gcc/config.gcc
> ===================================================================
> --- gcc/config.gcc    (revision 176266)
> +++ gcc/config.gcc    (working copy)
> @@ -757,13 +757,14 @@
>       extra_options="${extra_options} alpha/elf.opt"
>       target_cpu_default="MASK_GAS"
>       tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee alpha/t-linux"
> +     extra_parts="${extra_parts} crtfastmath.o"
>       ;;
>  alpha*-*-freebsd*)
>       tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
>       extra_options="${extra_options} alpha/elf.opt"
>       target_cpu_default="MASK_GAS"
>       tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
> -     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
> +     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o 
> crtfastmath.o"
>       ;;
>  alpha*-*-netbsd*)
>       tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
> @@ -1304,9 +1305,6 @@
>                       esac
>               else
>                       tm_file="${tm_file} i386/gnu-user.h i386/linux.h"
> -                     # This is a hack to avoid a configuration mismatch
> -                     # until the toplevel libgcc move is complete.
> -                     extra_parts="${extra_parts} crtprec32.o crtprec64.o 
> crtprec80.o crtfastmath.o"
>               fi
>               ;;
>       i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/gnu-user.h 
> knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
> @@ -1315,6 +1313,9 @@
>       i[34567]86-*-gnu*) tm_file="$tm_file i386/gnu-user.h gnu.h i386/gnu.h";;
>       esac
>       tmake_file="${tmake_file} i386/t-crtstuff"
> +     # This is a hack to avoid a configuration mismatch
> +     # until the toplevel libgcc move is complete.
> +     extra_parts="${extra_parts} crtprec32.o crtprec64.o crtprec80.o 
> crtfastmath.o"
>       ;;
>  x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
>       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h 
> glibc-stdint.h \
> @@ -1594,13 +1595,13 @@
>       then
>               target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
>       fi
> -     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
> +     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
>       ;;
>  ia64*-*-freebsd*)
>       tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h 
> ia64/freebsd.h"
>       target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
>       tmake_file="${tmake_file} ia64/t-ia64"
> -     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
> +     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
>       ;;
>  ia64*-*-linux*)
>       tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h 
> ia64/sysv4.h ia64/linux.h"
> @@ -1609,7 +1610,7 @@
>               tmake_file="${tmake_file} t-libunwind-elf 
> ia64/t-glibc-libunwind"
>       fi
>       target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
> -     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
> +     extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
>       ;;
>  ia64*-*-hpux*)
>       tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
> @@ -1849,6 +1850,7 @@
>                       tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
>                       ;;
>       esac
> +     extra_parts="$extra_parts crtfastmath.o"
>       gnu_ld=yes
>       gas=yes
>       test x$with_llsc != x || with_llsc=yes
> @@ -1868,6 +1870,7 @@
>          mipsisa32*)
>               tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
>          esac
> +     extra_parts="$extra_parts crtfastmath.o"
>       test x$with_llsc != x || with_llsc=yes
>       ;;
>  mips*-*-openbsd*)
> @@ -2493,6 +2496,7 @@
>       else
>               tm_file="${tm_file} sparc/linux.h"
>       fi
> +     extra_parts="${extra_parts} crtfastmath.o"
>       ;;
>  sparc-*-netbsdelf*)
>       tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h 
> netbsd-elf.h sparc/netbsd-elf.h"
> @@ -2528,6 +2532,7 @@
>       tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h 
> gnu-user.h linux.h glibc-stdint.h sparc/linux64.h"
>       extra_options="${extra_options} sparc/long-double-switch.opt"
>       tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64"
> +     extra_parts="${extra_parts} crtfastmath.o"
>       ;;
>  sparc64-*-freebsd*|ultrasparc-*-freebsd*)
>       tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h 
> sparc/freebsd.h"
> @@ -2537,6 +2542,7 @@
>               x) with_cpu=ultrasparc ;;
>               *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
>       esac
> +     extra_parts="${extra_parts} crtfastmath.o"
>       ;;
>  sparc64-*-netbsd*)
>       tm_file="sparc/biarch64.h ${tm_file}"

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to