diff options
author | Alan Modra <amodra@gmail.com> | 2021-02-23 21:54:25 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-02-24 10:13:00 +1030 |
commit | 55add51eef6b4f89d44e1a6753d4dd926cab70c7 (patch) | |
tree | ddd4d9c9242b7d4d9d7a6eb69bfb43a3fa5cb45b | |
parent | c42c71a1527dd70417d3966dce7ba9edbcf4bdb4 (diff) | |
download | gdb-55add51eef6b4f89d44e1a6753d4dd926cab70c7.zip gdb-55add51eef6b4f89d44e1a6753d4dd926cab70c7.tar.gz gdb-55add51eef6b4f89d44e1a6753d4dd926cab70c7.tar.bz2 |
PR23691, gas .y files vs. automatic make dependencies
A number of targets, bfin, rl78, rx, can show odd failures when
bfd/reloc.c changes BFD_RELOC_* enum values, if recompiling over a
build dir with existing objects. The problem is caused by
bfin-parse.o and similar not being recompiled and so using stale
BFD_RELOC_* values. This isn't fixed by making bfin-parse.c depend on
bfd/reloc.c, which isn't necessary anyway. bfin-parse.o should have
been recompiled due to bfd/bfd.h changing when extracted bfd/reloc.c
BFD_RELOC_* values change, but that wasn't happening. The problem is
that automake generates a makefile that loads gas/config/.deps/
dependency file for objects with corresponding sources mentioned in
EXTRA_as_new_SOURCES. Unless we want to mess around generating
explicit dependencies, I think that mean moving some object files to
the build gas/config/. This patch does that, removing some hacks for
m68k-parse.c that should no longer be necessary, and removes some
rules that catered to old bison producing code that triggers compiler
warnings.
PR 23691
* Makefile.am (TARGET_CPU_CFILES): Split off config/xtensa-relax.c..
(TARGET_CPU_HFILES): ..and config/xtensa-relax.h..
(TARGET_EXTRA_FILES): ..to here. Add config/bfin-lex-wrapper.c,
and use alongside TARGET_CPU_CFILES.
(EXTRA_DIST): Update location of generated .c files.
(config/m68k-parse.c): New rule replacing m68k-parse.c rule.
(config/bfin-parse.c, config/rl78-parse.cm config/rx-parse.c),
(config/bfin-lex.c, config/bfin-lex-wrapper.@OBJEXT@): Similarly.
(itbl-lex-wrapper.@OBJEXT@): Simplify to just the needed
dependencies.
(itbl-parse.@OBJEXT@): Delete rule using NO_WERROR.
(itbl-parse.c, itbl-parse.h): Tidy.
* config/bfin-lex-wrapper.c: Include config/bfin-lex.c.
* config/bfin-lex.l: Include config/bfin-parse.h.
* configure.ac (extra_objects): Move object files corresponding
to .y and .l files now in config/ to config/.
* Makefile.in: Regenerate.
* configure: Regenerate.
* po/POTFILES.in: Regenerate.
-rw-r--r-- | gas/ChangeLog | 23 | ||||
-rw-r--r-- | gas/Makefile.am | 150 | ||||
-rw-r--r-- | gas/Makefile.in | 147 | ||||
-rw-r--r-- | gas/config/bfin-lex-wrapper.c | 2 | ||||
-rw-r--r-- | gas/config/bfin-lex.l | 2 | ||||
-rwxr-xr-x | gas/configure | 8 | ||||
-rw-r--r-- | gas/configure.ac | 8 | ||||
-rw-r--r-- | gas/po/POTFILES.in | 1 |
8 files changed, 125 insertions, 216 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 165d0af..8086006 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,26 @@ +2021-02-24 Alan Modra <amodra@gmail.com> + + PR 23691 + * Makefile.am (TARGET_CPU_CFILES): Split off config/xtensa-relax.c.. + (TARGET_CPU_HFILES): ..and config/xtensa-relax.h.. + (TARGET_EXTRA_FILES): ..to here. Add config/bfin-lex-wrapper.c, + and use alongside TARGET_CPU_CFILES. + (EXTRA_DIST): Update location of generated .c files. + (config/m68k-parse.c): New rule replacing m68k-parse.c rule. + (config/bfin-parse.c, config/rl78-parse.cm config/rx-parse.c), + (config/bfin-lex.c, config/bfin-lex-wrapper.@OBJEXT@): Similarly. + (itbl-lex-wrapper.@OBJEXT@): Simplify to just the needed + dependencies. + (itbl-parse.@OBJEXT@): Delete rule using NO_WERROR. + (itbl-parse.c, itbl-parse.h): Tidy. + * config/bfin-lex-wrapper.c: Include config/bfin-lex.c. + * config/bfin-lex.l: Include config/bfin-parse.h. + * configure.ac (extra_objects): Move object files corresponding + to .y and .l files now in config/ to config/. + * Makefile.in: Regenerate. + * configure: Regenerate. + * po/POTFILES.in: Regenerate. + 2021-02-19 Nick Clifton <nickc@redhat.com> * config/tc-riscv.c (riscv_ip): Fix compile time warnings about diff --git a/gas/Makefile.am b/gas/Makefile.am index 513e628..fdce608 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -200,8 +200,7 @@ TARGET_CPU_CFILES = \ config/tc-xgate.c \ config/tc-xtensa.c \ config/tc-z80.c \ - config/tc-z8k.c \ - config/xtensa-relax.c + config/tc-z8k.c TARGET_CPU_HFILES = \ config/tc-aarch64.h \ @@ -275,7 +274,11 @@ TARGET_CPU_HFILES = \ config/tc-xgate.h \ config/tc-xtensa.h \ config/tc-z80.h \ - config/tc-z8k.h \ + config/tc-z8k.h + +TARGET_EXTRA_FILES = \ + config/bfin-lex-wrapper.c \ + config/xtensa-relax.c \ config/xtensa-relax.h # OBJ files in config @@ -356,7 +359,7 @@ CONFIG_ATOF_CFILES = \ POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) \ $(TARG_ENV_HFILES) $(TARG_ENV_CFILES) $(OBJ_FORMAT_HFILES) \ $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \ - $(HFILES) $(CFILES) + $(TARGET_EXTRA_FILES) $(HFILES) $(CFILES) po/POTFILES.in: @MAINT@ Makefile for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \ && mv tmp $(srcdir)/po/POTFILES.in @@ -367,10 +370,10 @@ noinst_PROGRAMS = as-new noinst_SCRIPTS = $(GDBINIT) EXTRA_SCRIPTS = .gdbinit -EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \ - bfin-parse.c bfin-parse.h bfin-lex.c \ - rl78-parse.c rl78-parse.h \ - rx-parse.c rx-parse.h +EXTRA_DIST = config/m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \ + config/bfin-parse.c config/bfin-parse.h config/bfin-lex.c \ + config/rl78-parse.c config/rl78-parse.h \ + config/rx-parse.c config/rx-parse.h diststuff: $(EXTRA_DIST) info @@ -405,8 +408,9 @@ as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ $(extra_objects) $(GASLIBS) $(LIBINTL_DEP) EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ - $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \ - $(TARG_ENV_CFILES) $(CONFIG_ATOF_CFILES) $(MULTI_CFILES) + $(TARGET_CPU_HFILES) $(TARGET_EXTRA_FILES) $(TARG_ENV_CFILES) \ + $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \ + $(CONFIG_ATOF_CFILES) $(MULTI_CFILES) EXPECT = expect RUNTEST = runtest @@ -436,119 +440,45 @@ development.exp: $(BFDDIR)/development.sh $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ -# The m68k operand parser. - EXTRA_as_new_SOURCES += config/m68k-parse.y +config/m68k-parse.c: $(srcdir)/config/m68k-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE) +config/m68k-parse.h: config/m68k-parse.c + @true -# If m68k-parse.y is in a different directory, then ylwrap will use an -# absolute path when it invokes yacc, which will cause yacc to put the -# absolute path into the generated file. That's a pain when it comes -# to generating snapshots, because it introduces spurious diffs. -# Since when we make the snapshots $(srcdir) = ".", we check for that -# case and handle it differently. This means that anybody who -# configures with $(srcdir) = "." will have to set their path in the -# debugger if they want to debug m68k-parse.y. This is bad, but on -# the other hand it's good that people who use the prebuilt -# m68k-parse.c don't get a spurious absolute path. -m68k-parse.c: $(srcdir)/config/m68k-parse.y - f=$(srcdir)/config/m68k-parse.y; \ - if [ $$f = "./config/m68k-parse.y" ]; then \ - ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \ - ln config/m68k-parse.y . > /dev/null 2>/dev/null || \ - cp config/m68k-parse.y . >/dev/null 2>/dev/null; \ - f=m68k-parse.y; \ - else true; fi; \ - $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \ - if [ $$f = "m68k-parse.y" ]; then \ - rm -f m68k-parse.y; \ - else true; fi -# Disable -Werror, if it has been enabled, since old versions of bison/ -# yacc will produce working code which contain compile time warnings. -m68k-parse.@OBJEXT@: m68k-parse.c -if am__fastdepCC - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR) - mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -else -if AMDEP - source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@ - DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -endif - $(COMPILE) -c `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR) -endif +EXTRA_as_new_SOURCES += config/bfin-parse.y +config/bfin-parse.c: $(srcdir)/config/bfin-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c $@ y.tab.h config/bfin-parse.h -- $(YACCCOMPILE) -d ; +config/bfin-parse.h: config/bfin-parse.c + @true -# Don't let the .y.h rule clobber m68k-parse.h. -m68k-parse.h: ; @true -$(srcdir)/config/m68k-parse.h: ; @true +EXTRA_as_new_SOURCES += config/bfin-lex.l +config/bfin-lex.c: $(srcdir)/config/bfin-lex.l + $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c $@ -- $(LEXCOMPILE) -EXTRA_as_new_SOURCES += config/bfin-parse.y -bfin-parse.c: $(srcdir)/config/bfin-parse.y $(srcdir)/../bfd/reloc.c - $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ; -bfin-parse.h: bfin-parse.c -bfin-parse.h: ; @true -$(srcdir)/config/bfin-parse.h: ; @true - -bfin-lex.c: $(srcdir)/config/bfin-lex.l - $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE) -bfin-lex-wrapper.@OBJEXT@: $(srcdir)/config/bfin-lex-wrapper.c bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h -if am__fastdepCC - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/config/bfin-lex-wrapper.c - mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -else -if AMDEP - source='bfin-lex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@ - DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -endif - $(COMPILE) -c $(srcdir)/config/bfin-lex-wrapper.c -endif +config/bfin-lex-wrapper.@OBJEXT@: config/bfin-lex.c config/bfin-parse.h EXTRA_as_new_SOURCES += config/rl78-parse.y -rl78-parse.c: $(srcdir)/config/rl78-parse.y $(srcdir)/../bfd/reloc.c - $(SHELL) $(YLWRAP) $(srcdir)/config/rl78-parse.y y.tab.c rl78-parse.c y.tab.h rl78-parse.h -- $(YACCCOMPILE) -d ; -rl78-parse.h: rl78-parse.c -rl78-defs.h: ; @true -$(srcdir)/config/rl78-defs.h: ; @true +config/rl78-parse.c: $(srcdir)/config/rl78-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/rl78-parse.y y.tab.c $@ y.tab.h config/rl78-parse.h -- $(YACCCOMPILE) -d ; +config/rl78-parse.h: config/rl78-parse.c + @true EXTRA_as_new_SOURCES += config/rx-parse.y -rx-parse.c: $(srcdir)/config/rx-parse.y $(srcdir)/../bfd/reloc.c - $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c rx-parse.c y.tab.h rx-parse.h -- $(YACCCOMPILE) -d ; -rx-parse.h: rx-parse.c -rx-defs.h: ; @true -$(srcdir)/config/rx-defs.h: ; @true - -# The instruction table specification lexical analyzer and parser. +config/rx-parse.c: $(srcdir)/config/rx-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c $@ y.tab.h config/rx-parse.h -- $(YACCCOMPILE) -d ; +config/rx-parse.h: config/rx-parse.c + @true -# Disable -Werror, if it has been enabled, since old versions of bison/ -# yacc will produce working code which contain compile time warnings. -itbl-lex-wrapper.@OBJEXT@: itbl-lex-wrapper.c itbl-lex.c itbl-parse.h -if am__fastdepCC - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/itbl-lex-wrapper.c $(NO_WERROR) - mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -else -if AMDEP - source='itbl-lex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@ - DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -endif - $(COMPILE) -c $(srcdir)/itbl-lex-wrapper.c $(NO_WERROR) -endif +# The mips instruction table specification lexical analyzer and parser. -# Disable -Werror, if it has been enabled, since old versions of bison/ -# yacc will produce working code which contain compile time warnings. -itbl-parse.@OBJEXT@: itbl-parse.c -if am__fastdepCC - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR) - mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -else -if AMDEP - source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@ - DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -endif - $(COMPILE) -c `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR) -endif +itbl-lex-wrapper.@OBJEXT@: itbl-lex.c itbl-parse.h itbl-parse.c: $(srcdir)/itbl-parse.y - $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d + $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c $@ y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d -itbl-parse.h: itbl-parse.c ; @true +itbl-parse.h: itbl-parse.c + @true itbl-ops.@OBJEXT@: itbl-parse.h diff --git a/gas/Makefile.in b/gas/Makefile.in index 0a6f33d..433f387 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -591,8 +591,7 @@ TARGET_CPU_CFILES = \ config/tc-xgate.c \ config/tc-xtensa.c \ config/tc-z80.c \ - config/tc-z8k.c \ - config/xtensa-relax.c + config/tc-z8k.c TARGET_CPU_HFILES = \ config/tc-aarch64.h \ @@ -666,7 +665,11 @@ TARGET_CPU_HFILES = \ config/tc-xgate.h \ config/tc-xtensa.h \ config/tc-z80.h \ - config/tc-z8k.h \ + config/tc-z8k.h + +TARGET_EXTRA_FILES = \ + config/bfin-lex-wrapper.c \ + config/xtensa-relax.c \ config/xtensa-relax.h @@ -747,14 +750,14 @@ CONFIG_ATOF_CFILES = \ POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) \ $(TARG_ENV_HFILES) $(TARG_ENV_CFILES) $(OBJ_FORMAT_HFILES) \ $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \ - $(HFILES) $(CFILES) + $(TARGET_EXTRA_FILES) $(HFILES) $(CFILES) noinst_SCRIPTS = $(GDBINIT) EXTRA_SCRIPTS = .gdbinit -EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \ - bfin-parse.c bfin-parse.h bfin-lex.c \ - rl78-parse.c rl78-parse.h \ - rx-parse.c rx-parse.h +EXTRA_DIST = config/m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \ + config/bfin-parse.c config/bfin-parse.h config/bfin-lex.c \ + config/rl78-parse.c config/rl78-parse.h \ + config/rx-parse.c config/rx-parse.h DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h @@ -786,12 +789,11 @@ as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ $(extra_objects) $(GASLIBS) $(LIBINTL_DEP) - -# The m68k operand parser. EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ - $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \ - $(TARG_ENV_CFILES) $(CONFIG_ATOF_CFILES) $(MULTI_CFILES) \ - config/m68k-parse.y config/bfin-parse.y config/rl78-parse.y \ + $(TARGET_CPU_HFILES) $(TARGET_EXTRA_FILES) $(TARG_ENV_CFILES) \ + $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \ + $(CONFIG_ATOF_CFILES) $(MULTI_CFILES) config/m68k-parse.y \ + config/bfin-parse.y config/bfin-lex.l config/rl78-parse.y \ config/rx-parse.y EXPECT = expect RUNTEST = runtest @@ -1033,8 +1035,12 @@ config/tc-z80.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/tc-z8k.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) +config/bfin-lex-wrapper.$(OBJEXT): config/$(am__dirstamp) \ + config/$(DEPDIR)/$(am__dirstamp) config/xtensa-relax.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) +config/te-vms.$(OBJEXT): config/$(am__dirstamp) \ + config/$(DEPDIR)/$(am__dirstamp) config/obj-aout.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/obj-coff.$(OBJEXT): config/$(am__dirstamp) \ @@ -1053,8 +1059,6 @@ config/obj-multi.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/obj-som.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) -config/te-vms.$(OBJEXT): config/$(am__dirstamp) \ - config/$(DEPDIR)/$(am__dirstamp) config/atof-ieee.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/atof-vax.$(OBJEXT): config/$(am__dirstamp) \ @@ -1075,6 +1079,8 @@ config/m68k-parse.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/bfin-parse.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) +config/bfin-lex.$(OBJEXT): config/$(am__dirstamp) \ + config/$(DEPDIR)/$(am__dirstamp) config/rl78-parse.$(OBJEXT): config/$(am__dirstamp) \ config/$(DEPDIR)/$(am__dirstamp) config/rx-parse.$(OBJEXT): config/$(am__dirstamp) \ @@ -1131,6 +1137,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/atof-ieee.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/atof-vax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/bfin-lex-wrapper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/bfin-lex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/bfin-parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-crisaout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-criself.Po@am__quote@ @@ -1442,6 +1450,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -rm -f config/bfin-lex.c -rm -f config/bfin-parse.c -rm -f config/m68k-parse.c -rm -f config/rl78-parse.c @@ -1572,90 +1581,36 @@ check-DEJAGNU: site.exp development.exp: $(BFDDIR)/development.sh $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \ | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@ - -# If m68k-parse.y is in a different directory, then ylwrap will use an -# absolute path when it invokes yacc, which will cause yacc to put the -# absolute path into the generated file. That's a pain when it comes -# to generating snapshots, because it introduces spurious diffs. -# Since when we make the snapshots $(srcdir) = ".", we check for that -# case and handle it differently. This means that anybody who -# configures with $(srcdir) = "." will have to set their path in the -# debugger if they want to debug m68k-parse.y. This is bad, but on -# the other hand it's good that people who use the prebuilt -# m68k-parse.c don't get a spurious absolute path. -m68k-parse.c: $(srcdir)/config/m68k-parse.y - f=$(srcdir)/config/m68k-parse.y; \ - if [ $$f = "./config/m68k-parse.y" ]; then \ - ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \ - ln config/m68k-parse.y . > /dev/null 2>/dev/null || \ - cp config/m68k-parse.y . >/dev/null 2>/dev/null; \ - f=m68k-parse.y; \ - else true; fi; \ - $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \ - if [ $$f = "m68k-parse.y" ]; then \ - rm -f m68k-parse.y; \ - else true; fi -# Disable -Werror, if it has been enabled, since old versions of bison/ -# yacc will produce working code which contain compile time warnings. -m68k-parse.@OBJEXT@: m68k-parse.c -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR) -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR) - -# Don't let the .y.h rule clobber m68k-parse.h. -m68k-parse.h: ; @true -$(srcdir)/config/m68k-parse.h: ; @true -bfin-parse.c: $(srcdir)/config/bfin-parse.y $(srcdir)/../bfd/reloc.c - $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ; -bfin-parse.h: bfin-parse.c -bfin-parse.h: ; @true -$(srcdir)/config/bfin-parse.h: ; @true - -bfin-lex.c: $(srcdir)/config/bfin-lex.l - $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE) -bfin-lex-wrapper.@OBJEXT@: $(srcdir)/config/bfin-lex-wrapper.c bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/config/bfin-lex-wrapper.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bfin-lex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $(srcdir)/config/bfin-lex-wrapper.c -rl78-parse.c: $(srcdir)/config/rl78-parse.y $(srcdir)/../bfd/reloc.c - $(SHELL) $(YLWRAP) $(srcdir)/config/rl78-parse.y y.tab.c rl78-parse.c y.tab.h rl78-parse.h -- $(YACCCOMPILE) -d ; -rl78-parse.h: rl78-parse.c -rl78-defs.h: ; @true -$(srcdir)/config/rl78-defs.h: ; @true -rx-parse.c: $(srcdir)/config/rx-parse.y $(srcdir)/../bfd/reloc.c - $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c rx-parse.c y.tab.h rx-parse.h -- $(YACCCOMPILE) -d ; -rx-parse.h: rx-parse.c -rx-defs.h: ; @true -$(srcdir)/config/rx-defs.h: ; @true - -# The instruction table specification lexical analyzer and parser. - -# Disable -Werror, if it has been enabled, since old versions of bison/ -# yacc will produce working code which contain compile time warnings. -itbl-lex-wrapper.@OBJEXT@: itbl-lex-wrapper.c itbl-lex.c itbl-parse.h -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/itbl-lex-wrapper.c $(NO_WERROR) -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='itbl-lex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $(srcdir)/itbl-lex-wrapper.c $(NO_WERROR) - -# Disable -Werror, if it has been enabled, since old versions of bison/ -# yacc will produce working code which contain compile time warnings. -itbl-parse.@OBJEXT@: itbl-parse.c -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR) -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR) +config/m68k-parse.c: $(srcdir)/config/m68k-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE) +config/m68k-parse.h: config/m68k-parse.c + @true +config/bfin-parse.c: $(srcdir)/config/bfin-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c $@ y.tab.h config/bfin-parse.h -- $(YACCCOMPILE) -d ; +config/bfin-parse.h: config/bfin-parse.c + @true +config/bfin-lex.c: $(srcdir)/config/bfin-lex.l + $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c $@ -- $(LEXCOMPILE) + +config/bfin-lex-wrapper.@OBJEXT@: config/bfin-lex.c config/bfin-parse.h +config/rl78-parse.c: $(srcdir)/config/rl78-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/rl78-parse.y y.tab.c $@ y.tab.h config/rl78-parse.h -- $(YACCCOMPILE) -d ; +config/rl78-parse.h: config/rl78-parse.c + @true +config/rx-parse.c: $(srcdir)/config/rx-parse.y + $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c $@ y.tab.h config/rx-parse.h -- $(YACCCOMPILE) -d ; +config/rx-parse.h: config/rx-parse.c + @true + +# The mips instruction table specification lexical analyzer and parser. + +itbl-lex-wrapper.@OBJEXT@: itbl-lex.c itbl-parse.h itbl-parse.c: $(srcdir)/itbl-parse.y - $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d + $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c $@ y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d -itbl-parse.h: itbl-parse.c ; @true +itbl-parse.h: itbl-parse.c + @true itbl-ops.@OBJEXT@: itbl-parse.h diff --git a/gas/config/bfin-lex-wrapper.c b/gas/config/bfin-lex-wrapper.c index 292d843..010c37c 100644 --- a/gas/config/bfin-lex-wrapper.c +++ b/gas/config/bfin-lex-wrapper.c @@ -22,4 +22,4 @@ that config.h can set the correct values for various things. */ #include "sysdep.h" -#include "bfin-lex.c" +#include "config/bfin-lex.c" diff --git a/gas/config/bfin-lex.l b/gas/config/bfin-lex.l index ec3d1fe..be72a18 100644 --- a/gas/config/bfin-lex.l +++ b/gas/config/bfin-lex.l @@ -23,7 +23,7 @@ #include "as.h" #include "bfin-defs.h" -#include "bfin-parse.h" +#include "config/bfin-parse.h" static long parse_int (char **end); static int parse_halfreg (Register *r, int cl, char *hr); diff --git a/gas/configure b/gas/configure index d253147..5965f2b 100755 --- a/gas/configure +++ b/gas/configure @@ -12893,7 +12893,7 @@ _ACEOF case ${cpu_type} in bfin) - for f in bfin-parse.o bfin-lex-wrapper.o; do + for f in config/bfin-parse.o config/bfin-lex-wrapper.o; do case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; @@ -12922,7 +12922,7 @@ _ACEOF using_cgen=yes ;; m68k) - f=m68k-parse.o + f=config/m68k-parse.o case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; @@ -13140,7 +13140,7 @@ $as_echo "$with_priv_spec" >&6; } ;; rl78) - f=rl78-parse.o + f=config/rl78-parse.o case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; @@ -13148,7 +13148,7 @@ $as_echo "$with_priv_spec" >&6; } ;; rx) - f=rx-parse.o + f=config/rx-parse.o case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; diff --git a/gas/configure.ac b/gas/configure.ac index 3abba43..6a96bb7 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -429,7 +429,7 @@ changequote([,])dnl case ${cpu_type} in bfin) - for f in bfin-parse.o bfin-lex-wrapper.o; do + for f in config/bfin-parse.o config/bfin-lex-wrapper.o; do case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; @@ -454,7 +454,7 @@ changequote([,])dnl using_cgen=yes ;; m68k) - f=m68k-parse.o + f=config/m68k-parse.o case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; @@ -614,7 +614,7 @@ changequote([,])dnl ;; rl78) - f=rl78-parse.o + f=config/rl78-parse.o case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; @@ -622,7 +622,7 @@ changequote([,])dnl ;; rx) - f=rx-parse.o + f=config/rx-parse.o case " $extra_objects " in *" $f "*) ;; *) extra_objects="$extra_objects $f" ;; diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in index fa43f57..35b4a79 100644 --- a/gas/po/POTFILES.in +++ b/gas/po/POTFILES.in @@ -12,6 +12,7 @@ compress-debug.h cond.c config/atof-ieee.c config/atof-vax.c +config/bfin-lex-wrapper.c config/e-crisaout.c config/e-criself.c config/e-i386aout.c |