aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-08-29 12:49:22 -0700
committerPaul Eggert2017-08-29 14:58:48 -0700
commitf1fdb5bc575728bd6c9f13a18939d9c271a74e83 (patch)
tree75b63a474def4a9701b0d1eda984575e003ffabd /src
parent02255c5fbc7e6dc0206db978994617cc72de4bb8 (diff)
downloademacs-f1fdb5bc575728bd6c9f13a18939d9c271a74e83.tar.gz
emacs-f1fdb5bc575728bd6c9f13a18939d9c271a74e83.zip
Align stack bottom properly.
This is needed for gcc -Os -flto on x86-64 (Bug#28213). * src/emacs.c (main): Align stack-bottom variable as a pointer, since mark_memory requires this.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 0fec7167588..44f6285795a 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -672,7 +672,10 @@ close_output_streams (void)
672int 672int
673main (int argc, char **argv) 673main (int argc, char **argv)
674{ 674{
675 char stack_bottom_variable; 675 /* Variable near the bottom of the stack, and aligned appropriately
676 for pointers. */
677 void *stack_bottom_variable;
678
676 bool do_initial_setlocale; 679 bool do_initial_setlocale;
677 bool dumping; 680 bool dumping;
678 int skip_args = 0; 681 int skip_args = 0;
@@ -688,7 +691,7 @@ main (int argc, char **argv)
688 char *original_pwd = 0; 691 char *original_pwd = 0;
689 692
690 /* Record (approximately) where the stack begins. */ 693 /* Record (approximately) where the stack begins. */
691 stack_bottom = &stack_bottom_variable; 694 stack_bottom = (char *) &stack_bottom_variable;
692 695
693#ifndef CANNOT_DUMP 696#ifndef CANNOT_DUMP
694 dumping = !initialized && (strcmp (argv[argc - 1], "dump") == 0 697 dumping = !initialized && (strcmp (argv[argc - 1], "dump") == 0