Page 2 of 2

Re:"long long" division

Posted: Wed Apr 05, 2006 11:02 am
by paulbarker
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.

Re:"long long" division

Posted: Mon Apr 10, 2006 2:10 am
by NOTNULL
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.
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.

Re:"long long" division

Posted: Mon Apr 10, 2006 2:33 am
by Solar
NOTNULL wrote: It works fine, if I link libgcc.a with my kernel. :) But, is it safe to do so?
libgcc is licensed as "GPL with runtime exception", the same way as glibc. In short: Yes it is safe to link with it.