This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Compiling individual sources
- To: rrv at tid dot es
- Subject: Re: [ECOS] Compiling individual sources
- From: Bart Veer <bartv at redhat dot com>
- Date: Mon, 10 Sep 2001 16:24:48 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- References: <3B9CC2C9.763E2B26@tid.es>
- Reply-To: bartv at redhat dot com
>>>>> "Rafael" == Rafael =?iso-8859-1?Q?Rodr=EDguez?= Velilla <Rafael> writes:
Rafael> I want to compile individual files with -mlong-calls.
Rafael> Can I use the cdl script to distinguish which files must
Rafael> be compiled with this switch?
Rafael> Maybe, the only way to customice individual files is
Rafael> using the make command. I'd want to put some of the eCos'
Rafael> functions in internal memory , but it will have problems
Rafael> to call the rest of the system if I don't use long-calls.
Some eCos packages will allow you to manipulate the compiler flags on
a per-package basis, but that is as fine-grained as things get right
now. There is no support for manipulating compiler flags on a per-file
basis.
However, I suspect that you will want to use -mlong-calls for all
files, not just for some of them. For example if you want to put a
function like memcpy() into internal memory then either all modules
that invoke memcpy() need to be compiled with -mlong-calls, or
alternatively you need to give the memcpy() function the long-call
attribute in a header file used by all code that calls memcpy(). It is
not enough to compile just memcpy.c with -mlong-calls, that would not
affect any calls to memcpy(). Obviously using -mlong-calls throughout
will involve extra overhead for the system as a whole, which may
outweigh the benefits of having some functions in internal memory.
Bart