[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1094030: RFS: freebasic/1.10.1+ds-1 [ITP] -- Compiler for the FreeBASIC language



Le 2025-01-25 17:02, Ahmad Khalifa a écrit :

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.

Functionnally these generated bootstrap sources and bootstrap executable binaries are equivalent, and with a strict interpretation of policies including ftp masters rejection FAQ [1] they should get the same treatment, which is not necessarily a rejection if these generated source/binaries come with all the source code necessary to generate them again (otherwise bootstrappable.org has a list of projects that could never make it into Debian, including Kotlin and Scala). In practice however the generated sources are way easier to review and compare (and browse in a repository), and that should make a difference when looking for a sponsor and submitting the package in NEW.

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)

Is `fbc` able to successfully cross-compile itself, or do you need to bootstrap each architecture separately?

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?

That's the general idea but it needs to be refined a bit. What I would do here is first locally regenerate the bootstrap source code using either a prebuilt compiler (full or bootstrap) from upstream, or a bootstrap compiler built from the (generated) bootstrap source code from upstream. You only need to generate that bootstrap code for the linux targets. Then you check if it's the same (or close enough) as the bootstrap source code provided by upstream. If no, investigate why. Then you (still locally) build a full compiler with it, regenerate the bootstrap source code with that full compiler, and compare it with the generated sources of the previous step. It should now be exactly identical. If yes, you can then commit that locally generated source code and make (as you suggested) a separate third source archive of it.

That's the bootstrap source code, generated by yourself, that will then be used in the two stage build of the package.

A further refinement (you can keep that for later) will be to make that bootstrap stage optional if there is already a freebasic package that can be installed and used to rebuild the compiler. There are several ways to achieve that and I will let you discuss that with your sponsor.

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.

Unfortunately having any convenient and suitable bootstrapping procedure provided by the upstream project is still the exception rather than the rule. This is why I think this project is worth mentioning.

Cheers,


[1]: https://ftp-master.debian.org/REJECT-FAQ.html

--
Julien Plissonneau Duquène


Reply to: