c++ - Using GMP in freestanding programs -


is possible use gmp in freestanding environment?

i working on program must run on bare metal (to reduce overhead , security purposes - outside code isn't allowed), forcing me create minimalistic kernel, however, need use gmp arbitrarily large integers. have looked @ mini-gmp, seems orders of magnitude slower real (full) gmp.

please note: have looked @ this question, there seem no answers other 1 in op said happy mini-gmp..

you should able link static libraries freestanding executable. it's linking more object files.

so build static version of gmp (ideally -march=atom or whatever appropriate target hardware). put libgmp.a somewhere , use -ldir tell compiler where.

i haven't tried myself gmp, can't guarantee there no complications in building static gmp, build scripts packages include option build static libraries. (e.g. --enable-static)


Comments