aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2018-02-05 16:43:33 (GMT)
committerCaroline Tice <cmtice@google.com>2018-02-05 16:43:33 (GMT)
commit2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b (patch)
tree0a687778c96865d73a7c6dbcd9ec580a02daa3a0
parentd64d815b3af9d2653d924ea2e1ebb21ee8b043b7 (diff)
downloadtoolchain_gcc-2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b.zip
toolchain_gcc-2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b.tar.gz
toolchain_gcc-2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b.tar.bz2
[GCC] Fix #endif problem in libgcc/emutls.c
Currently in emutls.c 'emutls_key_created' is defined within part of an ifdef, but is accessed outside the ifdef, which can cause issues in builds where the ifdef is not taken. This CL moves the #endif to include the new function that accesses 'emutls_key_created' so that all references to it are within the defining if-def. Bug: b/72942688 Test: Fix tested in ChromeOS. Change-Id: Ic1d6760d116b63abaef18f95e38de42af30952e4
-rw-r--r--gcc-4.9/libgcc/emutls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc-4.9/libgcc/emutls.c b/gcc-4.9/libgcc/emutls.c
index 77550e0..cba9c3b 100644
--- a/gcc-4.9/libgcc/emutls.c
+++ b/gcc-4.9/libgcc/emutls.c
@@ -89,7 +89,6 @@ emutls_init (void)
abort ();
emutls_key_created = 1;
}
-#endif
__attribute__((destructor))
static void
@@ -98,6 +97,7 @@ unregister_emutls_key (void)
if (emutls_key_created)
__gthread_key_delete (emutls_key);
}
+#endif
static void *
emutls_alloc (struct __emutls_object *obj)