blob: 5da509d178d12c71fcee400aef4d5ce67a6f56c9 [file] [log] [blame]
From daf90bfa99fc02a253d538c65fbaa12f2e6c1c45 Mon Sep 17 00:00:00 2001
From: Philip Withnall <pwithnall@endlessos.org>
Date: Wed, 11 Nov 2020 19:23:18 +0000
Subject: [PATCH 22/29] build: Drop unnecessary volatile qualifiers from
configure tests
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #600
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719]
---
meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index e0b308a25..ad7f887fb 100644
--- a/meson.build
+++ b/meson.build
@@ -1773,7 +1773,7 @@ endforeach
# that then to silently fall back on emulated atomic ops just because
# the user had the wrong build environment.
atomictest = '''int main() {
- volatile int atomic = 2;
+ int atomic = 2;
__sync_bool_compare_and_swap (&atomic, 2, 3);
return 0;
}
@@ -1883,6 +1883,7 @@ endif
# FIXME: we should make it print the result and always return 0, so that
# the output in meson shows up as green
+# volatile is needed here to avoid optimisations in the test
stack_grows_check_prog = '''
volatile int *a = 0, *b = 0;
void f (int i) {
--
2.30.1