Hi Delicia,
Could you describe me your
situation in more detail?
Is your intention is to
specify some additional script file to the linker using the “–T”
option of your linker, or do you need two separate tool invocations: one for
the pre-link script processing and one for the linker invocation?
Is the <linker_script_name.ld>
file has some pre-defined name and location or do you need to allow users to
specify/change this file name to the linker?
Thanks,
Mikhail
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Delicia
Sent: Monday, March 27, 2006 11:07
AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] assignToOption
for inputType element
I have a situation where I need to use a custom linker script (which
gets built as a pre-link step).
We do this by using the -T linker flag : cragcc a.o b.o -T
<linker_script_name.ld>
This is the case only for special projects that use multiple processors.
After having a look at the MBS documentation, I figured, the best way
to do this, would be to use the "assignToOption" field of the
inputType element.
<inputType
assignToOption="cra.c.link.option.linkerscript" //This option
has <command="-T">
buildVariable="LDSCRIPT"
id="cradle.toolchain.c.linker.input3"
multipleOfType="true"
sources="ld">
</inputType>
As per the documentation, whenever a linker input of this type
($LDSCRIPT) is found, the flag "-T" should be prepended to the
filename.
My makefile shows that this is exactly what happens.
However, my problem is that the dependencies for this step go for a
toss.
$(LDSCRIPT) is the buildVariable for the pre-link step, so this should
get built first - which happens if I remove the "assignToOption" from
the above description.
Once this assignToOption is added, the prelink step doesn't happen, and
it seems like the $LDSCRIPT variable does *not* even get defined (apparent from
the final build step.
I even tried adding LDSCRIPT to the 'builder's' reservedMacroNames but
that didn't help.
Is there a known bug of this type? Any other workaround I could use?