summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2019-07-09 21:12:14 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2019-07-09 21:41:24 +0200
commitfc41b0610e5bb204dd9905f89e235ea801e7a4ea (patch)
tree5905a009530bda821688434a936bbf3fa96bad15 /lib
parentbff64115a0ad081282e0f99305f41c8dd1917d67 (diff)
downloademacs-fc41b0610e5bb204dd9905f89e235ea801e7a4ea.tar.gz
Make fingerprint handling compatible with LTO
Tell the compiler that the fingerprint variable is modified unpredictably. * lib/fingerprint.h (fingerprint): Remove const. * lib/fingerprint.c (fingerprint): Likewise. * src/pdumper.c (Fdump_emacs_portable): Cast fingerprint variable. (pdumper_load): Likewise. * lib-src/make-fingerprint.c (main): Likewise.
Diffstat (limited to 'lib')
-rw-r--r--lib/fingerprint.c2
-rw-r--r--lib/fingerprint.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/fingerprint.c b/lib/fingerprint.c
index e55de9c6da3..2cc1973428f 100644
--- a/lib/fingerprint.c
+++ b/lib/fingerprint.c
@@ -29,7 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
by a fingerprint of the temporary Emacs executable that was built
along the way. */
-unsigned char const fingerprint[] =
+volatile unsigned char fingerprint[] =
{
0xDE,
0x86,
diff --git a/lib/fingerprint.h b/lib/fingerprint.h
index 0b195fd0ca7..ba2e740cd9e 100644
--- a/lib/fingerprint.h
+++ b/lib/fingerprint.h
@@ -24,6 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Emacs. This way, we have a unique value that we can use to pair
data files (like a portable dump image) with a specific build of
Emacs. */
-extern unsigned char const fingerprint[32];
+extern volatile unsigned char fingerprint[32];
#endif