This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix build error with --enable-targets=all.


It only fails with --enable-targets=all, which is something I didn't think to
check.  I can fix it with the following patch.  This assumes we won't add
anything else to as.c that uses FAKE_LABEL_NAME, so we can just disable the
setting in obj-multi.h for this file.  I can't think of anything more elegant
at the moment.

	gas/
	* as.c (INITIALIZING_EMULS): Define.
	* config/obj-multi.h (FAKE_LABEL_NAME): When INITIALIZING_EMULS set,
	don't define it.
---
 gas/as.c               | 4 ++++
 gas/config/obj-multi.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/gas/as.c b/gas/as.c
index fbf3257fbb..5c9c07e5e0 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -31,6 +31,10 @@
 
 #define COMMON
 
+/* Disable code to set FAKE_LABEL_NAME in obj-multi.h, to avoid circular
+   reference.  */
+#define INITIALIZING_EMULS
+
 #include "as.h"
 #include "subsegs.h"
 #include "output-file.h"
diff --git a/gas/config/obj-multi.h b/gas/config/obj-multi.h
index 74f254b14b..5bde4266e1 100644
--- a/gas/config/obj-multi.h
+++ b/gas/config/obj-multi.h
@@ -155,7 +155,10 @@
 
 #define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols)
 
+#ifndef INITIALIZING_EMULS
+/* We want to use the default FAKE_LABEL_NAME in as.c.  */
 #define FAKE_LABEL_NAME (this_emulation->fake_label_name)
+#endif
 
 #ifdef OBJ_MAYBE_ELF
 /* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c
-- 
2.14.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]