This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Only define add_lto_object in collect2.c on ELF targets
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Rainer Orth <ro at techfak dot uni-bielefeld dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 Oct 2009 11:16:25 +0200
- Subject: Re: PATCH: Only define add_lto_object in collect2.c on ELF targets
- References: <19146.9907.898846.687713@komagatake.TechFak.Uni-Bielefeld.DE>
On Mon, Oct 5, 2009 at 7:02 PM, Rainer Orth <ro@techfak.uni-bielefeld.de> wrote:
> Current mainline (as of 20091005, rev 152443) fails to bootstrap on non-ELF
> (and thus non-LTO) targets like Tru64 UNIX V5.1B:
>
> cc1: warnings being treated as errors
> /vol/gcc/src/gcc-dist/gcc/collect2.c:861:1: error: 'add_lto_object' defined but
> not used
> make[3]: *** [collect2.o] Error 1
>
> The following trivial patch fixes this and allows bootstrap to continue.
>
> Ok for mainline?
Ok.
Thanks,
Richard.
> ? ? ? ?Rainer
>
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2009-10-05 ?Rainer Orth ?<ro@CeBiTec.Uni-Bielefeld.DE>
>
> ? ? ? ?* collect2.c (add_lto_object): Only define if OBJECT_FORMAT_NONE.
>
> Index: gcc/collect2.c
> ===================================================================
> --- gcc/collect2.c ? ? ?(revision 152443)
> +++ gcc/collect2.c ? ? ?(working copy)
> @@ -853,6 +853,8 @@
> ? free (nstore);
> ?}
>
> +#ifdef OBJECT_FORMAT_NONE
> +
> ?/* Add an entry for the object file NAME to object file list LIST.
> ? ?New entries are added at the end of the list. The original pointer
> ? ?value of NAME is preserved, i.e., no string copy is performed. ?*/
> @@ -871,6 +873,7 @@
>
> ? list->last = n;
> ?}
> +#endif /* OBJECT_FORMAT_NONE */
>
>
> ?/* Perform a link-time recompilation and relink if any of the object
>