emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108792: * configure.in: Fix previous


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108792: * configure.in: Fix previous change. Remove --enable-asserts.
Date: Thu, 28 Jun 2012 20:34:05 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108792
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-06-28 20:34:05 +0400
message:
  * configure.in: Fix previous change. Remove --enable-asserts.
  (CPPFLAGS): Remove conditional -DXASSERTS=1.
  Add --enable-link-time-optimization.
  * INSTALL: Mention this.
modified:
  ChangeLog
  INSTALL
  configure.in
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-06-28 07:50:50 +0000
+++ b/ChangeLog 2012-06-28 16:34:05 +0000
@@ -1,5 +1,12 @@
 2012-06-28  Dmitry Antipov  <address@hidden>
 
+       * configure.in: Fix previous change. Remove --enable-asserts.
+       (CPPFLAGS): Remove conditional -DXASSERTS=1.
+       Add --enable-link-time-optimization.
+       * INSTALL: Mention this.
+
+2012-06-28  Dmitry Antipov  <address@hidden>
+
        * configure.in: Add glyphs category to --enable-checking option.
        (GLYPH_DEBUG): Define if glyphs debugging is enabled.
 

=== modified file 'INSTALL'
--- a/INSTALL   2012-06-27 07:47:56 +0000
+++ b/INSTALL   2012-06-28 16:34:05 +0000
@@ -323,6 +323,13 @@
 there should be no warnings; on older and on non-GNU systems the
 generated warnings may still be useful.
 
+Use --enable-link-time-optimization to enable link-time optimizer, which
+is available in GNU compiler since version 4.5.0.  If your compiler is not
+GNU or older than version 4.5.0, this option does nothing.  If `configure'
+can determine number of online CPUS on your system, final link-time
+optimization and code generation is executed in parallel using one job
+per each available online CPU.
+
 The `--prefix=PREFIXDIR' option specifies where the installation process
 should put emacs and its data files.  This defaults to `/usr/local'.
 - Emacs (and the other utilities users run) go in PREFIXDIR/bin

=== modified file 'configure.in'
--- a/configure.in      2012-06-28 07:50:50 +0000
+++ b/configure.in      2012-06-28 16:34:05 +0000
@@ -230,11 +230,6 @@
    EN_NS_SELF_CONTAINED=$enableval,
    EN_NS_SELF_CONTAINED=yes)
 
-AC_ARG_ENABLE(asserts,
-[AS_HELP_STRING([--enable-asserts], [compile code with asserts enabled])],
-      USE_XASSERTS=$enableval,
-      USE_XASSERTS=no)
-
 AC_ARG_ENABLE(locallisppath,
 [AS_HELP_STRING([--enable-locallisppath=PATH],
                 [directories Emacs should search for lisp files specific
@@ -265,21 +260,21 @@
                        ac_gc_check_string_free_list= ;
                        ac_xmalloc_overrun= ;
                        ac_gc_check_cons_list= ;
-                       ac_check_glyphs= ;;
+                       ac_glyphs_debug= ;;
        all)            ac_enable_checking=1 ;
                        ac_gc_check_stringbytes=1 ;
                        ac_gc_check_string_overrun=1 ;
                        ac_gc_check_string_free_list=1 ;
                        ac_xmalloc_overrun=1 ;
                        ac_gc_check_cons_list=1 ;
-                       ac_check_glyphs=1 ;;
+                       ac_glyphs_debug=1 ;;
        # these enable particular checks
        stringbytes)    ac_gc_check_stringbytes=1 ;;
        stringoverrun)  ac_gc_check_string_overrun=1 ;;
        stringfreelist) ac_gc_check_string_free_list=1 ;;
        xmallocoverrun) ac_xmalloc_overrun=1 ;;
        conslist)       ac_gc_check_cons_list=1 ;;
-       glyphs)         ac_check_glyphs=1 ;;
+       glyphs)         ac_glyphs_debug=1 ;;
        *)      AC_MSG_ERROR(unknown check category $check) ;;
        esac
 done
@@ -311,7 +306,7 @@
   AC_DEFINE(GC_CHECK_CONS_LIST, 1,
 [Define this to check for errors in cons list.])
 fi
-if test x$ac_check_glyphs != x ; then
+if test x$ac_glyphs_debug != x ; then
   AC_DEFINE(GLYPH_DEBUG, 1,
 [Define this to enable glyphs debugging code.])
 fi
@@ -588,6 +583,32 @@
   [gl_gcc_warnings=no]
 )
 
+AC_ARG_ENABLE(link-time-optimization,
+[AS_HELP_STRING([--enable-link-time-optimization],
+                [build emacs with link-time optimization.
+                 This is supported only for GCC since 4.5.0.])],
+if test "${enableval}" != "no"; then
+   AC_MSG_CHECKING([whether link-time optimization is supported])
+   ac_lto_supported=no
+   if test x$GCC = xyes; then
+      CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
+      if test x$CPUS != x; then
+        LTO="-flto=$CPUS"
+      else
+        LTO="-flto"
+      fi        
+      old_CFLAGS=$CFLAGS
+      CFLAGS="$CFLAGS $LTO"
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+       [ac_lto_supported=yes], [ac_lto_supported=no])
+      CFLAGS="$old_CFLAGS"
+   fi
+   AC_MSG_RESULT([$ac_lto_supported])
+   if test "$ac_lto_supported" = "yes"; then
+      CFLAGS="$CFLAGS $LTO"
+   fi
+fi)
+
 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
 # ------------------------------------------------
 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
@@ -3657,11 +3678,6 @@
    echo "  Environment variable EMACSDOC set to:                   $EMACSDOC"
 fi
 
-if test $USE_XASSERTS = yes; then
-   echo "  Compiling with asserts turned on."
-   CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
-fi
-
 echo
 
 if test "$HAVE_NS" = "yes"; then


reply via email to

[Prev in Thread] Current Thread [Next in Thread]