diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | configure.ac | 15 |
2 files changed, 18 insertions, 2 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-04-03 Ulrich Müller <ulm@gentoo.org> | ||
| 2 | |||
| 3 | * configure.ac (LD_SWITCH_SYSTEM_TEMACS): Add -nopie option if it | ||
| 4 | is supported, in order to avoid segfaults in temacs. (Bug#18784) | ||
| 5 | |||
| 1 | 2015-03-27 Pete Williamson <petewil@chromium.org> (tiny change) | 6 | 2015-03-27 Pete Williamson <petewil@chromium.org> (tiny change) |
| 2 | 7 | ||
| 3 | Add NaCl target | 8 | Add NaCl target |
diff --git a/configure.ac b/configure.ac index 44709d47ab8..d2a9b375e40 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -5027,11 +5027,22 @@ case "$opsys" in | |||
| 5027 | esac | 5027 | esac |
| 5028 | ;; | 5028 | ;; |
| 5029 | 5029 | ||
| 5030 | openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;; | ||
| 5031 | |||
| 5032 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | 5030 | *) LD_SWITCH_SYSTEM_TEMACS= ;; |
| 5033 | esac | 5031 | esac |
| 5034 | 5032 | ||
| 5033 | AC_CACHE_CHECK([whether the linker accepts -nopie], | ||
| 5034 | [emacs_cv_prog_cc_nopie], | ||
| 5035 | [emacs_save_LDFLAGS=$LDFLAGS | ||
| 5036 | LDFLAGS="$LDFLAGS -nopie" | ||
| 5037 | AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], | ||
| 5038 | [emacs_cv_prog_cc_nopie=yes], | ||
| 5039 | [emacs_cv_prog_cc_nopie=no]) | ||
| 5040 | LDFLAGS=$emacs_save_LDFLAGS]) | ||
| 5041 | if test "$emacs_cv_prog_cc_nopie" = yes; then | ||
| 5042 | # Disable PIE to avoid segfaults in temacs (bug#18784) | ||
| 5043 | LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -nopie" | ||
| 5044 | fi | ||
| 5045 | |||
| 5035 | if test x$ac_enable_profiling != x ; then | 5046 | if test x$ac_enable_profiling != x ; then |
| 5036 | case $opsys in | 5047 | case $opsys in |
| 5037 | *freebsd | gnu-linux) ;; | 5048 | *freebsd | gnu-linux) ;; |