A bucket of paranoia?
I think osdevers should have a minimum of a metric tonne.
The only problem I can forsee is bugs caused by a user using a different version of the compiler to the developer. These problems crop up anyway without builtins, so I dont see anywhere that builtins add any difficulties that could be avoided by not using them.
"long long" division
Re:"long long" division
Thanks Pype. It works fine, if I link libgcc.a with my kernel. But, is it safe to do so? Also, I use "-ffreestanding -nostdlib -nodefaultlibs" flags in gcc.Pype.Clicker wrote: iirc, functions for long long division require some library code (that should be in the "language support library" libgcc.a or something. Asking "no builtin" just prevented the linker to use that library when generating your file. IIrc too, that specific library should be safe for inclusion even in a kernel, and you could still have the benefits of "avoid anything that is host-related" through "-ffreestanding", yet i have to toy with that in real programming condition before i could validate the stuff.
Re:"long long" division
libgcc is licensed as "GPL with runtime exception", the same way as glibc. In short: Yes it is safe to link with it.NOTNULL wrote: It works fine, if I link libgcc.a with my kernel. But, is it safe to do so?
Every good solution is obvious once you've found it.