Re: Possible GCC contamination of Linux

Kurt Garloff (garloff@suse.de)
Tue, 21 Sep 1999 19:21:39 +0200


--0lnxQi9hkpPO77W3
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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.,
>=20
> #define abs(a) (((a)>=3D0)?(a):-(a))
>=20
> And included this header in ../linux/arch/i386/kernel/timer.c, and
> ../linux/fs/open.c, where it was being used.
>=20
> The result is that I can now boot the '486 from a kernel built on
> my 686.
>=20
> 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?

--=20
Kurt Garloff <garloff@suse.de> Wuppertal, FRG
PGP2 key: See mail header, key servers Linux kernel development
SuSE GmbH, N=FCrnberg, FRG SCSI drivers: tmscsim(DC390), DC395

--0lnxQi9hkpPO77W3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i

iQCVAwUBN+e+oxaQN/7O/JIVAQEKXQP/VzJ1iVtYwo0aEzgTv322O9/Ewx0WlTGg
9K37aYB4AHifs+iHs03YV9kF+/JeJWPEmd9NO7BVd4dXyw9hd/QvHBTGp9MYy40s
G3GP/oOpfbNDfc0EpJm4LejQ9n6Ec+2SgnuqV4vbmnWFds5CYv/SDxkH6SBKzFPT
x+b3lCNQTMQ=
=LgHa
-----END PGP SIGNATURE-----

--0lnxQi9hkpPO77W3--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/