This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] spu_ovl.o build fails on make -j
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: binutils at sourceware dot org
- Cc: Alan Modra <amodra at bigpond dot net dot au>
- Date: Sat, 2 Aug 2008 13:31:38 +0200
- Subject: Re: [patch] spu_ovl.o build fails on make -j
- References: <20080731053317.GA26130@host0.dyn.jankratochvil.net> <20080801080806.GG26767@bubble.grove.modra.org>
On Fri, 01 Aug 2008 10:08:06 +0200, Alan Modra wrote:
> On Thu, Jul 31, 2008 at 07:33:17AM +0200, Jan Kratochvil wrote:
> > Hi Alan,
> >
> > I was getting an error on make -j:
> > ../../ld/emultempl/spuelf.em: line 51: ../binutils/bin2c: No such file or directory
> > Missing ../../ld/emultempl/spu_ovl.o
> > You must build gas/as-new with --target=spu to build spu_ovl.o
> > make[4]: *** [eelf32_spu.c] Error 1
>
> Hmm, why isn't config/mt-spu working?
Thanks, I did not notice config/mt-spu before. Because those config/mt-spu
rules get applied only for --target=spu but not for --enable-targets=spu.
The gas dependncy in config/mt-spu is right as gas can be used only in the
--target=spu case.
The binutils dependency in config/mt-spu is currently wrong as binutils are
needed for bin2c even in the --enable-targets=spu case.
My patch fixes up ld/Makefile to need bin2c really only in the --target=spu
case. As another advantage the H.J. Lu's snapshots will now contain the text
spu_ovl.o.c file.
Sure the disadvantage is that the distributed spu_ovl.o.c file cannot be
easily converted back to its spu_ovl.o form but I expect one usually wants to
rebuild the file from .S anyway if already coding around it.
(I would put spu_ovl.o into emultempl/ instead of ./ but spu_ovl.s was already
being put to ./ so I followed it even for `spu_ovl.o'.)
Regards,
Jan
ld/
2008-08-02 Jan Kratochvil <jan.kratochvil@redhat.com>
Include the spu_ovl ASCII form into the repository files.
* emultempl/spuelf.em: No longer use `bin2c', use now `spu_ovl.o.c'.
* Makefile.am (eelf32_spu.c): Depend now on `spu_ovl.o.c'.
($(srcdir)/emultempl/spu_ovl.o.c): New target.
($(srcdir)/emultempl/spu_ovl.o): Rename to...
(spu_ovl.o): ...this one.
* Makefile.in: Regenerate.
* emultempl/spu_ovl.o.c: New file.
* emultempl/spu_ovl.o: File removed.
--- ld/Makefile.am 12 Jul 2008 08:54:13 -0000 1.248
+++ ld/Makefile.am 2 Aug 2008 10:02:14 -0000
@@ -727,11 +727,13 @@ eelf32_sparc_vxworks.c: $(srcdir)/emulpa
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
- $(srcdir)/emultempl/spu_ovl.o \
+ $(srcdir)/emultempl/spu_ovl.o.c \
ldemul-list.h \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)"
-$(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
+$(srcdir)/emultempl/spu_ovl.o.c: @MAINT@ spu_ovl.o
+ ../binutils/bin2c <spu_ovl.o >$@
+spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
if ../gas/as-new --version \
| grep 'target.*spu' >/dev/null 2>/dev/null; then \
@@ -1810,7 +1812,7 @@ MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EX
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
mostlyclean-local:
-rm -rf tmpdir
-CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.o
.PHONY: install-html install-html-am install-html-recursive
@@ -1889,7 +1891,7 @@ install-data-local: install-info
# Stuff that should be included in a distribution. The diststuff
# target is run by the taz target in ../Makefile.in.
-EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o $(man_MANS)
+EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o.c $(man_MANS)
diststuff: info $(EXTRA_DIST)
all: info ld.1
--- ld/emultempl/spuelf.em 31 Jul 2008 05:27:54 -0000 1.25
+++ ld/emultempl/spuelf.em 2 Aug 2008 10:02:16 -0000
@@ -57,9 +57,9 @@ char **my_argv;
static const char ovl_mgr[] = {
EOF
-if ! ../binutils/bin2c < ${srcdir}/emultempl/spu_ovl.o >> e${EMULATION_NAME}.c
+if ! cat ${srcdir}/emultempl/spu_ovl.o.c >> e${EMULATION_NAME}.c
then
- echo >&2 "Missing ${srcdir}/emultempl/spu_ovl.o"
+ echo >&2 "Missing ${srcdir}/emultempl/spu_ovl.o.c"
echo >&2 "You must build gas/as-new with --target=spu to build spu_ovl.o"
exit 1
fi