diff options
author | Caroline Tice <cmtice@google.com> | 2018-02-05 08:43:33 -0800 |
---|---|---|
committer | Caroline Tice <cmtice@google.com> | 2018-02-05 08:43:33 -0800 |
commit | 2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b (patch) | |
tree | 0a687778c96865d73a7c6dbcd9ec580a02daa3a0 | |
parent | d64d815b3af9d2653d924ea2e1ebb21ee8b043b7 (diff) | |
download | gcc-2cdcfd30c27f0d836cc477f2ae9f456287fd6b1b.tar.gz |
[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.c | 2 |
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) |