Messages in this thread | | | Date | Tue, 21 Sep 1999 19:21:39 +0200 | From | Kurt Garloff <> | Subject | Re: Possible GCC contamination of Linux |
| |
On Mon, Sep 20, 1999 at 02:43:07PM -0400, Richard B. Johnson wrote: > I compiled with -fno-builtins, in addition to what you advise, and found > that abs() was an indefined symbol. I added an abs() macro to > ../linux/include/stddef.h, i.e., > > #define abs(a) (((a)>=0)?(a):-(a)) > > And included this header in ../linux/arch/i386/kernel/timer.c, and > ../linux/fs/open.c, where it was being used. > > The result is that I can now boot the '486 from a kernel built on > my 686. > > I do not know what header should really contain this macro so I did > not make a patch. I note that other macros like min() and max() are > defined for specific devices (wanpipe.h) and probably should be > moved to a common header file.
While discussing the min() max() issues with DaveM, I'd suggest you prepare a patch which adds -fno-builtins to the Makefile and makes the abs() work. stddef.h is fine, IMHO.
I see no reasons why it should not be accepted.
Wait: What about the speed of builtin memcpy and the routines provided by the kernel? I think I remember a discussion about his. Anybody?
-- Kurt Garloff <garloff@suse.de> Wuppertal, FRG PGP2 key: See mail header, key servers Linux kernel development SuSE GmbH, Nürnberg, FRG SCSI drivers: tmscsim(DC390), DC395 [unhandled content-type:application/pgp-signature] | |