This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: target.ld
- From: Bart Veer <bartv at ecoscentric dot com>
- To: kurotsu at allied-telesis dot co dot jp
- Cc: ecos-patches at sources dot redhat dot com
- Date: Tue, 20 Aug 2002 15:00:26 +0100 (BST)
- Subject: Re: target.ld
- References: <20020820121500.A10315@white.office1>
>>>>> "Motoya" == Motoya Kurotsu <kurotsu@allied-telesis.co.jp> writes:
Motoya> I found the fact that target.ld doesn't always reflect the
Motoya> update of mlt files. You may not find it while you follow
Motoya> the normal process like ecosconfig new xxx, ecosdonfig
Motoya> tree and make. But once you execute make clean and make
Motoya> again, you will find that target.ld never reflects the
Motoya> later update of mlt files. The cause is that
Motoya> target.ld.deps is cleared by make clean and never
Motoya> reprodued by the next make. I think that it is better to
Motoya> reflect the latest mlt files to target.ld in any case. The
Motoya> attachment is my sugestion to fix it. It is only for
Motoya> vr4300 as an example, but all architecture can be fixed
Motoya> likewise. If you have any smarter idea or any reason why I
Motoya> shouldn't do so, please tell me.
I have not investigated closely, but this does not look quite right to
me. Your new makefile rule has a target ldscript which will never
actually be generated, and which will not be declared as phony. Won't
you end up rebuilding the linker script every time, irrespective of
whether or not anything has changed?
A possible alternative (untested) would be to list the .ldi files
explicitly as a dependency, e.g.:
<PREFIX>/lib/target.ld: <PACKAGE>/src/mips_vr4300.ld $(wildcard <PREFIX>/include/pkgconf/*.ldi)
The $(wildcard ) means that the rule does not have to know the startup
type, and may avoid problems during the first build. You could still
end up doing an unnecessary rebuild if e.g. you change
mlt_<whatever>_rom.ldi when the linker script is actually using
mlt_<whatever>_ram.ldi, but that is fairly unlikely.
Bart