This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Multiple versions of routines tuned for different devices


On 15 November 2011 14:52, Matthew Gretton-Dann
<matthew.gretton-dann@arm.com> wrote:
> On 11/11/11 18:55, David Gilbert wrote:
>>
>> Hi,
>> ? ?What's the right way to include multiple versions of string/memory
>> routines, where the appropriate
>> choice can't be determined from compiler defines?
>>
>> ? Greta's memcpy for A15 ARMs is good, however I have a routine that
>> is faster on the older/current
>> A9 cores; ?I don't believe there is a way to get gcc to tell the code
>> what -mtune is passed to it.
>
>
> Can we write some configure magic to look at how gcc is being invoked and
> use that to create a pre-define?
>
> So in configure scan "$(CC) $(CFLAGS)" for a -mtune option and use the value
> of that to create an appropriate predefine.

I don't like the idea of scanning the flags - there are always weird ways people
manage to construct these (legally).

I prefer the idea of tweaking gcc to define it.

I kind of like Konrad's idea of modifying the spec file; however I suspect it
requires it being done in the .c code to deal with things like -mtune=native.

I think I'll ask on the gcc lists.

Dave


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