This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, bz #58312] Fix libssp handling of vsnprintf for cross-compilers
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Brooks Moses <bmoses at google dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 05 Sep 2013 10:38:48 +0200
- Subject: Re: [patch, bz #58312] Fix libssp handling of vsnprintf for cross-compilers
- Authentication-results: sourceware.org; auth=none
- References: <CAOxa4KpSEkLdXX_FMzhXYv-Nmv-CQEaMMW4AF7f2LDnS+samCA at mail dot gmail dot com> <20130904070104 dot GL21876 at tucnak dot zalov dot cz>
Jakub Jelinek <jakub@redhat.com> writes:
> That looks wrong, the test was intentionally looking for badly implemented
> vsnprintf, see
> http://www.gnu.org/software/gnulib/manual/html_node/snprintf.html
> "This function does not return a byte count as specified in C99 on some
> platforms: HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw."
>
> The implementation relies on the returned byte count to be exactly correct,
> so it can't be implemented on platforms where that is not the case.
>
> Not sure which of the targets from the above list we still support,
> certainly at least mingw, though in that case I don't know if it hasn't been
> fixed there. So, as Joseph said, you probably should keep the runtime test
> as is, and just for cross compiling replace the unconditional =undef with
> an optimistic assumption followed by a blacklist of platforms where it is
> known not to work.
IRIX 6.5 and Tru64 UNIX V5.1 support have been removed in GCC 4.8, but
Solaris 9 is still supported up to GCC 4.9, though deprecated.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University