help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd issue w/ Make including contents of linker script...


From: Rick Flower
Subject: Re: Odd issue w/ Make including contents of linker script...
Date: Sat, 20 Oct 2007 09:09:29 -0700
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

Greg Chicares wrote:
On 2007-10-20 01:03Z, Rick Flower wrote:
Hi all.. We started using a linker input script (for use w/ GNU ld) and I
specified that in my Makefile like so :

LINK_SCRIPT_FILE = linker-inputs.txt

That is then appended to the list of objects specified later :

OBJECTs := ... [file list here] ...
...
OBJECTS +=  $(LINK_SCRIPT_FILE)

Probably the case of the last letter (OBJECTS vs. OBJECTs) is just
an email typo, but I'll mention it just in case it somehow affects
the problem.
That's just a typo to the best of my knowledge, but will double-check..
But does a linker script really belong in $(OBJECTS) per se? Would
it be more natural to write 'LDFLAGS=-Wl,-T$(LINK_SCRIPT_FILE)',
for instance, and perhaps less error prone?
Perhaps.. At the time it seemed easier (and I thought foolproof) to put it in the list of objects,
but I guess I was wrong.. I'll try your suggestion.
However, GNU Make (version 3.81) wants to implicitly read the contents of
the linker-inputs.txt file instead of just holding it and specifying it
for the linker which is what I want.. Is there some way to keep Make from
trying to read the contents of this file?

'make' seems to consider it a makefile. Might you have something like
  include *.txt
in one of your set of makefiles?

Could it be that an autodependency rule that operates on everything
in $(OBJECTS) causes this file to be included in a makefile?

Not to my knowledge, but I've got a lot of rules to weed through so I suppose there's something
I may have missed.  Thanks for the suggestions.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]