This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Compiling individual sources


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]