Skip to content
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

build: Move generation of prebuilt files out of build system #1281

Open
real-or-random opened this issue Apr 19, 2023 · 3 comments
Open

build: Move generation of prebuilt files out of build system #1281

real-or-random opened this issue Apr 19, 2023 · 3 comments

Comments

@real-or-random
Copy link
Contributor

#1245 and its need for #1277 have shown that "abusing" autotools to generate prebuilt files is hard to understand, and remains hard to maintain.

With all this autotools mess, and since we don't even have these features in CMake, it would perhaps be cleaner to move (maintainer-)generation of the distributed files entirely out of the build system(s). This is currently hard since creating the files involves running a C program, which needs to be compiled, which needs some kind of build infrastructure. If we used Python to create the table files (see #919), this would simplify some things. In particular because we have a "maintainer dependency" on Python anyway now with the test vector scripts.... On the other hand, all of this is work and I doubt it's worth spending our time on this right now.

Originally posted by @real-or-random in #1280 (comment)

@hebasto
Copy link
Member

hebasto commented Apr 22, 2023

If generate prebuilt sources manually, is it just like that:

gcc src/precompute_ecmult.c -o precompute_ecmult && ./precompute_ecmult 
gcc src/precompute_ecmult_gen.c -o precompute_ecmult_gen && ./precompute_ecmult_gen

right?

If there are no pitfalls here, two additional lines in the developers' section of the documentation can significantly simplify the build system and its usage.

UPD. Moreover, src/precompute_ecmult.c and src/precompute_ecmult_gen.c can be excluded from a release archive as build process "implementation details".

@sipa
Copy link
Contributor

sipa commented Apr 23, 2023

With a "source generation / auditing" dependency on Python now with the Wycheproof code, I'm in favor of just rewriting the precomputation part in Python too. It should be pretty trivial.

@real-or-random
Copy link
Contributor Author

I'm in favor of just rewriting the precomputation part in Python too. It should be pretty trivial.

It's as trivial as picking up #919. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants