From: Paul Eggert Date: Fri, 20 Sep 2013 03:41:37 +0000 (-0700) Subject: Work around performance bug on OS X 10.8 and earlier. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1506 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f5f0132bc9cfc037fa6a22983061704748d4091f;p=emacs.git Work around performance bug on OS X 10.8 and earlier. Perhaps Apple will fix this bug some day. See the thread starting with Daniel Colascione's email in: http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00343.html * configure.ac (FORTIFY_SOUR): New verbatim section. --- diff --git a/ChangeLog b/ChangeLog index 7d21714922c..07967de1cbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-09-20 Paul Eggert + + Work around performance bug on OS X 10.8 and earlier. + Perhaps Apple will fix this bug some day. + See the thread starting with Daniel Colascione's email in: + http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00343.html + * configure.ac (FORTIFY_SOUR): New verbatim section. + 2013-09-19 Paul Eggert Merge from gnulib, incorporating: diff --git a/configure.ac b/configure.ac index fe326623571..8ff33e779a8 100644 --- a/configure.ac +++ b/configure.ac @@ -4703,6 +4703,24 @@ AC_SUBST(CYGWIN_OBJ) AC_SUBST(PRE_ALLOC_OBJ) AC_SUBST(POST_ALLOC_OBJ) +dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE' +dnl verbatim defined above. The tricky name is apropos, as this hack +dnl makes Fortify go sour! +AH_VERBATIM([FORTIFY_SOUR], +[/* Without the following workaround, Emacs runs slowly on OS X 10.8. + The workaround disables some useful run-time checking, so it + should be conditional to the platforms with the performance bug. + Perhaps Apple will fix this some day; also see m4/extern-inline.m4. */ +#if defined __APPLE__ && defined __GNUC__ +# ifndef _DONT_USE_CTYPE_INLINE_ +# define _DONT_USE_CTYPE_INLINE_ +# endif +# ifndef _FORTIFY_SOURCE +# define _FORTIFY_SOURCE 0 +# endif +#endif +]) + # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently. # it temporarily reverts them to their pre-pkg-config values, # because gnulib needs to work with both src (which uses the