On 25/01/2025 14:53, Julien Plissonneau Duquène wrote:
I took a look at your package. You are a fairly lucky guy: this upstream project already considered the bootstrapping issue, and they already did all the work to make it possible in a more satisfying way [2].
Hi Julien, thanks for taking a look.The bootstrap source is a separate tarball, not part of the source so I considered it as "including a blob" as well. But since now I'm including a second tarball for docs, I can also include a third tarball separately.
The good thing about it is that it has all architectures inside already. Which could be easier for building more than 1 architecture (mostly amd64 + x86 + arm64 + armhf)
I have an old version where the build was two stages, I can go back to that and switch to compiling bootstrap source into bootstrap compiler. Likely abandoning git as a source and just using 3 orig tarballs: source + bootstrap source + html docs.
Do you see any issues with that approach?
# Precompile the compiler sources into .asm/.c files and put them into a# bootstrap/ directory, then package the source tree including the bootstrap/# sources. This package can then be distributed, and people can do # "make bootstrap" to build an fbc from the precompiled sources.Although reviewing automatically generated C and assembly code is tedious, that's still much better than disassembling machine code. When you will be done with this, please consider dropping a note to bootstrappable.org so they can list FreeBasic as one of the projects that implements an interesting workaround to the self-hosted compiler bootstrap issue. You will still have to make sure that the generated code can be regenerated (ideally identically, but minor deviations may be allowed) from the source code and the generated compiler.
bootstrappable.org looks informative. FreeBASIC doesn't have a new workaround I believe. They provide the intermediate translated source as C/asm instead of object files.
Another issue you will have to consider is the set of valid architectures for this package. As I understand it, only `amd64` is currently supported and some additional work would be required to build that compiler for `arm64` for example. Currently your `debian/control` mentions `Architecture: any`.
Good point, I only included the amd64 blob, missing the others. But x86 and arm still viable, so I need to fix this.
PS, I did try to have two sources to separate the documentation, but realised the examples/ came from source, but should be with html docs. Then I included the source with the documentation and found myself duplicating all the exclusions/copyrights/etc... so I went back to just one source. Thanks for the doc tarball tip.
-- Regards, Ahmad