From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#24682: Emacs 25 from GIT build issue under Ubuntu 16.10 Date: Sun, 16 Oct 2016 16:56:26 -0700 Organization: UCLA Computer Science Department Message-ID: <6ae8cf57-50f6-e40e-458a-420749e8479f@cs.ucla.edu> References: <83pon22m0d.fsf@gnu.org> <6112973d-aeda-8839-50f1-518a3d2a1a46@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------771CEB6564D3CD4B38422BE2" X-Trace: blaine.gmane.org 1476662251 30763 195.159.176.226 (16 Oct 2016 23:57:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Oct 2016 23:57:31 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 Cc: =?UTF-8?Q?=C3=93scar?= Fuentes , Tim Cross , Michael Albinus , 24682@debbugs.gnu.org To: Cesar Quiroz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 17 01:57:27 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvvIj-0005V9-B8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Oct 2016 01:57:09 +0200 Original-Received: from localhost ([::1]:58161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvvIl-0002Vw-Fc for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Oct 2016 19:57:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvvIf-0002Vq-71 for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 19:57:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvvIc-0003Ee-4i for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 19:57:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57852) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvvIc-0003ES-0m for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 19:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bvvIb-0000MF-Oh for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 19:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2016 23:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24682 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24682-submit@debbugs.gnu.org id=B24682.14766622031346 (code B ref 24682); Sun, 16 Oct 2016 23:57:01 +0000 Original-Received: (at 24682) by debbugs.gnu.org; 16 Oct 2016 23:56:43 +0000 Original-Received: from localhost ([127.0.0.1]:35809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvvIJ-0000Le-Bx for submit@debbugs.gnu.org; Sun, 16 Oct 2016 19:56:43 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvvII-0000LQ-29 for 24682@debbugs.gnu.org; Sun, 16 Oct 2016 19:56:42 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 096B41612AD; Sun, 16 Oct 2016 16:56:36 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PRA-zRlVbzr4; Sun, 16 Oct 2016 16:56:30 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BFD781612BA; Sun, 16 Oct 2016 16:56:30 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9d0fGiha1T2R; Sun, 16 Oct 2016 16:56:30 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8F6741612AD; Sun, 16 Oct 2016 16:56:30 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124569 Archived-At: This is a multi-part message in MIME format. --------------771CEB6564D3CD4B38422BE2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cesar Quiroz wrote: > There was something in the release notes about -no-pie being the standard > negation of -pie, while -nopie was introduced (by Debian?) to deal with the > issue. Which release notes? I installed the attached into the Emacs master branch; does it fix the problem? If so, I'll backport it to emacs-25 and ask you to test that. --------------771CEB6564D3CD4B38422BE2 Content-Type: text/x-diff; name="0001-Port-to-Ubuntu-16.10-which-needs-gcc-nopie.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Port-to-Ubuntu-16.10-which-needs-gcc-nopie.patch" >From e5f26dd7f1af4bf54091a52adc3587f6a228e641 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 16 Oct 2016 16:25:47 -0700 Subject: [PATCH] Port to Ubuntu 16.10, which needs gcc -nopie * configure.ac (emacs_cv_prog_cc_no_pie): Rename from emacs_cv_prog_cc_nopie. All usages changed. Check for -no-pie in preference to -nopie (Bug#24682). --- configure.ac | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index cd11b10..3f06eff 100644 --- a/configure.ac +++ b/configure.ac @@ -5123,25 +5123,29 @@ AC_DEFUN *) LD_SWITCH_SYSTEM_TEMACS= ;; esac -# -nopie fixes a temacs segfault on Gentoo, OpenBSD, and other systems -# with "hardened" GCC configurations for some reason (Bug#18784). -# We don't know why -nopie works, but not segfaulting is better than -# segfaulting. Use ac_c_werror_flag=yes when trying -nopie, otherwise -# clang keeps warning that it does not understand -nopie, and pre-4.6 -# GCC has a similar problem (Bug#20338). -AC_CACHE_CHECK([whether $CC accepts -nopie], - [emacs_cv_prog_cc_nopie], +# -no-pie or -nopie fixes a temacs segfault on Gentoo, OpenBSD, +# Ubuntu, and other systems with "hardened" GCC configurations for +# some reason (Bug#18784). We don't know why this works, but not +# segfaulting is better than segfaulting. Use ac_c_werror_flag=yes +# when trying the option, otherwise clang keeps warning that it does +# not understand it, and pre-4.6 GCC has a similar problem +# (Bug#20338). Prefer -no-pie to -nopie, as -no-pie is the +# spelling used by GCC 6.1.0 and later (Bug#24682). +AC_CACHE_CHECK( + [for $CC option to disable position independent executables], + [emacs_cv_prog_cc_no_pie], [emacs_save_c_werror_flag=$ac_c_werror_flag emacs_save_LDFLAGS=$LDFLAGS ac_c_werror_flag=yes - LDFLAGS="$LDFLAGS -nopie" - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [emacs_cv_prog_cc_nopie=yes], - [emacs_cv_prog_cc_nopie=no]) + for emacs_cv_prog_cc_no_pie in -no-pie -nopie no; do + test $emacs_cv_prog_cc_no_pie = no && break + LDFLAGS="$emacs_save_LDFLAGS $emacs_cv_prog_cc_no_pie" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [break]) + done ac_c_werror_flag=$emacs_save_c_werror_flag LDFLAGS=$emacs_save_LDFLAGS]) -if test "$emacs_cv_prog_cc_nopie" = yes; then - LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -nopie" +if test "$emacs_cv_prog_cc_no_pie" != no; then + LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS $emacs_cv_prog_cc_no_pie" fi if test x$ac_enable_profiling != x ; then -- 2.7.4 --------------771CEB6564D3CD4B38422BE2--