This is the mail archive of the
mailing list for the GCC project.
Re: [patch, bz #58312] Fix libssp handling of vsnprintf for cross-compilers
- From: Brooks Moses <bmoses at google dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Sep 2013 09:41:20 -0700
- 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>
On Wed, Sep 4, 2013 at 12:01 AM, Jakub Jelinek <email@example.com> wrote:
> That looks wrong, the test was intentionally looking for badly implemented
> vsnprintf, see
> "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.
Ah; thanks for the pointer.
> 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.
That makes sense. Am I correct in understanding that the list I need
to be concerned with is only the one you quote?
I have access to a mingw compiler, so I can easily give that a test in
a current version.
The glibc manual has a list of supported/tested platforms, and all of
the above other than mingw are listed as "occasionally tested" as of
2011, so they should probably all be listed in the blacklist: