[Mesa-dev] [PATCH 1/2] mesa: Drop -fno-builtin-memcmp.
Timothy Arceri
timothy.arceri at collabora.com
Fri Jul 1 00:01:24 UTC 2016
On Fri, 2016-07-01 at 01:26 +0200, Roland Scheidegger wrote:
> Am 01.07.2016 um 00:59 schrieb Matt Turner:
> > According to the referenced bug report, gcc-4.5 and newer do not
> > inline
> > memcmp(). I see no difference in performance of ipers with llvmpipe
> > on a
> > Sandybridge (which does not have "Enhanced REP MOVSB/STOSB") by
> > removing
> > this flag.
> >
> > I attempted to confirm the problem with gcc-4.4, but it fails to
> > compile
> > for quite a few different reasons.
> > ---
> > configure.ac | 8 --------
> > 1 file changed, 8 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index bd8842d..95cfc36 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -304,10 +304,6 @@ if test "x$GCC" = xyes; then
> > # We don't want floating-point math functions to set errno or
> > trap
> > CFLAGS="$CFLAGS -fno-math-errno -fno-trapping-math"
> >
> > - # gcc's builtin memcmp is slower than glibc's
> > - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
> > - CFLAGS="$CFLAGS -fno-builtin-memcmp"
> > -
> > # Flags to help ensure that certain portions of the code --
> > and only those
> > # portions -- can be built with MSVC:
> > # - src/util, src/gallium/auxiliary,
> > rc/gallium/drivers/llvmpipe, and
> > @@ -343,10 +339,6 @@ if test "x$GXX" = xyes; then
> >
> > # Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where
> > needed.
> > CXXFLAGS=$save_CXXFLAGS
> > -
> > - # gcc's builtin memcmp is slower than glibc's
> > - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
> > - CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
> > fi
> >
> > AC_SUBST([MSVC2013_COMPAT_CFLAGS])
> >
>
> FWIW we're using gcc 4.4.3...
> Technically the configure script only requires gcc 4.2 (albeit some
> parts have higher requirements) so if it doesn't compile that's a
> bug.
Maybe we should just bump the minimum to 4.4 I sent patches for this
back in Jan [1][2]. Reading the reply for Jonathan Gray again it seems
really odd that we still have 4.2 as the minimum since the "4.2.1"
version they use is a type of inhanced version, so building on 4.2 is
unlikely to actually work on other systems.
"src/xenocara is built with gcc 4.2.1. This has in the past been
patched for things like the gnu binary integer constants extension the
i965 code started to require a couple of major Mesa releases
ago. FreeBSD also patched their gcc for the same."
[1] https://patchwork.freedesktop.org/patch/71701/
[2] https://patchwork.freedesktop.org/patch/71702/
>
> But we're using scons to build so this should be ok (albeit I think
> different flags in configure.ac and scons are generally not a really
> good idea).
>
> Roland
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list