From: Paul Eggert <eggert@cs.ucla.edu>
To: Cesar Quiroz <cesar.quiroz@gmail.com>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>,
"Tim Cross" <theophilusx@gmail.com>,
"Michael Albinus" <michael.albinus@gmx.de>,
24682@debbugs.gnu.org
Subject: bug#24682: Emacs 25 from GIT build issue under Ubuntu 16.10
Date: Sun, 16 Oct 2016 16:56:26 -0700 [thread overview]
Message-ID: <6ae8cf57-50f6-e40e-458a-420749e8479f@cs.ucla.edu> (raw)
In-Reply-To: <CAN2qs+wLjwZeCPh=4XPhjX-_MK4C74OR5r3vv=n4ewjSBjApGw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
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.
[-- Attachment #2: 0001-Port-to-Ubuntu-16.10-which-needs-gcc-nopie.patch --]
[-- Type: text/x-diff, Size: 2613 bytes --]
From e5f26dd7f1af4bf54091a52adc3587f6a228e641 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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
next prev parent reply other threads:[~2016-10-16 23:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 23:06 Emacs 25 from GIT build issue under Ubuntu 16.10 Tim Cross
2016-10-14 23:20 ` Tim Cross
2016-10-15 4:09 ` Paul Eggert
2016-10-15 6:10 ` Eli Zaretskii
2016-10-15 6:18 ` bug#24682: 26.0.50; Bootstrap failed Eli Zaretskii
2016-10-15 4:15 ` Emacs 25 from GIT build issue under Ubuntu 16.10 Óscar Fuentes
2016-10-15 6:11 ` Eli Zaretskii
2016-10-15 5:56 ` Eli Zaretskii
2016-10-16 4:51 ` bug#24682: " Paul Eggert
2016-10-16 5:31 ` Cesar Quiroz
2016-10-16 6:54 ` Eli Zaretskii
2016-10-16 7:10 ` Cesar Quiroz
2016-10-16 23:56 ` Paul Eggert [this message]
2016-10-17 3:04 ` Cesar Quiroz
2016-10-17 5:03 ` Cesar Quiroz
2016-10-17 6:18 ` Paul Eggert
2016-10-19 4:13 ` Cesar Quiroz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ae8cf57-50f6-e40e-458a-420749e8479f@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=24682@debbugs.gnu.org \
--cc=cesar.quiroz@gmail.com \
--cc=michael.albinus@gmx.de \
--cc=ofv@wanadoo.es \
--cc=theophilusx@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.