]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Define TLS in bfd.c if not already defined
authorTom Tromey <tom@tromey.com>
Fri, 30 May 2025 13:04:03 +0000 (07:04 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 31 May 2025 14:32:43 +0000 (08:32 -0600)
If configure decides that thread-local storage isn't available, it
does not define "TLS".  However, this is used unconditionally in a
definition.  So, define it if it isn't already defined.

bfd/bfd.c

index bb8ec43ef2beb958c13287f9d6471568f0010a22..f207312d53616414c981cbc60f04fae89076db34 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -719,6 +719,12 @@ EXTERNAL
 #define EXIT_FAILURE 1
 #endif
 
+/* Configure will leave this undefined, but it's unconditionally used
+   in a definition later.  */
+#ifndef TLS
+#define TLS
+#endif
+
 \f
 /* provide storage for subsystem, stack and heap data which may have been
    passed in on the command line.  Ld puts this data into a bfd_link_info