Consider build system revisions
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 90
- Forks
- 109
- Avg merge
- 22h 46m
- Merged PRs (30d)
- 3
Description
The current Make build system has become unwieldy.
Some particular reasons for this that I can list off the top of my head:
- Some of it is due to the need to check things about or within files. We use a bunch of tools, not just Tockloader and elf2tab, but also
perlandtest. These can add hidden dependencies and variation between dev environments (Linux vs MacOS). - We have many flags and configurations for GCC and other tooling. Many of those can be set to defaults, but occasionally we have change those defaults. So variables have to be made available to configure these.
- The biggest issue is support for multiple architectures. Each architecture will have its own configurations and its own build rules. But the build rules share more than they differ, so we created a system to generate build rules for each architecture for a set of standard build rules. This is quite hard to follow (at one point we get four
$variable escapes deep!). This has been exacerbated by the need for hard-coded application addresses on RISC-V. Currently libtock-c builds for 17 targets, 4 ARM and 13 RISC-V (many of which differ only in memory addresses).
What do we do about this? It's not clear that there's a way to do better with Make. So, we've discussed ideas of changing to a new build system.
Some general things that I personally think we want in any build system:
- Standard tools as much as possible (or at least standard interfaces for users). Being able to "just type make" feels nice.
- Creating a new application that does normal things should be simple. (e.g., just copy-paste an existing build file)
So, this issue is for tracking the problem and suggestions on paths forward.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current Make build system, its shared rules for the 17 targets, architecture-specific configurations, and dependencies on Tockloader, elf2tab, perl, and test. Compare possible paths against the stated goals: standard user-facing tools and simple application creation; done would require an agreed direction rather than a single-file change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, perl
- Domain
- build-system, embedded-iot
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100