Skip to content

Commit

Permalink
x86_64: Fix tdep_init_done when built with libatomic_ops
Browse files Browse the repository at this point in the history
Use correct size variable.
  • Loading branch information
Dave Watson committed Apr 11, 2019
1 parent f2931b3 commit 1b1cd9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/tdep-x86_64/libunwind_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
#define tdep_get_ip(c) ((c)->dwarf.ip)
#define tdep_big_endian(as) 0

#ifdef HAVE_ATOMIC_OPS_H
extern AO_t tdep_init_done;
#else
extern int tdep_init_done;
#endif

extern void tdep_init (void);
extern void tdep_init_mem_validate (void);
Expand Down
6 changes: 5 additions & 1 deletion src/x86_64/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "dwarf_i.h"

HIDDEN define_lock (x86_64_lock);
HIDDEN sig_atomic_t tdep_init_done;
#ifdef HAVE_ATOMIC_OPS_H
HIDDEN AO_t tdep_init_done;
#else
HIDDEN int tdep_init_done;
#endif

/* See comments for svr4_dbx_register_map[] in gcc/config/i386/i386.c. */

Expand Down

0 comments on commit 1b1cd9f

Please sign in to comment.