From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Emacs pretest Date: Tue, 01 Apr 2014 20:36:45 +0400 Message-ID: <533AEB1D.7050408@yandex.ru> References: <533AD803.4060902@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070903020900090604060109" X-Trace: ger.gmane.org 1396370232 18476 80.91.229.3 (1 Apr 2014 16:37:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2014 16:37:12 +0000 (UTC) Cc: Sean Sieger , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 01 18:37:07 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WV1gQ-0002Fq-Qq for ged-emacs-devel@m.gmane.org; Tue, 01 Apr 2014 18:37:07 +0200 Original-Received: from localhost ([::1]:33208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV1gQ-0008OF-ES for ged-emacs-devel@m.gmane.org; Tue, 01 Apr 2014 12:37:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV1gE-00087E-Nb for emacs-devel@gnu.org; Tue, 01 Apr 2014 12:37:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WV1g9-0003iy-Dj for emacs-devel@gnu.org; Tue, 01 Apr 2014 12:36:54 -0400 Original-Received: from forward3l.mail.yandex.net ([84.201.143.136]:59185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV1g9-0003il-21 for emacs-devel@gnu.org; Tue, 01 Apr 2014 12:36:49 -0400 Original-Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward3l.mail.yandex.net (Yandex) with ESMTP id 26FF71500EC5; Tue, 1 Apr 2014 20:36:46 +0400 (MSK) Original-Received: from smtp3h.mail.yandex.net (localhost [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 8D7461B433D0; Tue, 1 Apr 2014 20:36:45 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id E0UnbULYhH-ajguwlbk; Tue, 1 Apr 2014 20:36:45 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 48fa59e2-dcb2-42f3-b716-1de44cb48c6c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1396370205; bh=YZSBzGNeFMv8KcnyK9eQtHLNhGDJjA3OmqetAJbdvJQ=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=eLbfrb0oB3w+GJmkzQfT7bRpaJsK5b8pSJJ1FCxIriEkm9uh3jBuzuuuz2GalgVE+ FudFAGL4eB8cqQvZiOmz+q5TrdwRSFJloo7pF+TD6elTzPwpttBClFlw4XRBLLC+Lp /s2cd4I3teQxpsLhtBzfWA0jsfUzu9/r6/wHbTuE= Authentication-Results: smtp3h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <533AD803.4060902@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.143.136 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171248 Archived-At: This is a multi-part message in MIME format. --------------070903020900090604060109 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 04/01/2014 07:15 PM, Dmitry Antipov wrote: > On 03/31/2014 05:27 PM, Stefan Monnier wrote: > >> I think we're ready for the first pretest. Sean, can you take care of it? > > I have a fix for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17125 on the way; > hopefully the fix will be confirmed in a day or so - can we wait a bit more? Also I have LTO support for clang users; does that makes sense for pretest as well? Dmitry --------------070903020900090604060109 Content-Type: text/x-patch; name="clang_lto_1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="clang_lto_1.patch" === modified file 'INSTALL' --- INSTALL 2014-03-27 19:41:57 +0000 +++ INSTALL 2014-04-01 16:08:38 +0000 @@ -331,12 +331,17 @@ 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. +Use --enable-link-time-optimization to enable link-time optimizer. If +you're using GNU compiler, this feature is supported since version 4.5.0. +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. + +This option is also supported for clang. You should have GNU binutils +with `gold' linker and plugin support, and clang with LLVMgold.so plugin. +Read http://llvm.org/docs/GoldPlugin.html for details. Also note that +this feature is still experimental, so prepare to build binutils and +clang snapshots from their source code repositories. The `--prefix=PREFIXDIR' option specifies where the installation process should put emacs and its data files. This defaults to `/usr/local'. === modified file 'configure.ac' --- configure.ac 2014-03-31 05:02:08 +0000 +++ configure.ac 2014-04-01 16:07:34 +0000 @@ -764,32 +764,6 @@ [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. @@ -926,7 +900,48 @@ AC_SUBST([GNULIB_WARN_CFLAGS]) fi - +AC_ARG_ENABLE(link-time-optimization, +[AS_HELP_STRING([--enable-link-time-optimization], + [build emacs with link-time optimization. + This is supported for gcc since 4.5.0 and clang. + For the latter, this is experimental, see INSTALL])], +if test "${enableval}" != "no"; then + ac_lto_supported=no + if test $emacs_cv_clang = yes; then + AC_MSG_CHECKING([whether link-time optimization is supported by clang]) + GOLD_PLUGIN=`$CC -print-file-name=LLVMgold.so` + if test -n "$GOLD_PLUGIN" -a -x "$GOLD_PLUGIN"; then + LTO="-flto" + fi + elif test x$GCC = xyes; then + AC_MSG_CHECKING([whether link-time optimization is supported by gcc]) + CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null` + if test x$CPUS != x; then + LTO="-flto=$CPUS" + else + LTO="-flto" + fi + else + AC_MSG_ERROR([Link-time optimization is not supported with your compiler.]) + fi + old_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $LTO" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [ac_lto_supported=yes], [ac_lto_supported=no]) + CFLAGS="$old_CFLAGS" + AC_MSG_RESULT([$ac_lto_supported]) + if test "$ac_lto_supported" = "yes"; then + CFLAGS="$CFLAGS $LTO" + if test x$emacs_cv_clang = xyes; then + AC_MSG_WARN([Please read INSTALL before using link-time optimization with clang]) + # WARNING: 'ar --plugin ...' doesn't work without + # command, so plugin name is appended to ARFLAGS... + ARFLAGS="cru --plugin $GOLD_PLUGIN" + # ...but this is much better for ranlib. + RANLIB="$RANLIB --plugin $GOLD_PLUGIN" + fi + fi +fi) dnl Some other nice autoconf tests. dnl These are commented out, since gl_EARLY and/or Autoconf already does them. --------------070903020900090604060109--