Hi Sterling,

> On Feb 6, 2016, at 11:49 AM, Sterling Hughes <[email protected]> wrote:
> 
> On 2/6/16 11:45 AM, Marko Kiiskila (JIRA) wrote:
>> 
>>      [ 
>> https://issues.apache.org/jira/browse/MYNEWT-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>>  ]
>> 
>> Marko Kiiskila resolved MYNEWT-16.
>> ----------------------------------
>>     Resolution: Fixed
>> 
>> If you want it, define FLOAT_SUPPORT either in project.cflags,
>> or in target cflags.
>> 
> 
> I think this should be a capability (that generates a cflag), not a cflag.
> 
> To me the difference is a cflag is something that a single package might 
> expect, whereas we should start having a few defined "capabilities" (SHELL, 
> NEWTMGR, FLOAT_SUPPORT), that then generate different cflags based on the egg 
> being compiled.
> 
> Perhaps this isn't the best mechanism, but I'm not sure just writing cflags 
> is either...
> 
> Thoughts?


This’ll be good to talk about.

So far we’re using capabilities for 2 purposes:
1. Egg needs to use API from another one, as it’s using the API. It doesn’t care
which one, but needs to include the header files from there. E.g. console, or
BLE driver. Egg providing the API advertises capability (console), and the egg
wanting to use API says it requires capability.

2. Egg starts using an API if it’s available from another egg. E.g. eggs 
registering
shell commands if shell is there. Egg providing the API advertises capability 
(SHELL),
and conditional parts in API user eggs are turned on by egg.xxxx.SHELL lines.

So how would you express this in this particular case of floating point? The API
is sort of provided by libgcc and libc. We don’t want to link it in unless user 
really
needs it.

We could reverse the roles of API user/API provider in relation to 
capability/required capability.
I.e. if you want to link in float support, you would say that there is 
capability
FLOAT_USER. And then libjson changes it’s compilation by checking that.

Sorry for the lengthy email, but I felt this would be good to sound out.

After writing the email I’ve convinced myself that this is not unreasonable. Any
objections?

Reply via email to