-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up src/components/lib/
#364
Comments
You're right and I think we have this problem with We need to make them or at least rip out case specifics to include rules in their own makefiles. Having to make changes to them both for including a new library in the system is not great. We should have components\lib\Makefile call into each subdirectory's Makefile and those makefiles should define standard make rules for all, clean, install, uninstall etc. Having them to copy headers to src/components/include// is probably better. For cleaning up cos_types and others, I agree with that too. We should also look into cleaning up I'm not very clear about what |
@phanikishoreg Thanks for the input!
Agreed. I didn't say in the message above, but I think this proposal cleans this up.
The problem with this is that there might be conflicts (same file name). I think that instead the build system just needs to know how to generate the
Yes. 👍 I think that runscripts will specify the components using I don't know where to put the system specification files currently. Maybe
Oh absolutely!!!! I haven't looked at it close enough to figure out how it should be broken up, but I completely agree it needs to be pared down, and separated.
@Others made the good point that the One other thing to think about: My proposal for |
This directory is a little schizophrenic. A look at the
Makefile
yields a large number of special cases. In fact, it is likely accurate to say that there is no design, and only special cases. This directory grew and accumulated functionality, and was never re-designed to accommodate it. This issue is meant to start a discussion, and I'll do the re-design as part of the booter stuff. The proposal (that is completely up for discussion...we just need a starting point for the discussion):The default behavior should be for the
lib
directory to include subdirectories, and to simply pass the build system on to them. Thus, they can define their own mechanisms for building rather than special-casing them inlib/Makefile
. This means that libraries that are external (likemusl
) will have another layer in their directory hierarchy;lib/musl/Makefile
with be Composite-specific and will appropriately use the build system inlib/musl/musl-1.1.11/...
. Same with parsec and others.We need to support include files being in
lib/x/include/
as that is the way it will be formusl
,ps
, etc... The question is, if we need to support this, then why do we also useinclude/
? There is a single mandatory library, the Composite runtime (cosrt
) that includes the entry addresses, stack management, thread allocation management (closure indirection), default client stubs, and component information structure (including e.g. the heap pointer). Other than that, each component's specified library dependencies will fill out both its-lxxxlib.a
requirements, but also its-I
header dependencies. There will need to be horrible and somewhat extreme build-foo to figure out where the proper-I
include directory is for each library, but, so be it.Clean up the mandatory libraries. There is a ton of trash in them currently, some of which dates back to 2005. They need to be pared down solely for the reason that we want devs to have confidence that everything in them is necessary. This includes a large revisit of
cos_types
andconsts.h
which are shared between user and kernel.Instead of relying on 2^18
-l
specifications for the scheduling library (sl
), generate a.a
library for each configuration. The main configuration parameters currently are 1. scheduling policy, and 2. memory management mechanism, 3. (add more here if I'm forgetting something @phanikishoreg ). Thus, we can name the different configurations using, for example, a two-tuple:sl_policy_alloc.a
. For example:sl_fprr_static.a
. My feeling is that this is worthwhile. Please let me know if you disagree.These changes should clean up the directory, remove exceptions, and make the de-facto using external libraries. Paired with the proposed interface changes, in which many of the interface libraries will be moved into
interface/*/
, I believe this brings the consistency we need to this directory.Comments?
@phanikishoreg @Others @ryuxin @WenyuanShao @hjaensch7
The text was updated successfully, but these errors were encountered: