Ping [PATCH, h8300] Add h8300-*-linux

Alan Modra amodra@gmail.com
Thu Feb 26 10:47:00 GMT 2015


On Wed, Feb 25, 2015 at 11:07:04AM -0800, H.J. Lu wrote:
> make[4]: Entering directory `/export/build/gnu/binutils/build-x86_64-linux/ld'
> Makefile:2810: warning: overriding recipe for target `eh8300elf_linux.c'
> Makefile:2163: warning: ignoring old recipe for target `eh8300elf_linux.c'
> Makefile:2821: warning: overriding recipe for target `eh8300helf_linux.c'
> Makefile:2163: warning: ignoring old recipe for target `eh8300helf_linux.c'
> Makefile:2839: warning: overriding recipe for target `eh8300self_linux.c'
> Makefile:2163: warning: ignoring old recipe for target `eh8300self_linux.c'
> Makefile:2857: warning: overriding recipe for target `eh8300sxelf_linux.c'
> Makefile:2163: warning: ignoring old recipe for target `eh8300sxelf_linux.c'

I'm assuming here the intent of 5518c738 was to continue using the
same tool dir as h8300-elf for h8300-linux, ie. $prefix/h8300-elf/lib/
rather than a new $prefix/h8300-linux/lib/.

	* Makefile.am (ALL_EMULATION_SOURCES): Sort new h8300 entries.
	(eh8300elf_linux.c, eh8300helf_linux.c, eh8300self_linux.c,
	eh8300sxelf_linux.c): Do not invoke genscripts here.
	* Makefile.in: Regenerate.
	* configure.tgt (h3800-*-linux*): Set up tdir vars to use same
	tdir as h8300-*-elf.

diff --git a/ld/Makefile.am b/ld/Makefile.am
index 58daa41..22b0419 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -284,12 +284,12 @@ ALL_EMULATION_SOURCES = \
 	egld960coff.c \
 	eh8300.c \
 	eh8300elf.c \
+	eh8300elf_linux.c \
 	eh8300h.c \
 	eh8300helf.c \
-	eh8300elf_linux.c \
+	eh8300helf_linux.c \
 	eh8300hn.c \
 	eh8300hnelf.c \
-	eh8300helf_linux.c \
 	eh8300s.c \
 	eh8300self.c \
 	eh8300self_linux.c \
@@ -297,9 +297,9 @@ ALL_EMULATION_SOURCES = \
 	eh8300snelf.c \
 	eh8300sx.c \
 	eh8300sxelf.c \
+	eh8300sxelf_linux.c \
 	eh8300sxn.c \
 	eh8300sxnelf.c \
-	eh8300sxelf_linux.c \
 	eh8500.c \
 	eh8500b.c \
 	eh8500c.c \
@@ -1311,7 +1311,6 @@ eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
 
 eh8300elf_linux.c: $(srcdir)/emulparams/h8300elf_linux.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300elf_linux "$(tdir_h8300elf)"
 
 eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
@@ -1323,7 +1322,6 @@ eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
 eh8300helf_linux.c: $(srcdir)/emulparams/h8300helf_linux.sh \
   $(srcdir)/emulparams/h8300elf_linux.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300helf_linux "$(tdir_h8300helf)"
 
 eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS}
@@ -1342,7 +1340,6 @@ eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
 eh8300self_linux.c: $(srcdir)/emulparams/h8300self_linux.sh \
   $(srcdir)/emulparams/h8300elf.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300self_linux "$(tdir_h8300self)"
 
 eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS}
@@ -1361,7 +1358,6 @@ eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
 eh8300sxelf_linux.c: $(srcdir)/emulparams/h8300sxelf_linux.sh \
   $(srcdir)/emulparams/h8300elf.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300sxelf_linux "$(tdir_h8300sxelf)"
 
 eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 83dc7f1..3236d7e 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -2800,9 +2800,10 @@ eh8300.c: $(srcdir)/emulparams/h8300.sh \
 
 eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 eh8300elf_linux.c: $(srcdir)/emulparams/h8300elf_linux.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300elf_linux "$(tdir_h8300elf)"
+
 eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
 
@@ -2813,7 +2814,7 @@ eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
 eh8300helf_linux.c: $(srcdir)/emulparams/h8300helf_linux.sh \
   $(srcdir)/emulparams/h8300elf_linux.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300helf_linux "$(tdir_h8300helf)"
+
 eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS}
 
@@ -2831,7 +2832,7 @@ eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
 eh8300self_linux.c: $(srcdir)/emulparams/h8300self_linux.sh \
   $(srcdir)/emulparams/h8300elf.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300self_linux "$(tdir_h8300self)"
+
 eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS}
 
@@ -2849,7 +2850,7 @@ eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
 eh8300sxelf_linux.c: $(srcdir)/emulparams/h8300sxelf_linux.sh \
   $(srcdir)/emulparams/h8300elf.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} h8300sxelf_linux "$(tdir_h8300sxelf)"
+
 eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
 
diff --git a/ld/configure.tgt b/ld/configure.tgt
index a46fbca..8be67a3 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -197,10 +197,17 @@ h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
 			targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
 h8300-*-elf* | h8300-*-rtems*)
 			targ_emul=h8300elf;
-			targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;;
+			targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
+			;;
 h8300-*-linux*)
 			targ_emul=h8300elf_linux;
-			targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux" ;;
+			targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux";
+			tdir_h8300elf_linux=`echo ${targ_alias} \
+					     | sed -e 's/linux.*/elf/'`;
+			tdir_h8300helf_linux=$tdir_h8300elf_linux;
+			tdir_h8300self_linux=$tdir_h8300elf_linux;
+			tdir_h8300sxelf_linux=$tdir_h8300elf_linux;
+			;;
 h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
 			targ_emul=h8500
 			targ_extra_emuls="h8500s h8500b h8500m h8500c"

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list