aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2018-02-05 08:43:33 -0800
committerCaroline Tice <cmtice@google.com>2018-02-05 08:43:33 -0800
commit2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b (patch)
tree0a687778c96865d73a7c6dbcd9ec580a02daa3a0 /gcc-4.9
parentd64d815b3af9d2653d924ea2e1ebb21ee8b043b7 (diff)
downloadtoolchain_gcc-2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b.tar.gz
toolchain_gcc-2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b.tar.bz2
toolchain_gcc-2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b.zip
[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
Diffstat (limited to 'gcc-4.9')
-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 77550e057..cba9c3b03 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)